activity_main.xml 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  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:inputType="text"
  29. android:minLines="8"
  30. android:autofillHints=""
  31. android:padding="5dp"
  32. android:textSize="20sp" />
  33. <android.support.v7.widget.CardView
  34. android:layout_width="match_parent"
  35. android:layout_height="wrap_content"
  36. android:layout_marginLeft="1dp"
  37. android:layout_marginRight="1dp"
  38. android:layout_marginTop="12dp">
  39. <LinearLayout
  40. android:layout_width="match_parent"
  41. android:layout_height="wrap_content"
  42. android:background="@drawable/selector_currspker"
  43. android:gravity="center_vertical"
  44. android:onClick="onSpkerSwitchClick"
  45. android:orientation="horizontal"
  46. android:padding="7dp">
  47. <ImageView
  48. android:id="@+id/iv_curspk_icon"
  49. android:layout_width="40dp"
  50. android:layout_height="40dp"
  51. android:src="@mipmap/xiaoyan"
  52. android:contentDescription="TODO" />
  53. <TextView
  54. android:id="@+id/tv_curspk_desc"
  55. android:layout_width="match_parent"
  56. android:layout_height="wrap_content"
  57. android:layout_marginLeft="5dp"
  58. android:text="小燕 青年女声"
  59. android:textSize="18sp" />
  60. </LinearLayout>
  61. </android.support.v7.widget.CardView>
  62. <LinearLayout
  63. android:layout_width="match_parent"
  64. android:layout_height="wrap_content"
  65. android:layout_marginTop="20dp"
  66. android:gravity="center_vertical"
  67. android:orientation="horizontal">
  68. <TextView
  69. android:layout_width="wrap_content"
  70. android:layout_height="wrap_content"
  71. android:text="@string/speed"
  72. android:textSize="15sp" />
  73. <SeekBar
  74. android:focusable="auto"
  75. android:progress="50"
  76. android:id="@+id/seekBar"
  77. android:layout_width="match_parent"
  78. android:layout_height="wrap_content"
  79. android:thumb="@drawable/shape_seekbar_thumb" />
  80. </LinearLayout>
  81. <Button
  82. android:layout_width="match_parent"
  83. android:layout_height="wrap_content"
  84. android:layout_marginTop="20dp"
  85. android:background="@drawable/selector_btn"
  86. android:onClick="onSpeakClick"
  87. android:text="@string/btn_speak"
  88. android:textColor="#fff"
  89. android:textSize="18sp" />
  90. <FrameLayout
  91. android:id="@+id/fl_remark"
  92. android:layout_width="match_parent"
  93. android:layout_height="0dp"
  94. android:layout_weight="1" />
  95. <TextView
  96. android:layout_width="match_parent"
  97. android:layout_height="wrap_content"
  98. android:gravity="center"
  99. android:text="@string/xunfei"
  100. android:textSize="13sp" />
  101. </LinearLayout>
  102. </lib.homhomlib.design.SlidingLayout>