Take the 2-minute tour ×

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.

    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"
    <SlidingDrawer android:layout_alignParentBottom="true"
        android:id="@+id/slidingDrawer" android:layout_width="fill_parent"
        android:layout_height="fill_parent" android:handle="@+id/handle"
        <LinearLayout android:id="@+id/handle"
            android:layout_width="fill_parent" android:layout_height="40dip"
        <LinearLayout android:id="@+id/content"
            android:layout_width="fill_parent" android:layout_height="fill_parent"
            <ExpandableListView android:layout_width="fill_parent"

Thanks in advance.

share|improve this question
add comment

1 Answer

up vote -1 down vote accepted


check this link. it might be helpful

share|improve this answer
if it is adding as a seprate xml it sholud be possible to place it under another layout as well. try and let us know the result –  Javanator Feb 21 '11 at 9:01
Thanks, that example is really clarifying, but it's not what I'm looking for. As far as I know, preferences work a bit different from normal layouts. You can't insert preference tags into a normal layout, so I'm not sure at all if it is possible to do that preference-normal activity combo. –  Korcholis Feb 21 '11 at 11:11
did you tried it in embedding it in some layout of yours. Moreover if it is not accomodating in the Sliding Drawer . then design the layout for your self what so tough in this. Preference Activity Just prevent us from code and desgin headache but if it is not accomodating then i would have desgined it and filled it in my drawer and managed the all preference by code itself –  Javanator Feb 21 '11 at 11:14
if any how this answer helps you out then also accept it by clicking the check on left side of answer. –  Javanator Feb 21 '11 at 11:16
add comment

Your Answer


