activity_main.xml 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <lib.homhomlib.design.SlidingLayout xmlns:android="http://schemas.android.com/apk/res/android"
  3. xmlns:app="http://schemas.android.com/apk/res-auto"
  4. android:layout_width="match_parent"
  5. android:layout_height="match_parent"
  6. app:background_view="@layout/view_bg_main"
  7. app:sliding_mode="top"
  8. app:top_max="80dp">
  9. <!--注: 这里的clickable给true是因为SlidingLayout这个第三方控件的bug-->
  10. <LinearLayout
  11. android:layout_width="match_parent"
  12. android:layout_height="match_parent"
  13. android:background="#f4f4f4"
  14. android:clickable="true"
  15. android:orientation="vertical"
  16. android:paddingBottom="5dp"
  17. android:paddingLeft="12dp"
  18. android:paddingRight="12dp"
  19. android:paddingTop="12dp"
  20. android:focusable="true">
  21. <EditText
  22. android:id="@+id/et"
  23. android:layout_width="match_parent"
  24. android:layout_height="wrap_content"
  25. android:background="@drawable/shape_bg"
  26. android:gravity="top"
  27. android:hint="@string/please_input"
  28. android:minLines="8"
  29. android:autofillHints=""
  30. android:padding="5dp"
  31. android:textSize="20sp" />
  32. <android.support.v7.widget.CardView
  33. android:layout_width="match_parent"
  34. android:layout_height="wrap_content"
  35. android:layout_marginLeft="1dp"
  36. android:layout_marginRight="1dp"
  37. android:layout_marginTop="12dp">
  38. <LinearLayout
  39. android:layout_width="match_parent"
  40. android:layout_height="wrap_content"
  41. android:background="@drawable/selector_currspker"
  42. android:gravity="center_vertical"
  43. android:onClick="onSpkerSwitchClick"
  44. android:orientation="horizontal"
  45. android:padding="7dp">
  46. <ImageView
  47. android:id="@+id/iv_curspk_icon"
  48. android:layout_width="40dp"
  49. android:layout_height="40dp"
  50. android:src="@mipmap/xiaoyan"
  51. android:contentDescription="TODO" />
  52. <TextView
  53. android:id="@+id/tv_curspk_desc"
  54. android:layout_width="match_parent"
  55. android:layout_height="wrap_content"
  56. android:layout_marginLeft="5dp"
  57. android:text="小燕 青年女声"
  58. android:textSize="18sp" />
  59. </LinearLayout>
  60. </android.support.v7.widget.CardView>
  61. <LinearLayout
  62. android:layout_width="match_parent"
  63. android:layout_height="wrap_content"
  64. android:layout_marginTop="20dp"
  65. android:gravity="center_vertical"
  66. android:orientation="horizontal">
  67. <TextView
  68. android:layout_width="wrap_content"
  69. android:layout_height="wrap_content"
  70. android:text="@string/speed"
  71. android:textSize="15sp" />
  72. <SeekBar
  73. android:focusable="auto"
  74. android:progress="50"
  75. android:id="@+id/seekBar"
  76. android:layout_width="match_parent"
  77. android:layout_height="wrap_content"
  78. android:thumb="@drawable/shape_seekbar_thumb" />
  79. </LinearLayout>
  80. <Button
  81. android:layout_width="match_parent"
  82. android:layout_height="wrap_content"
  83. android:layout_marginTop="20dp"
  84. android:background="@drawable/selector_btn"
  85. android:onClick="onSpeakClick"
  86. android:text="@string/btn_speak"
  87. android:textColor="#fff"
  88. android:textSize="18sp" />
  89. <FrameLayout
  90. android:id="@+id/fl_remark"
  91. android:layout_width="match_parent"
  92. android:layout_height="0dp"
  93. android:layout_weight="1" />
  94. <TextView
  95. android:layout_width="match_parent"
  96. android:layout_height="wrap_content"
  97. android:gravity="center"
  98. android:text="@string/xunfei"
  99. android:textSize="13sp" />
  100. </LinearLayout>
  101. </lib.homhomlib.design.SlidingLayout>