summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings/IconPreferenceScreen.java
diff options
context:
space:
mode:
authorAmith Yamasani <yamasani@google.com>2010-08-18 13:59:28 -0700
committerAmith Yamasani <yamasani@google.com>2010-08-18 22:59:33 -0700
commitd79934731c8d33f6fc63b21c120b9ffba5d06f54 (patch)
tree2edb1cb461f5933faf26bdffc5522d9e00f9b808 /src/com/android/settings/IconPreferenceScreen.java
parent3a9cf0363618bfadeaa5df2460fa615922bd8c75 (diff)
downloadpackages_apps_Settings-d79934731c8d33f6fc63b21c120b9ffba5d06f54.zip
packages_apps_Settings-d79934731c8d33f6fc63b21c120b9ffba5d06f54.tar.gz
packages_apps_Settings-d79934731c8d33f6fc63b21c120b9ffba5d06f54.tar.bz2
Refactor settings top level activities to use fragments.
Added a base class SettingsPreferenceFragment from which the settings activities should be derived so that they can behave like fragments. It contains some commonly called utility methods and dialog conversion to DialogFragment. Some of the top-level activities can be launched directly without the left pane. Settings.java acts as a proxy activity that contains just that settings fragment without the left pane. There are still a lot of second and third level activities that need to be fragmentized. This is just the first pass to test the 2-pane layout.
Diffstat (limited to 'src/com/android/settings/IconPreferenceScreen.java')
-rw-r--r--src/com/android/settings/IconPreferenceScreen.java11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/com/android/settings/IconPreferenceScreen.java b/src/com/android/settings/IconPreferenceScreen.java
index 31abf0a..64fce29 100644
--- a/src/com/android/settings/IconPreferenceScreen.java
+++ b/src/com/android/settings/IconPreferenceScreen.java
@@ -22,13 +22,16 @@ import android.graphics.drawable.Drawable;
import android.preference.Preference;
import android.util.AttributeSet;
import android.view.View;
-import android.view.ViewGroup;
import android.widget.ImageView;
+import android.widget.TextView;
public class IconPreferenceScreen extends Preference {
private Drawable mIcon;
+ // Whether or not the text and icon should be highlighted (as selected)
+ private boolean mHighlight;
+
public IconPreferenceScreen(Context context, AttributeSet attrs) {
this(context, attrs, 0);
}
@@ -48,6 +51,7 @@ public class IconPreferenceScreen extends Preference {
if (imageView != null && mIcon != null) {
imageView.setImageDrawable(mIcon);
}
+ TextView textView = (TextView) view.findViewById(android.R.id.title);
}
/**
@@ -71,4 +75,9 @@ public class IconPreferenceScreen extends Preference {
public Drawable getIcon() {
return mIcon;
}
+
+ public void setHighlighted(boolean highlight) {
+ mHighlight = highlight;
+ notifyChanged();
+ }
}