I want to find suitable layout to wrap buttons instead strange streching.
Some example is what I get:
What I want achieve:
Please help and explain if it possible in Android what is quite easy in HTML5 - I thinking about ScrollView but not sure if it is required. I am search many pages but not find good solution and think that is trivial but not know the answer.
Here is current code:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity" >
<Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Button"
tools:ignore="HardcodedText" />
<Button
android:id="@+id/btn_goHome"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_toRightOf="@+id/button1"
android:text="@string/button_go_home" />
<Button
android:id="@+id/btn_openEmails"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_toRightOf="@+id/btn_goHome"
android:text="@string/button_open_emails" />
<Button
android:id="@+id/btn_openTests"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_toRightOf="@+id/btn_openEmails"
android:text="Open tests" />
<ScrollView
android:id="@+id/scrollView1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@id/btn_openTests"
android:layout_centerHorizontal="true" >
<LinearLayout
android:id="@+id/list1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:divider="?android:dividerHorizontal"
android:orientation="vertical"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:showDividers="middle" >
</LinearLayout>
</ScrollView>
</RelativeLayout>