activity_chat.xml 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  3. xmlns:flatui="http://schemas.android.com/apk/res-auto"
  4. android:layout_width="match_parent"
  5. android:layout_height="match_parent"
  6. android:background="@mipmap/chat_bg_default"
  7. android:orientation="vertical">
  8. <include
  9. android:id="@+id/titlebar"
  10. layout="@layout/titlebar" />
  11. <!-- 底部按钮以及 编辑框-->
  12. <LinearLayout
  13. android:id="@+id/btn_bottom"
  14. android:layout_width="match_parent"
  15. android:layout_height="wrap_content"
  16. android:layout_alignParentBottom="true"
  17. android:layout_alignParentRight="true"
  18. android:background="@color/graywhite"
  19. android:orientation="vertical">
  20. <View
  21. android:layout_width="match_parent"
  22. android:layout_height="@dimen/space_1"
  23. android:background="@color/gray" />
  24. <RelativeLayout
  25. android:layout_width="match_parent"
  26. android:layout_height="50dp"
  27. android:layout_alignParentBottom="true"
  28. android:layout_alignParentRight="true"
  29. android:layout_centerVertical="true"
  30. android:layout_marginLeft="5dip"
  31. android:orientation="horizontal">
  32. <Button
  33. android:id="@+id/send_voice_btn"
  34. android:layout_width="40dp"
  35. android:layout_height="40dp"
  36. android:layout_alignParentLeft="true"
  37. android:layout_margin="@dimen/space_5"
  38. android:background="@mipmap/chat_video_btn" />
  39. <Button
  40. android:id="@+id/add_file"
  41. android:layout_width="wrap_content"
  42. android:layout_height="45dp"
  43. android:layout_alignParentRight="true"
  44. android:layout_centerVertical="true"
  45. android:layout_margin="@dimen/space_5"
  46. android:layout_weight="2.5"
  47. android:background="@mipmap/chat_add_other" />
  48. <Button
  49. android:id="@+id/choose_face"
  50. android:layout_width="wrap_content"
  51. android:layout_height="40dp"
  52. android:layout_centerVertical="true"
  53. android:layout_margin="@dimen/space_5"
  54. android:layout_toLeftOf="@id/add_file"
  55. android:background="@mipmap/chat_choose_face"
  56. android:visibility="gone"/>
  57. <LinearLayout
  58. android:id="@+id/msg_layout"
  59. android:layout_width="match_parent"
  60. android:layout_height="wrap_content"
  61. android:layout_centerVertical="true"
  62. android:layout_margin="@dimen/space_5"
  63. android:layout_toLeftOf="@id/choose_face"
  64. android:layout_toRightOf="@id/send_voice_btn"
  65. android:orientation="horizontal">
  66. <EditText
  67. android:id="@+id/msg"
  68. android:layout_width="match_parent"
  69. android:layout_height="45dp"
  70. android:layout_weight="1"
  71. android:singleLine="true"
  72. android:textSize="18sp" />
  73. <ImageView
  74. android:id="@+id/send_msg_btn"
  75. android:layout_width="match_parent"
  76. android:layout_height="40dp"
  77. android:layout_weight="4.5"
  78. android:background="@drawable/selector_send_msg"
  79. android:visibility="gone" />
  80. </LinearLayout>
  81. </RelativeLayout>
  82. <View
  83. android:layout_width="match_parent"
  84. android:layout_height="@dimen/space_1"
  85. android:background="@color/gray" />
  86. <LinearLayout
  87. android:id="@+id/add_file_layout"
  88. android:layout_width="match_parent"
  89. android:layout_height="wrap_content"
  90. android:layout_margin="@dimen/space_20"
  91. android:visibility="gone"
  92. android:orientation="horizontal">
  93. <ImageView
  94. android:id="@+id/chat_add_pic"
  95. android:layout_width="match_parent"
  96. android:layout_height="wrap_content"
  97. android:layout_weight="1"
  98. android:src="@mipmap/chat_add_pic" />
  99. <ImageView
  100. android:id="@+id/chat_add_file"
  101. android:layout_width="match_parent"
  102. android:layout_height="wrap_content"
  103. android:layout_weight="1"
  104. android:src="@mipmap/chat_add_file" />
  105. <ImageView
  106. android:id="@+id/chat_add_video"
  107. android:layout_width="match_parent"
  108. android:layout_height="wrap_content"
  109. android:layout_weight="1"
  110. android:src="@mipmap/chat_add_video" />
  111. </LinearLayout>
  112. </LinearLayout>
  113. <!-- 聊天内容 listview-->
  114. <ListView
  115. android:id="@+id/messageListview"
  116. android:layout_width="fill_parent"
  117. android:layout_height="fill_parent"
  118. android:layout_above="@id/btn_bottom"
  119. android:layout_below="@id/titlebar"
  120. android:cacheColorHint="#0000"
  121. android:divider="@null"
  122. android:dividerHeight="5dp"
  123. android:scrollbarStyle="outsideOverlay"
  124. android:stackFromBottom="true" />
  125. </RelativeLayout>