3
我一直在開發一個應用程序,我也需要處理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
的移動設備的名稱。但它不工作像預期的那樣,你可以在下面的截圖中看到:
我應該怎麼使用,以保持寬度與限制的文本是動態的。