summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/ui/OtherSettingsPopup.java
diff options
context:
space:
mode:
authorWu-cheng Li <wuchengli@google.com>2010-11-04 17:00:10 +0800
committerWu-cheng Li <wuchengli@google.com>2010-11-12 18:02:20 +0800
commit02ec7c0880ded5863d73d6f173ef35ab5c888dcd (patch)
treec00359850092e801bc3d0f593fd0ae5c934b2dcd /src/com/android/camera/ui/OtherSettingsPopup.java
parent819a9652eecc729dcc6d642fd59ff0a1b7908c3e (diff)
downloadLegacyCamera-02ec7c0880ded5863d73d6f173ef35ab5c888dcd.zip
LegacyCamera-02ec7c0880ded5863d73d6f173ef35ab5c888dcd.tar.gz
LegacyCamera-02ec7c0880ded5863d73d6f173ef35ab5c888dcd.tar.bz2
Change setting picker to popup window.
UI was re-designed. bug:3156666 Change-Id: Id40fab084f59cdeca8e2991dc8b3768fcac8e0bf
Diffstat (limited to 'src/com/android/camera/ui/OtherSettingsPopup.java')
-rw-r--r--src/com/android/camera/ui/OtherSettingsPopup.java19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/com/android/camera/ui/OtherSettingsPopup.java b/src/com/android/camera/ui/OtherSettingsPopup.java
index feacb6b..862645e 100644
--- a/src/com/android/camera/ui/OtherSettingsPopup.java
+++ b/src/com/android/camera/ui/OtherSettingsPopup.java
@@ -19,14 +19,15 @@ package com.android.camera.ui;
import com.android.camera.ListPreference;
import com.android.camera.PreferenceGroup;
+import android.content.Context;
+import android.util.AttributeSet;
import android.util.Log;
import android.view.View;
-import android.widget.PopupWindow;
+import android.view.ViewGroup;
import android.widget.TableLayout;
-import android.widget.TableRow;
/* A popup window that contains several camera settings. */
-public class OtherSettingsPopup extends PopupWindow
+public class OtherSettingsPopup extends TableLayout
implements InLineSettingPicker.Listener {
private static final String TAG = "OtherSettingsPopup";
private Listener mListener;
@@ -39,23 +40,21 @@ public class OtherSettingsPopup extends PopupWindow
mListener = listener;
}
- public OtherSettingsPopup(View contentView, int width, int height,
- boolean focusable) {
- super(contentView, width, height, focusable);
+ public OtherSettingsPopup(Context context, AttributeSet attrs) {
+ super(context, attrs);
}
public void initialize(PreferenceGroup group) {
- TableLayout table = (TableLayout) getContentView();
// Initialize each camera setting.
- for (int i = table.getChildCount() - 1; i >= 0 ; i--) {
- TableRow row = (TableRow) table.getChildAt(i);
+ for (int i = getChildCount() - 1; i >= 0 ; i--) {
+ ViewGroup row = (ViewGroup) getChildAt(i);
InLineSettingPicker picker = (InLineSettingPicker) row.getChildAt(1);
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
- table.removeViewAt(i);
+ removeViewAt(i);
}
}
}