diff options
Diffstat (limited to 'src/com/android/camera')
| -rw-r--r-- | src/com/android/camera/ui/AbstractSettingPopup.java | 19 | ||||
| -rw-r--r-- | src/com/android/camera/ui/BasicSettingPopup.java | 6 |
2 files changed, 3 insertions, 22 deletions
diff --git a/src/com/android/camera/ui/AbstractSettingPopup.java b/src/com/android/camera/ui/AbstractSettingPopup.java index 314dcab..f82e98b 100644 --- a/src/com/android/camera/ui/AbstractSettingPopup.java +++ b/src/com/android/camera/ui/AbstractSettingPopup.java @@ -42,25 +42,6 @@ abstract public class AbstractSettingPopup extends LinearLayout { super.onFinishInflate(); mTitle = (TextView) findViewById(R.id.title); - View topPanel = findViewById(R.id.topPanel); mContentPanel = (ViewGroup) findViewById(R.id.contentPanel); - - // Use system holo background for now. - // TODO: We need to add alpha to the background. - Context context = getContext(); - Theme dialogTheme = context.getResources().newTheme(); - dialogTheme.applyStyle(android.R.style.Theme_Holo, true); - TypedArray ta = dialogTheme.obtainStyledAttributes(new int[] { - android.R.attr.alertDialogStyle }); - int resourceId = ta.getResourceId(0, 0); - TypedArray ta2 = context.obtainStyledAttributes(resourceId, new int[] { - android.R.attr.topDark, - android.R.attr.bottomDark}); - - topPanel.setBackgroundDrawable(ta2.getDrawable(0)); - mContentPanel.setBackgroundDrawable(ta2.getDrawable(1)); - - ta.recycle(); - ta2.recycle(); } } diff --git a/src/com/android/camera/ui/BasicSettingPopup.java b/src/com/android/camera/ui/BasicSettingPopup.java index f0636a1..2f84caa 100644 --- a/src/com/android/camera/ui/BasicSettingPopup.java +++ b/src/com/android/camera/ui/BasicSettingPopup.java @@ -76,7 +76,7 @@ public class BasicSettingPopup extends AbstractSettingPopup implements TextView text = (TextView) row.findViewById(R.id.text); text.setText(entries[i].toString()); text.setClickable(false); - if (index == i) text.setPressed(true); + row.setPressed(index == i); // Initialize the icon. if (iconIds != null) { @@ -113,8 +113,8 @@ public class BasicSettingPopup extends AbstractSettingPopup implements int oldIndex = mPreference.findIndexOfValue(mPreference.getValue()); if (oldIndex != i) { View oldRow = group.getChildAt(oldIndex); - oldRow.findViewById(R.id.text).setPressed(false); - child.findViewById(R.id.text).setPressed(true); + oldRow.setPressed(false); + child.setPressed(true); mPreference.setValueIndex(i); if (mListener != null) { mListener.onSettingChanged(); |
