summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/ui/OtherSettingsPopup.java
diff options
context:
space:
mode:
authorWu-cheng Li <wuchengli@google.com>2010-11-17 15:53:32 +0800
committerWu-cheng Li <wuchengli@google.com>2010-11-26 11:48:15 +0800
commit9b7bfbc8ac25f1df20b7ed0aa79bf1f36299e981 (patch)
tree740aa1b58c30aaedb5cc42dccfe976d8cfb0f0b2 /src/com/android/camera/ui/OtherSettingsPopup.java
parent59ddc8c1add2fcffe523e3877baad1b6cc5ba2fb (diff)
downloadpackages_apps_LegacyCamera-9b7bfbc8ac25f1df20b7ed0aa79bf1f36299e981.zip
packages_apps_LegacyCamera-9b7bfbc8ac25f1df20b7ed0aa79bf1f36299e981.tar.gz
packages_apps_LegacyCamera-9b7bfbc8ac25f1df20b7ed0aa79bf1f36299e981.tar.bz2
Add title and its holo background for settings.
bug:3226752 Change-Id: I10d2430fb2db9283fa080284f9ad6c043d056865
Diffstat (limited to 'src/com/android/camera/ui/OtherSettingsPopup.java')
-rw-r--r--src/com/android/camera/ui/OtherSettingsPopup.java16
1 files changed, 4 insertions, 12 deletions
diff --git a/src/com/android/camera/ui/OtherSettingsPopup.java b/src/com/android/camera/ui/OtherSettingsPopup.java
index 099bae4..e5dc7ec 100644
--- a/src/com/android/camera/ui/OtherSettingsPopup.java
+++ b/src/com/android/camera/ui/OtherSettingsPopup.java
@@ -29,7 +29,7 @@ import android.view.ViewGroup;
import android.widget.LinearLayout;
/* A popup window that contains several camera settings. */
-public class OtherSettingsPopup extends LinearLayout
+public class OtherSettingsPopup extends AbstractSettingPopup
implements InLineSettingPicker.Listener {
private static final String TAG = "OtherSettingsPopup";
private Listener mListener;
@@ -44,26 +44,18 @@ public class OtherSettingsPopup extends LinearLayout
public OtherSettingsPopup(Context context, AttributeSet attrs) {
super(context, attrs);
-
- // Use system holo background.
- Theme dialogTheme = getResources().newTheme();
- dialogTheme.applyStyle(android.R.style.Theme_Holo_Dialog, true);
- TypedArray ta = dialogTheme.obtainStyledAttributes(new int[] {
- android.R.attr.windowBackground });
- setBackgroundDrawable(ta.getDrawable(0));
- ta.recycle();
}
public void initialize(PreferenceGroup group) {
// Initialize each camera setting.
- for (int i = getChildCount() - 1; i >= 0; i--) {
- InLineSettingPicker picker = (InLineSettingPicker) getChildAt(i);
+ for (int i = mContentPanel.getChildCount() - 1; i >= 0; i--) {
+ InLineSettingPicker picker = (InLineSettingPicker) mContentPanel.getChildAt(i);
ListPreference pref = group.findPreference(picker.getKey());
if (pref != null) {
picker.setSettingChangedListener(this);
picker.initialize(pref);
} else { // remove the row if the preference is not supported
- removeViewAt(i);
+ mContentPanel.removeViewAt(i);
}
}
requestLayout();