9
Is there any way to wrap Image buttons in Horizontal Linear Layout? Or is there any other way to do the following thing?
I have six image buttons. Suppose these buttons are appearing in a mid resolution device like this:
Image button 1 | Image button 2 | Image button 3 | (1st row)
Image button 4 | Image button 5 | Image button 6 | (2nd row)
I want these buttons to appear in a tablet or any high resolution device like this:
Image button 1 | Image button 2 | Image button 3 | Image button 4 | (1st row)
Image button 5 | Image button 6 | (2nd row)
Or like this:
Image button 1 | Image button 2 | Image button 3 | Image button 4 | Image button 5 |
Image button 6 |
According to device screens.
Here is my main XML file:
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@layout/back2">
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@layout/back2">
<TextView
android:layout_width="fill_parent"
android:layout_height="50dp"
android:background="@layout/button5"
android:gravity="center"
android:orientation="vertical"
android:text="@string/hello"
android:textColor="#D5D5D5"
android:textSize="20sp" />
<com.google.ads.AdView android:id="@+id/adView"
android:layout_width="wrap_content"
android:layout_he