I have been developing an app for which I also need to handle the UI stuff too.
Heres my 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>
Now the problem is the width of the right column. It is exceeding the devices' width. For example the name of the mobile which has an attribute of android:layout_gravity set as Center. But its not working as expected as you can see in the screenshot below:

What should I be using to keep the width with in limits as the text is dynamic.
I had a similar problem using a GridLayout with fill_horizontal. The solution for me was to set android:layout_width="0dp" so you might want to try that for all views in your second column.
Source
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With