Can I include a preference in Layout like how we include a layout in another layout using <include layout=""/>
tag.
My layout code goes like this
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="@dimen/padding_medium"
android:text="@string/hello_world"
tools:context=".MainActivity" />
<include layout="@layout/settings"/>
<!-- <include layout="@xml/set_variables"/> -->
</LinearLayout>
in the above layout i am trying to include preference @xml/set_variables
but my application will crash if i uncomment <include layout="@xml/set_variables"/>
. Please can any one suggest is there any way to include preference in layout or just I should forget this .