如何解决Android TableRow定位
| 我想为我的游戏制作一种武器选择器。它由左箭头,武器图像和右箭头组成。 我的方法是这样的:<?xml version=\"1.0\" encoding=\"utf-8\"?>
<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"
android:layout_width=\"fill_parent\" android:layout_height=\"fill_parent\"
android:orientation=\"vertical\">
<TableRow android:layout_width=\"fill_parent\"
android:layout_height=\"fill_parent\"
android:gravity=\"bottom\" android:orientation=\"horizontal\">
<ImageView android:layout_width=\"wrap_content\"
android:layout_height=\"wrap_content\" android:src=\"@drawable/larrow\"
android:id=\"@+id/img_larrow\" />
<ImageView android:layout_height=\"wrap_content\"
android:layout_width=\"wrap_content\" android:src=\"@drawable/ak47\"
android:id=\"@+id/img_ak47\" />
<ImageView android:layout_width=\"wrap_content\"
android:layout_height=\"wrap_content\" android:src=\"@drawable/rarrow\"
android:id=\"@+id/img_rarrow\" />
</TableRow>
问题是,我想将其放置在底部中心。到目前为止,我可以通过TableRow的android:gravity属性将其定位在底部或顶部中心。 android:gravity有\“ bottom \”和\“ center_horizontal \”属性,而底部中心没有属性。有人知道怎么做吗?
解决方法
您应该能够像这样ѭ1组合两个
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。