pickerview_address_layout.xml 3.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
  3. android:layout_width="match_parent"
  4. android:layout_height="wrap_content"
  5. xmlns:app="http://schemas.android.com/apk/res-auto"
  6. android:background="@drawable/bg_white_top_10dp"
  7. android:orientation="vertical">
  8. <RelativeLayout
  9. app:layout_constraintLeft_toLeftOf="parent"
  10. app:layout_constraintTop_toTopOf="parent"
  11. android:id="@+id/rl_top"
  12. android:layout_width="match_parent"
  13. android:layout_height="wrap_content">
  14. <TextView
  15. android:padding="14dp"
  16. android:id="@+id/tv_cancel"
  17. android:layout_width="wrap_content"
  18. android:layout_height="wrap_content"
  19. android:layout_centerVertical="true"
  20. android:layout_marginLeft="6dp"
  21. android:text="取消"
  22. android:textColor="@color/color_666666"
  23. android:textSize="@dimen/dp_16" />
  24. <TextView
  25. android:layout_width="wrap_content"
  26. android:layout_height="wrap_content"
  27. android:layout_centerInParent="true"
  28. android:text=""
  29. android:textColor="@color/color_1a1a1a"
  30. android:textSize="18dp" />
  31. <TextView
  32. android:id="@+id/tv_finish"
  33. android:layout_width="wrap_content"
  34. android:layout_height="wrap_content"
  35. android:layout_alignParentRight="true"
  36. android:layout_centerVertical="true"
  37. android:layout_marginRight="6dp"
  38. android:padding="14dp"
  39. android:text="确定"
  40. android:textColor="@color/color_2dc7aa"
  41. android:textSize="@dimen/dp_16" />
  42. </RelativeLayout>
  43. <View
  44. android:layout_marginEnd="13dp"
  45. android:layout_marginStart="13dp"
  46. app:layout_constraintLeft_toLeftOf="parent"
  47. app:layout_constraintBottom_toBottomOf="@+id/optionspicker"
  48. app:layout_constraintTop_toTopOf="@+id/optionspicker"
  49. android:background="@drawable/shape_f2f2f2_6dp"
  50. android:layout_width="match_parent"
  51. android:layout_height="44dp"/>
  52. <View
  53. app:layout_constraintLeft_toLeftOf="parent"
  54. app:layout_constraintTop_toBottomOf="@+id/rl_top"
  55. android:id="@+id/view_line"
  56. style="@style/line_style"
  57. android:layout_marginEnd="13dp"
  58. android:layout_marginStart="13dp"/>
  59. <!--此部分需要完整复制过去,删减或者更改ID会导致初始化找不到内容而报空-->
  60. <LinearLayout
  61. app:layout_constraintLeft_toLeftOf="parent"
  62. app:layout_constraintTop_toBottomOf="@+id/view_line"
  63. android:id="@+id/optionspicker"
  64. android:layout_width="match_parent"
  65. android:layout_height="@dimen/dp_250"
  66. android:gravity="center"
  67. android:minHeight="150dp"
  68. android:orientation="horizontal">
  69. <com.contrarywind.view.WheelView
  70. android:id="@+id/options1"
  71. android:layout_width="0dp"
  72. android:layout_height="match_parent"
  73. android:layout_weight="1" />
  74. <com.contrarywind.view.WheelView
  75. android:id="@+id/options2"
  76. android:layout_width="0dp"
  77. android:layout_height="match_parent"
  78. android:layout_weight="1" />
  79. <com.contrarywind.view.WheelView
  80. android:id="@+id/options3"
  81. android:layout_width="0dp"
  82. android:layout_height="match_parent"
  83. android:layout_weight="1" />
  84. </LinearLayout>
  85. </androidx.constraintlayout.widget.ConstraintLayout>