android - 如何设计这样的群聊
问题描述
如何设计群聊资料?
解决方案
您只希望图片比其他图片高 1 吗?你可以使用RelativeLayout,它会把它们放在一起,然后你可以使用边距来根据需要移动它们。您也可以使用 toEndOf 参数,然后赋予负边距值以使它们部分重叠。例子
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<ImageButton
android:layout_width="50dp"
android:layout_height="50dp"
android:background="@null"
android:id="@+id/test_1"
android:src="@drawable/your_image_1"/>
<ImageButton
android:layout_width="50dp"
android:layout_height="50dp"
android:background="@null"
android:id="@+id/test_2"
android:layout_toEndOf="@id/test_1"
android:layout_marginStart="-20dp"
android:src="@drawable/your_image_2"/>
</RelativeLayout>
推荐阅读
- ruby - Ruby:如何以最简单的方式并行运行任务
- python - Python 对象,`__name__` 存储在哪里?
- python - if...elif...else 总是以 elif 结尾,即使 elif 不满意?
- reactjs - 重构 AutoHeightWebView 库以获取在单独的浏览器中打开的超链接
- python - 在 python 中的函数调用期间命名空间如何工作?
- javascript - 如何使用 ES6 语法将选择选项的值转换为简单的数组?
- c# - 将密钥发送到由我的应用程序启动的进程不起作用
- xcode - Xcode 11.1 查看控制器在当前 VC 下可见时以模态方式呈现
- javascript - 我可以使用 PropTypes 来表示一个 prop 是一个 Promise 吗?
- sas - SAS 问题:选项区域设置值与服务器版本不同。为什么?