【发布时间】:2014-02-04 22:27:38
【问题描述】:
我一直在开发一个应用程序,我还需要处理它的 UI 内容。
这是我的 XML:
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<GridLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:columnCount="2" >
<ImageView />
<TextView />
.
.
</GridLayout>
</ScrollView>
现在问题是右列的宽度。它超出了设备的宽度。例如具有android:layout_gravity 属性设置为中心的手机名称。但正如您在下面的屏幕截图中看到的那样,它没有按预期工作:
由于文本是动态的,我应该使用什么来限制宽度。
【问题讨论】:
标签: android user-interface grid-layout