pl_player.xml 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  3. android:layout_width="match_parent"
  4. android:layout_height="match_parent"
  5. android:background="#4a4a4a"
  6. android:keepScreenOn="true">
  7. <!-- Player Header -->
  8. <LinearLayout
  9. android:id="@+id/player_header_bg"
  10. android:layout_width="fill_parent"
  11. android:layout_height="60dip"
  12. android:background="@layout/bg_player_header"
  13. android:layout_alignParentTop="true"
  14. android:paddingLeft="5dp"
  15. android:paddingRight="5dp">
  16. <!-- Song Title -->
  17. <TextView
  18. android:id="@+id/songTitle"
  19. android:layout_width="wrap_content"
  20. android:layout_height="wrap_content"
  21. android:layout_weight="1"
  22. android:textColor="#04b3d2"
  23. android:textSize="16sp"
  24. android:paddingLeft="10dp"
  25. android:textStyle="bold"
  26. android:text="@string/pl_no_song"
  27. android:layout_marginTop="10dp"/>
  28. <!-- Playlist button -->
  29. <ImageButton
  30. android:contentDescription="@string/pl_desc_playlist"
  31. android:id="@+id/btnPlaylist"
  32. android:layout_width="wrap_content"
  33. android:layout_height="fill_parent"
  34. android:src="@drawable/pl_playlist"
  35. android:background="@null"/>
  36. </LinearLayout>
  37. <!-- Song Thumbnail Image -->
  38. <LinearLayout
  39. android:id="@+id/songThumbnail"
  40. android:layout_width="fill_parent"
  41. android:layout_height="wrap_content"
  42. android:paddingTop="10dp"
  43. android:paddingBottom="10dp"
  44. android:gravity="center"
  45. android:layout_below="@id/player_header_bg">
  46. <ImageView
  47. android:contentDescription="@string/pl_desc_thumb"
  48. android:layout_width="wrap_content"
  49. android:layout_height="wrap_content"
  50. android:src="@drawable/pl_adele"/>
  51. </LinearLayout>
  52. <!-- Player Footer -->
  53. <LinearLayout
  54. android:id="@+id/player_footer_bg"
  55. android:layout_width="fill_parent"
  56. android:layout_height="100dp"
  57. android:layout_alignParentBottom="true"
  58. android:background="@layout/pl_bg_player_footer"
  59. android:gravity="center">
  60. <!-- Player Buttons -->
  61. <LinearLayout
  62. android:layout_width="wrap_content"
  63. android:layout_height="wrap_content"
  64. android:orientation="horizontal"
  65. android:gravity="center_vertical"
  66. android:background="@layout/pl_rounded_corner"
  67. android:paddingLeft="10dp"
  68. android:paddingRight="10dp">
  69. <!-- Previous Button -->
  70. <ImageButton
  71. android:contentDescription="@string/pl_desc_previous"
  72. android:id="@+id/btnPrevious"
  73. android:src="@drawable/pl_previous"
  74. android:layout_width="wrap_content"
  75. android:layout_height="wrap_content"
  76. android:background="@null"/>
  77. <!-- Backward Button -->
  78. <ImageButton
  79. android:contentDescription="@string/pl_desc_backward"
  80. android:id="@+id/btnBackward"
  81. android:src="@drawable/pl_backward"
  82. android:layout_width="wrap_content"
  83. android:layout_height="wrap_content"
  84. android:background="@null"/>
  85. <!-- Play Button -->
  86. <ImageButton
  87. android:contentDescription="@string/pl_desc_play"
  88. android:id="@+id/btnPlay"
  89. android:src="@drawable/pl_play"
  90. android:layout_width="wrap_content"
  91. android:layout_height="wrap_content"
  92. android:background="@null"/>
  93. <!-- Forward Button -->
  94. <ImageButton
  95. android:contentDescription="@string/pl_desc_forward"
  96. android:id="@+id/btnForward"
  97. android:src="@drawable/pl_forward"
  98. android:layout_width="wrap_content"
  99. android:layout_height="wrap_content"
  100. android:background="@null"/>
  101. <!-- Next Button -->
  102. <ImageButton
  103. android:contentDescription="@string/pl_desc_next"
  104. android:id="@+id/btnNext"
  105. android:src="@drawable/pl_next"
  106. android:layout_width="wrap_content"
  107. android:layout_height="wrap_content"
  108. android:background="@null"/>
  109. </LinearLayout>
  110. </LinearLayout>
  111. <!-- Progress Bar/Seek bar -->
  112. <SeekBar
  113. android:id="@+id/songProgressBar"
  114. android:layout_width="fill_parent"
  115. android:layout_height="wrap_content"
  116. android:layout_marginRight="20dp"
  117. android:layout_marginLeft="20dp"
  118. android:layout_marginBottom="20dp"
  119. android:layout_above="@id/player_footer_bg"
  120. android:thumb="@drawable/pli_seek_handler"
  121. android:progressDrawable="@drawable/pl_seekbar_progress"
  122. android:paddingLeft="6dp"
  123. android:paddingRight="6dp"/>
  124. <!-- Timer Display -->
  125. <LinearLayout
  126. android:id="@+id/timerDisplay"
  127. android:layout_above="@id/songProgressBar"
  128. android:layout_width="fill_parent"
  129. android:layout_height="wrap_content"
  130. android:layout_marginRight="20dp"
  131. android:layout_marginLeft="20dp"
  132. android:layout_marginBottom="10dp">
  133. <!-- Current Duration Label -->
  134. <TextView
  135. android:id="@+id/songCurrentDurationLabel"
  136. android:layout_width="fill_parent"
  137. android:layout_height="wrap_content"
  138. android:layout_weight="1"
  139. android:gravity="left"
  140. android:textColor="#eeeeee"
  141. android:textStyle="bold"/>
  142. <!-- Total Duration Label -->
  143. <TextView
  144. android:id="@+id/songTotalDurationLabel"
  145. android:layout_width="fill_parent"
  146. android:layout_height="wrap_content"
  147. android:layout_weight="1"
  148. android:gravity="right"
  149. android:textColor="#04cbde"
  150. android:textStyle="bold"/>
  151. </LinearLayout>
  152. <!-- Repeat / Shuffle buttons -->
  153. <LinearLayout
  154. android:layout_width="fill_parent"
  155. android:layout_height="wrap_content"
  156. android:layout_above="@id/timerDisplay"
  157. android:gravity="center">
  158. <!-- Repeat Button -->
  159. <ImageButton
  160. android:contentDescription="@string/pl_desc_repeat"
  161. android:id="@+id/btnRepeat"
  162. android:layout_width="wrap_content"
  163. android:layout_height="wrap_content"
  164. android:src="@drawable/pl_repeat"
  165. android:layout_marginRight="5dp"
  166. android:background="@null"/>
  167. <!-- Shuffle Button -->
  168. <ImageButton
  169. android:contentDescription="@string/pl_desc_rand"
  170. android:id="@+id/btnShuffle"
  171. android:layout_width="wrap_content"
  172. android:layout_height="wrap_content"
  173. android:src="@drawable/pl_shuffle"
  174. android:layout_marginLeft="5dp"
  175. android:background="@null"/>
  176. </LinearLayout>
  177. </RelativeLayout>