こんにちは私はScrollViewにLinearLayoutを持っています このLinearLayoutでは、いくつかのチェックボックスと ボタンが下部にあります。 垂直ビューでは正常ですが水平ビューで ボタンが消えます。ボタンが水平方向に消える
あなたはスクリーンショットにこの状況を見ることができます:もちろん
垂直ビュー
水平視野
をsrclolli doesntのヘルプ
をダウンngのこれが私のxml
<ScrollView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="80dp"
android:layout_marginLeft="10dp"
>
<CheckBox android:id="@+id/hotele"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hotele"
android:textSize="18sp"
android:layout_margin="5dp"
android:checked="true"
/>
<!-- more checkboxs... -->
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
xmlns:android="http://schemas.android.com/apk/res/android">
<Button
android:id="@+id/gotowe"
android:layout_width="160dp"
android:layout_height="wrap_content"
android:layout_marginTop="30dp"
android:background="@color/colorPrimary"
android:padding="5dp"
android:text="Gotowe"
android:textColor="#fff"
android:textSize="16sp"
android:layout_centerInParent="true"
android:textAllCaps="false"/>
</RelativeLayout>
</LinearLayout>
</ScrollView>
スクロールしましたか? –
もちろん馬鹿はありません:) – Agnes
最初の線形レイアウトは、高さのためにwrap_contentである必要があります。 –