From 0603d3c9b14452961802f44e1c4bdd0a58768519 Mon Sep 17 00:00:00 2001 From: Michael Rapp Date: Sun, 19 Apr 2015 20:12:05 +0200 Subject: [PATCH] The FrameLayout of a PreferenceFragment can now be accessed using the ID R.id.preference_fragment_frame_layout. --- res/values/ids.xml | 1 + src/de/mrapp/android/preference/activity/PreferenceFragment.java | 1 + 2 files changed, 2 insertions(+) diff --git a/res/values/ids.xml b/res/values/ids.xml index 757759b..416245b 100644 --- a/res/values/ids.xml +++ b/res/values/ids.xml @@ -39,5 +39,6 @@ License along with this program. If not, see + \ No newline at end of file diff --git a/src/de/mrapp/android/preference/activity/PreferenceFragment.java b/src/de/mrapp/android/preference/activity/PreferenceFragment.java index dcde5dc..0c4d6fa 100644 --- a/src/de/mrapp/android/preference/activity/PreferenceFragment.java +++ b/src/de/mrapp/android/preference/activity/PreferenceFragment.java @@ -143,6 +143,7 @@ private void initializeListView() { listView = (ListView) parentView.findViewById(android.R.id.list); parentView.removeView(listView); frameLayout = new FrameLayout(getActivity()); + frameLayout.setId(R.id.preference_fragment_frame_layout); parentView.addView(frameLayout, listView.getLayoutParams()); frameLayout.addView(listView, FrameLayout.LayoutParams.MATCH_PARENT, FrameLayout.LayoutParams.MATCH_PARENT);