diff options
author | Deepanshu Gupta <deepanshu@google.com> | 2015-10-09 14:54:19 -0700 |
---|---|---|
committer | Deepanshu Gupta <deepanshu@google.com> | 2015-10-09 14:54:19 -0700 |
commit | 2f01cf2ea6d8cc07711fccd6157f33226a77da93 (patch) | |
tree | 00810d746b79883610204a35cda8509e9d2b6d02 /tools/layoutlib | |
parent | 9969f858c34ba7e35a977c819f2d1e24de586990 (diff) | |
download | frameworks_base-2f01cf2ea6d8cc07711fccd6157f33226a77da93.zip frameworks_base-2f01cf2ea6d8cc07711fccd6157f33226a77da93.tar.gz frameworks_base-2f01cf2ea6d8cc07711fccd6157f33226a77da93.tar.bz2 |
LayoutLib: Fix android:dependency for preferences.
Bug: http://b.android.com/189314
Change-Id: I229632d11a2529e865f3f2e8eca3a78b47ad462c
Diffstat (limited to 'tools/layoutlib')
-rw-r--r-- | tools/layoutlib/bridge/src/android/preference/Preference_Delegate.java | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/tools/layoutlib/bridge/src/android/preference/Preference_Delegate.java b/tools/layoutlib/bridge/src/android/preference/Preference_Delegate.java index 49ee642..2e44a77 100644 --- a/tools/layoutlib/bridge/src/android/preference/Preference_Delegate.java +++ b/tools/layoutlib/bridge/src/android/preference/Preference_Delegate.java @@ -29,9 +29,6 @@ import android.view.View; import android.view.ViewGroup; import android.widget.ListView; -import java.util.HashMap; -import java.util.Map; - /** * Delegate that provides implementation for native methods in {@link Preference} * <p/> @@ -59,9 +56,9 @@ public class Preference_Delegate { */ public static View inflatePreference(Context context, XmlPullParser parser, ViewGroup root) { PreferenceManager pm = new PreferenceManager(context); - PreferenceScreen ps = pm.getPreferenceScreen(); PreferenceInflater inflater = new BridgePreferenceInflater(context, pm); - ps = (PreferenceScreen) inflater.inflate(parser, ps, true); + PreferenceScreen ps = (PreferenceScreen) inflater.inflate(parser, null, true); + pm.setPreferences(ps); ListView preferenceView = createContainerView(context, root); ps.bind(preferenceView); return preferenceView; |