custom_spinner_item.xml 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  3. xmlns:tools="http://schemas.android.com/tools"
  4. android:layout_width="match_parent"
  5. android:layout_height="match_parent"
  6. tools:ignore="PxUsage">
  7. <LinearLayout
  8. android:layout_width="wrap_content"
  9. android:layout_height="wrap_content"
  10. android:layout_centerInParent="true"
  11. android:orientation="vertical"
  12. android:paddingHorizontal="20px">
  13. <TextView
  14. android:id="@+id/spinnerItemText"
  15. android:layout_width="wrap_content"
  16. android:layout_height="wrap_content"
  17. android:layout_gravity="center_horizontal"
  18. android:layout_marginTop="10px"
  19. android:layout_marginBottom="12px"
  20. android:background="@color/white"
  21. android:gravity="center"
  22. android:text="文字文字"
  23. android:textColor="#333"
  24. android:textSize="20px" />
  25. <View
  26. android:id="@+id/line"
  27. android:layout_width="180px"
  28. android:layout_height="1px"
  29. android:layout_gravity="center_horizontal"
  30. android:background="#D8D8D8" />
  31. </LinearLayout>
  32. </RelativeLayout>