layout_example.xml 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  3. android:layout_width="370dp"
  4. android:id="@+id/layout_main"
  5. android:orientation="horizontal"
  6. android:layout_height="wrap_content">
  7. <!-- 图片 -->
  8. <ImageView
  9. android:id="@+id/imageView"
  10. android:layout_width="100dp"
  11. android:layout_height="100dp"
  12. android:layout_centerVertical="true"
  13. android:src="@mipmap/ic_launcher" />
  14. <!-- 文字 -->
  15. <LinearLayout
  16. android:id="@+id/textLayout"
  17. android:layout_width="wrap_content"
  18. android:layout_height="wrap_content"
  19. android:layout_marginLeft="10dp"
  20. android:layout_toRightOf="@id/imageView"
  21. android:orientation="vertical">
  22. <TextView
  23. android:layout_width="wrap_content"
  24. android:layout_height="wrap_content"
  25. android:text="Text 1" />
  26. <TextView
  27. android:layout_width="wrap_content"
  28. android:layout_height="wrap_content"
  29. android:text="Text 1" />
  30. <TextView
  31. android:layout_width="wrap_content"
  32. android:layout_height="wrap_content"
  33. android:text="Text 1" />
  34. <TextView
  35. android:layout_width="wrap_content"
  36. android:layout_height="wrap_content"
  37. android:text="Text 1" />
  38. <TextView
  39. android:layout_width="wrap_content"
  40. android:layout_height="wrap_content"
  41. android:text="Text 1" />
  42. <TextView
  43. android:layout_width="wrap_content"
  44. android:layout_height="wrap_content"
  45. android:text="Text 1" />
  46. <!-- 其他行文字 -->
  47. <!-- 可以根据需求添加更多的TextView,以显示7行文字 -->
  48. </LinearLayout>
  49. </LinearLayout>