For my preference screen xml, I want to inflate a custom layout. Here is my preference screen xml:
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
-----
-----
<Preference
android:key="preview"
android:layout="@layout/redesign_preview_pref_layout"
android:persistent="false"
android:title="@string/setting_preview" />
Everything is working for this screen except "preview" preference. It is not inflating the "redesign_preview_pref_layout" layout.
Here is "redesign_preview_pref_layout" layout code:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="15dp" >
<TextView
android:id="@+id/previewScreen"
android:layout_width="match_parent"
android:layout_height="48dp"
android:background="@color/half_transpernt_button_color"
android:gravity="center"
android:text="@string/pref_preview_button"
android:textColor="@android:color/white"
android:textSize="16sp" />
</LinearLayout>
Can someone help me by telling what am I doing wrong? Thanks for any help