1

RelativeLayout でコンテンツの高さと幅をラップしようとしています。幅は問題ないようですが、高さは折り返されません。画面全体をカバーしています。理由を知っている人はいますか?

<?xml version="1.0" encoding="utf-8"?>



   <com.company.things.CameraControls
       xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/camera_control_view"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content" >


    <RelativeLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:background="#60FFFFFF" >

        <Button
            android:id="@+id/button1"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentBottom="true"
            android:layout_alignParentRight="true"
            android:onClick="clearDrawing"
            android:text="@string/clear" />

        <SeekBar
            android:id="@+id/sensitivity_seek"
            android:layout_width="250dp"
            android:layout_height="wrap_content"
            android:layout_alignParentBottom="true"
            android:layout_alignParentLeft="true" />

        <Switch
            android:id="@+id/live_switch"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignTop="@+id/sensitivity_seek"
            android:layout_toRightOf="@+id/sensitivity_seek"
            android:text="@string/live" />

    </RelativeLayout>

</com.company.things.CameraControls>
4

1 に答える 1

1

これは、UI 要素をページの下部に配置したためです。

于 2014-11-06T16:21:21.750 に答える