diff --git a/res/xml/inapp_notification_settings.xml b/res/xml/inapp_notification_settings.xml new file mode 100644 index 00000000000..7547f3c1444 --- /dev/null +++ b/res/xml/inapp_notification_settings.xml @@ -0,0 +1,26 @@ + + + + + + + + diff --git a/src/com/android/settings/notification/NotificationSettingsBase.java b/src/com/android/settings/notification/NotificationSettingsBase.java index 48ca207e339..78b763cee57 100644 --- a/src/com/android/settings/notification/NotificationSettingsBase.java +++ b/src/com/android/settings/notification/NotificationSettingsBase.java @@ -264,12 +264,9 @@ abstract public class NotificationSettingsBase extends SettingsPreferenceFragmen protected void addAppLinkPref() { if (mAppRow.settingsIntent != null && mAppLink == null) { - mAppLink = new Preference(getPrefContext()); - mAppLink.setKey(KEY_APP_LINK); - mAppLink.setOrder(500); + addPreferencesFromResource(R.xml.inapp_notification_settings); + mAppLink = (Preference) findPreference(KEY_APP_LINK); mAppLink.setIntent(mAppRow.settingsIntent); - mAppLink.setTitle(mContext.getString(R.string.app_settings_link)); - getPreferenceScreen().addPreference(mAppLink); } }