在另一个 Activity 和布局中插入类似 Android 首选项的内容
我正在设计一个搜索一堆项目的应用程序,我想知道是否有一种方法可以在 SlidingDrawer 中放置类似首选项的布局(类似于共享首选项),以便我可以过滤结果。我不介意它是否真的使用共享首选项系统(而且我发现根本不可能),尽管这将是一个优点。因此,如上所述:
有没有办法在另一个布局中插入首选项布局?
我包含了我的代码,以防万一。
<?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>
提前致谢。
I'm designing an application that searches a bunch of items and I was wondering if there was a way to place a Preferences-like layout (similar to Shared Preferences) inside a SlidingDrawer, for example, so I could filter the results. I don't mind whether it actually uses the Shared Preferences system or not (and I don't find it possible at all), though it would be a plus. So, as mentioned:
Is there a way to insert a Preference layout inside another layout?
I include my code, just in case.
<?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>
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论