diff options
author | Andrew Lee <anwlee@google.com> | 2015-02-26 22:18:13 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-02-26 22:18:13 +0000 |
commit | eb2097d840ac4e2f8709041cb7c9282697a309af (patch) | |
tree | b8deee744f68ec729cf258ddeb96874ec4ffb4ec /src | |
parent | 7aed923a6f4370876c1f218550220c0394024b02 (diff) | |
parent | dd9dc5ae60a991ab7e4203c4b539d1dd4811b59a (diff) |
Merge "Add DisplayOptions PreferenceFragment."
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/dialer/settings/DialerSettingsActivity.java | 5 | ||||
-rw-r--r-- | src/com/android/dialer/settings/DisplayOptionsFragment.java | 31 |
2 files changed, 36 insertions, 0 deletions
diff --git a/src/com/android/dialer/settings/DialerSettingsActivity.java b/src/com/android/dialer/settings/DialerSettingsActivity.java index 0d4b96933..935b6c7fd 100644 --- a/src/com/android/dialer/settings/DialerSettingsActivity.java +++ b/src/com/android/dialer/settings/DialerSettingsActivity.java @@ -36,6 +36,11 @@ public class DialerSettingsActivity extends PreferenceActivity { @Override public void onBuildHeaders(List<Header> target) { + Header displayOptionsHeader = new Header(); + displayOptionsHeader.titleRes = R.string.display_options_title; + displayOptionsHeader.fragment = DisplayOptionsFragment.class.getName(); + target.add(displayOptionsHeader); + Header generalSettingsHeader = new Header(); generalSettingsHeader.titleRes = R.string.general_settings_label; generalSettingsHeader.fragment = GeneralSettingsFragment.class.getName(); diff --git a/src/com/android/dialer/settings/DisplayOptionsFragment.java b/src/com/android/dialer/settings/DisplayOptionsFragment.java new file mode 100644 index 000000000..3a932d5fe --- /dev/null +++ b/src/com/android/dialer/settings/DisplayOptionsFragment.java @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2015 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License + */ + +package com.android.dialer.settings; + +import android.os.Bundle; +import android.preference.PreferenceFragment; + +import com.android.dialer.R; + +public class DisplayOptionsFragment extends PreferenceFragment { + + @Override + public void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + addPreferencesFromResource(R.xml.display_options); + } +} |