奇妙なストレッチではなく、ボタンをラップする適切なレイアウトを見つけたいです。
いくつかの例は私が得るものです:
私が達成したいこと:
HTML5で非常に簡単なことをAndroidで可能であれば、助けて説明してください-ScrollViewについて考えていますが、必要かどうかはわかりません。私は多くのページを検索していますが、良い解決策が見つかりません。それは些細なことだと思いますが、答えはわかりません。
現在のコードは次のとおりです。
<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>