Android聊天软件开发(基于 易云IM即时通讯)——发送图片消息(五)

最近工作太忙,都没有时间写博客了。废话不多说,直接上代码。

在activity_send_message.xml添加发送图片的按钮


  1. "1.0" encoding="utf-8"
  2. "http://schemas.android.com/apk/res/android"
  3. android_layout_width="match_parent"
  4. android_layout_height="match_parent">
  5. android_layout_width="match_parent"
  6. android_layout_height="match_parent"
  7. android_gravity="center_horizontal"
  8. android_orientation="vertical">
  9. android_layout_width="match_parent"
  10. android_layout_height="44dp"
  11. android_background="@color/deepskyblue"
  12. android_gravity="center_vertical"
  13. android_orientation="horizontal">
  14. android_id="@+id/ll_return"
  15. android_layout_width="44sp"
  16. android_layout_height="44sp"
  17. android_gravity="center_vertical">
  18. android_layout_width="24sp"
  19. android_layout_height="24sp"
  20. android_layout_marginStart="20dp"
  21. android_contentDescription="@string/tv_icon_des"
  22. android_src="@drawable/return1" />
  23. /LinearLayout>
  24. android_layout_width="wrap_content"
  25. android_layout_height="wrap_content"
  26. android_layout_marginStart="20dp"
  27. android_text="@string/btn_send_message"
  28. android_textColor="@color/white"
  29. android_textSize="20sp" />
  30. android_layout_width="match_parent"
  31. android_layout_height="wrap_content"
  32. android_orientation="vertical">
  33. android_id="@+id/ed_send_text"
  34. android_layout_width="match_parent"
  35. android_layout_height="wrap_content" />
  36. android_id="@+id/btn_send_text"
  37. android_layout_width="wrap_content"
  38. android_layout_height="wrap_content"
  39. android_text="@string/btn_send_message" />
  40. android_layout_width="wrap_content"
  41. android_layout_height="wrap_content"
  42. android_text="消息接收显示" />
  43. android_id="@+id/tv_receive_message"
  44. android_layout_width="wrap_content"
  45. android_layout_height="wrap_content" />
  46. android_layout_width="match_parent"
  47. android_layout_height="wrap_content"
  48. android_orientation="vertical">
  49. android_id="@+id/btn_album"
  50. android_layout_width="wrap_content"
  51. android_layout_height="wrap_content"
  52. android_text="@string/tv_album" />
  53. android_layout_width="wrap_content"
  54. android_layout_height="wrap_content"
  55. android_text="图片接收显示" />
  56. android_id="@+id/iv_receive_message"
  57. android_layout_width="200dp"
  58. android_layout_height="200dp" />
  59. 声明:本站部分文章及图片源自用户投稿,如本站任何资料有侵权请您尽早请联系jinwei@zod.com.cn进行处理,非常感谢!

上一篇 2022年7月26日
下一篇 2022年7月26日

相关推荐