3

Android SDK 18 を使用したプロジェクトがあり、appcompat のサポート v4 と v7 を使用しています。Android サポート v4 を使用するレイアウトを作成すると、グラフィカル レイアウト ユーティリティを使用できません。ボタンの位置を変更すると、ボタンが消えます。レイアウトの展開可能なリストは引き出しです。どうすればこの問題を解決できますか?

<android.support.v4.widget.DrawerLayout  

    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/drawer_layout"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    >

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent" >

        <Button
            android:id="@+id/button1"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentRight="true"
            android:layout_alignParentTop="true"
            android:layout_marginRight="36dp"
            android:layout_marginTop="33dp"
            android:text="Button" />

        <Button
            android:id="@+id/button2"
            style="?android:attr/buttonStyleSmall"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_above="@+id/toggleButton1"
            android:layout_alignParentLeft="true"
            android:layout_marginBottom="29dp"
            android:layout_marginLeft="32dp"
            android:text="Button" />

        <ToggleButton
            android:id="@+id/toggleButton1"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentBottom="true"
            android:layout_alignParentRight="true"
            android:layout_marginBottom="67dp"
            android:layout_marginRight="18dp"
            android:text="ToggleButton" />

    </RelativeLayout>

    <ExpandableListView
        android:id="@+id/left_drawer"
        android:layout_width="240dp"
        android:layout_height="match_parent"
        android:layout_gravity="start"
        android:choiceMode="singleChoice"
        android:divider="@android:color/transparent"
        android:dividerHeight="0dp"
        android:background="#2266b3"/>
        <!--android:groupIndicator="@drawable/settings_selector"-->

 </android.support.v4.widget.DrawerLayout>
4

0 に答える 0