1
我想做一个聊天室泡泡listview,我遇到了一个问题; 右泡沫布局XML如下如何构建“从右到左”的线性布局?
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:card_view="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="end"
android:orientation="horizontal" >
<TextView
android:id="@+id/textMsg"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<ImageView
android:id="@+id/portrait"
android:layout_width="40dip"
android:layout_height="40dip" />
</LinearLayout>
,结果看起来像图片,为什么它出门左边框的
我们强烈建议您使用TextView来存放**复合可绘制**,而不是使用“TextView/ImageView对”。为**更好的表演** –