我的布局底部有一个滑动抽屉。我想将一个单元格显示为默认单元格。我被困在这几个小时,所以任何建议或想法将不胜感激。
这是我的XML文件:
<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" >
<!-- The main content view -->
<FrameLayout
android:id="@+id/content_frame"
android:layout_width="match_parent"
android:layout_height="match_parent" >
</FrameLayout>
<!-- The navigation drawer -->
<SlidingDrawer
android:id="@+id/slidingDrawer1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:content="@+id/content"
android:handle="@+id/handle" >
<Button
android:id="@+id/handle"
android:layout_width="match_parent"
android:layout_height="30dp"
android:background="@color/Red"
android:text="Notification"
android:textColor="@color/White" />
<LinearLayout
android:id="@+id/content"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@color/LightGrey">
<ListView
android:id="@+id/notificationList"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:listSelector="@drawable/listselector_yellow"
>
</ListView>
<View
android:id="@+id/dummieView"
android:layout_width="match_parent"
android:layout_height="800dp"
android:background="@color/LightGrey" >
</View>
</LinearLayout>
</SlidingDrawer>
<ListView
android:id="@+id/left_drawer"
android:layout_width="240dp"
android:layout_height="match_parent"
android:layout_gravity="start"
android:background="@color/White"
android:choiceMode="singleChoice"
android:dividerHeight="1dp"
android:divider="@color/LightGrey"
/>
</android.support.v4.widget.DrawerLayout>