3

我正在设计一个搜索一堆项目的应用程序,我想知道是否有办法在 SlidingDrawer 中放置类似首选项的布局(类似于共享首选项),以便我可以过滤结果。我不介意它是否真的使用 Shared Preferences 系统(而且我发现它根本不可能),尽管它会是一个加号。所以,如前所述:

有没有办法在另一个布局中插入偏好布局?

我包括我的代码,以防万一。

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent" android:layout_height="fill_parent">
    <ListView android:layout_height="fill_parent" android:id="@+id/lista_recetas"
        android:layout_width="fill_parent" android:layout_alignParentTop="true"
        android:paddingBottom="40dip"></ListView>
    <SlidingDrawer android:layout_alignParentBottom="true"
        android:id="@+id/slidingDrawer" android:layout_width="fill_parent"
        android:layout_height="fill_parent" android:handle="@+id/handle"
        android:content="@+id/content">
        <LinearLayout android:id="@+id/handle"
            android:layout_width="fill_parent" android:layout_height="40dip"
            android:background="#000000"></LinearLayout>
        <LinearLayout android:id="@+id/content"
            android:layout_width="fill_parent" android:layout_height="fill_parent"
            android:background="#333333">
            <ExpandableListView android:layout_width="fill_parent"
                android:layout_height="fill_parent"></ExpandableListView>
        </LinearLayout>
    </SlidingDrawer>
</RelativeLayout>

提前致谢。

4

0 回答 0