summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChung-yih Wang <cywang@google.com>2010-12-03 01:49:47 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2010-12-03 01:49:47 -0800
commit1970f8a3a2d03b0d0797ee9faebb2b4499c58beb (patch)
tree2f4b9a4dac5dd3926b4630eba7dec089b1c154ad /src
parent8a66efdc845a5fdf0750d0fd6a2a92ecbcf77fce (diff)
parent1d12db9c16f57894aee41d004b4e21d684cc269d (diff)
downloadLegacyCamera-1970f8a3a2d03b0d0797ee9faebb2b4499c58beb.zip
LegacyCamera-1970f8a3a2d03b0d0797ee9faebb2b4499c58beb.tar.gz
LegacyCamera-1970f8a3a2d03b0d0797ee9faebb2b4499c58beb.tar.bz2
Merge "Highlight the selected setting in popup windows."
Diffstat (limited to 'src')
-rw-r--r--src/com/android/camera/ui/AbstractSettingPopup.java19
-rw-r--r--src/com/android/camera/ui/BasicSettingPopup.java6
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();