player_controller.xml 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
  3. android:layout_width="match_parent"
  4. android:layout_height="match_parent">
  5. <LinearLayout
  6. android:id="@+id/player_controller_layout"
  7. android:layout_width="match_parent"
  8. android:layout_height="match_parent"
  9. android:orientation="vertical">
  10. <FrameLayout
  11. android:layout_width="match_parent"
  12. android:layout_height="0dp"
  13. android:layout_weight="1"
  14. android:background="@color/translucent_background">
  15. <LinearLayout
  16. android:layout_width="match_parent"
  17. android:layout_height="match_parent"
  18. android:orientation="horizontal">
  19. <ImageView
  20. android:id="@+id/player_back"
  21. android:layout_width="40dp"
  22. android:layout_height="40dp"
  23. android:layout_gravity="center|left"
  24. android:paddingLeft="20dp"
  25. android:src="@drawable/player_back" />
  26. <TextView
  27. android:id="@+id/player_name"
  28. android:layout_width="match_parent"
  29. android:layout_height="match_parent"
  30. android:gravity="center|left"
  31. android:paddingLeft="20dp"
  32. android:textColor="@color/white"
  33. android:textSize="18sp" />
  34. </LinearLayout>
  35. </FrameLayout>
  36. <Space
  37. android:layout_width="match_parent"
  38. android:layout_height="0dp"
  39. android:layout_weight="6"></Space>
  40. <FrameLayout
  41. android:layout_width="match_parent"
  42. android:layout_height="0dp"
  43. android:layout_weight="1.3"
  44. android:background="@color/translucent_background">
  45. <LinearLayout
  46. android:layout_width="match_parent"
  47. android:layout_height="match_parent"
  48. android:layout_marginLeft="10dp"
  49. android:layout_marginRight="10dp"
  50. android:orientation="horizontal">
  51. <ImageView
  52. android:id="@+id/player_little_icon"
  53. android:layout_width="0dp"
  54. android:layout_height="24dp"
  55. android:layout_gravity="center"
  56. android:layout_weight="0.5"
  57. android:src="@drawable/player_little_icon_pause" />
  58. <SeekBar
  59. android:id="@+id/player_seekbar"
  60. android:layout_width="0dp"
  61. android:layout_height="wrap_content"
  62. android:layout_gravity="center"
  63. android:layout_marginLeft="5dp"
  64. android:layout_marginRight="5dp"
  65. android:layout_weight="5"
  66. android:focusable="false"
  67. android:maxHeight="5dp"
  68. android:minHeight="5dp"
  69. android:progressDrawable="@drawable/player_seekbar_list"
  70. android:thumb="@drawable/seekbar_thumb"
  71. android:thumbOffset="0dp" />
  72. <TextView
  73. android:id="@+id/player_current"
  74. android:layout_width="0dp"
  75. android:layout_height="match_parent"
  76. android:layout_gravity="center"
  77. android:layout_weight="1"
  78. android:gravity="center"
  79. android:text="00:00"
  80. android:textColor="@color/white"
  81. android:textSize="16sp" />
  82. </LinearLayout>
  83. </FrameLayout>
  84. </LinearLayout>
  85. <!-- 这个FrameLayout 装loading以及播放器状态显示图片或者更多工具-->
  86. <FrameLayout
  87. android:id="@+id/player_other_frame"
  88. android:layout_width="match_parent"
  89. android:layout_height="match_parent"
  90. android:layout_gravity="center">
  91. <ImageView
  92. android:id="@+id/player_status"
  93. android:layout_width="100dp"
  94. android:layout_height="100dp"
  95. android:layout_gravity="center"
  96. android:src="@drawable/edufound_player_play"
  97. android:visibility="gone" />
  98. <ImageView
  99. android:id="@+id/player_loading"
  100. android:layout_width="wrap_content"
  101. android:layout_height="wrap_content"
  102. android:layout_gravity="center"
  103. android:layout_marginBottom="5dp" />
  104. </FrameLayout>
  105. </FrameLayout>