fragment_message_item.xml 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  3. android:layout_width="match_parent"
  4. android:layout_height="wrap_content"
  5. android:background="@color/white"
  6. android:orientation="horizontal">
  7. <ImageView
  8. android:id="@+id/img_message_img"
  9. android:layout_width="wrap_content"
  10. android:layout_height="wrap_content"
  11. android:layout_alignParentLeft="true"
  12. android:layout_margin="@dimen/space_10"
  13. android:src="@mipmap/user_img_p" />
  14. <LinearLayout
  15. android:id="@+id/layout"
  16. android:layout_width="match_parent"
  17. android:layout_height="wrap_content"
  18. android:layout_alignParentTop="true"
  19. android:layout_alignTop="@id/img_message_img"
  20. android:layout_margin="@dimen/space_10"
  21. android:layout_toRightOf="@id/img_message_img"
  22. android:gravity="center"
  23. android:orientation="horizontal">
  24. <TextView
  25. android:id="@+id/tv_message_name"
  26. android:layout_width="match_parent"
  27. android:layout_height="wrap_content"
  28. android:layout_weight="1"
  29. android:lines="1"
  30. android:text="@string/setting_name_phone"
  31. android:textColor="@color/listitem_black"
  32. android:textSize="@dimen/text_size_15" />
  33. <TextView
  34. android:id="@+id/tv_message_data"
  35. android:layout_width="match_parent"
  36. android:layout_height="wrap_content"
  37. android:layout_weight="2"
  38. android:gravity="right"
  39. android:lines="1"
  40. android:text="@string/fragment_message_item_data" />
  41. </LinearLayout>
  42. <TextView
  43. android:id="@+id/tv_message_msg"
  44. android:layout_width="wrap_content"
  45. android:layout_height="wrap_content"
  46. android:layout_alignBottom="@id/img_message_img"
  47. android:layout_marginLeft="@dimen/space_10"
  48. android:layout_toRightOf="@id/img_message_img"
  49. android:lines="1"
  50. android:text="@string/fragment_message_item_msg"
  51. android:textSize="@dimen/text_size_13" />
  52. <View
  53. android:layout_width="match_parent"
  54. android:layout_height="@dimen/space_1"
  55. android:layout_alignParentBottom="true"
  56. android:background="@color/gray" />
  57. </RelativeLayout>