[英]Android: How to create music player?
您可以在Activity
实现底部栏,并且在Activity
应具有用于其他布局的Fragments
。
这是从头开始在Android中实现Music Player的出色教程:在Android上创建Music Player 。
另一个很酷的功能: Android向上滑动面板模仿了Google Play音乐的相同功能,同时向上滑动了当前播放音乐。
您可以通过setVisibility(View.GONE / View.VISIBLE / View.INVISIBLE)和FrameLayout更改视图。 另一种方法,了解片段。 希望对您有所帮助。
您可以像这样轻松完成:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent">
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="New Button"
android:id="@+id/button"
android:layout_alignParentBottom="true" />
<ListView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@+id/button">
</ListView>
</RelativeLayout>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.