[英]Position two textviews around center. (Right and left aligned)
我有一个ListView
,每行有两个单词。 我希望这两个词在中心周围有一个小间隙。
类似于(一些随机词......):
Please Help
me !!
This should
not be
so hard
ListView
中的每一行都包含两个TextView
..
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal" >
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.4"
android:gravity="right" />
<View
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="0.2"
/>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.4"
android:gravity="left" />
</LinearLayout>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.