教你轻松制作Android音乐播放器

2019-12-10 19:54:21于海丽
  • android:layout_alignParentRight="true"  /> 
  • </RelativeLayout>  <RelativeLayout  
  • android:layout_width="match_parent"  android:layout_height="wrap_content" 
  • >  <Button 
  • android:id="@+id/previous"  android:layout_height="wrap_content" 
  • android:layout_width="wrap_content"  android:text="上一曲" 
  • android:layout_alignParentLeft="true"  /> 
  • <Button   android:id="@+id/stop" 
  • android:layout_height="wrap_content"  android:layout_width="wrap_content" 
  • android:text="停止音乐"  android:layout_toRightOf="@id/previous" 
  • />   
  • <Button  android:id="@+id/next" 
  • android:layout_height="wrap_content"  android:layout_width="wrap_content" 
  • android:text="下一曲"  android:layout_alignParentRight="true" 
  • />  <Button  
  • android:id="@+id/stopService"  android:layout_height="wrap_content" 
  • android:layout_width="wrap_content"  android:text="停止音乐服务" 
  • android:layout_toLeftOf="@id/next"  /> 
  • </RelativeLayout>    
  • </LinearLayout> 

    以上就是制作Android音乐播放器的全部代码,希望对大家的学习有所帮助。


    注:相关教程知识阅读请移步到Android开发频道。