summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/IconListPreference.java
diff options
context:
space:
mode:
authorByunghun Jeon <bjeon@codeaurora.org>2014-06-16 17:42:26 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2014-11-17 17:49:35 -0800
commit41d18fed018678492323150c661f2b9f6c8931a8 (patch)
tree5154564878f6b61b1edc68ee8241cf0166ca210e /src/com/android/camera/IconListPreference.java
parent0231aab003276d2142fe745e50d6eb44e3f11c9c (diff)
downloadandroid_packages_apps_Snap-41d18fed018678492323150c661f2b9f6c8931a8.tar.gz
android_packages_apps_Snap-41d18fed018678492323150c661f2b9f6c8931a8.tar.bz2
android_packages_apps_Snap-41d18fed018678492323150c661f2b9f6c8931a8.zip
SnapdragonCamera: Modify SnapdragonCamera UI
Modified SnapdragonCamera setting menus with new icons Change-Id: I726296dfb100ac81ad6f1cd84420ae27c0ae1201
Diffstat (limited to 'src/com/android/camera/IconListPreference.java')
-rw-r--r--src/com/android/camera/IconListPreference.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/com/android/camera/IconListPreference.java b/src/com/android/camera/IconListPreference.java
index eab0d613e..9c7463eda 100644
--- a/src/com/android/camera/IconListPreference.java
+++ b/src/com/android/camera/IconListPreference.java
@@ -31,6 +31,7 @@ public class IconListPreference extends ListPreference {
private int mIconIds[];
private int mLargeIconIds[];
private int mImageIds[];
+ private int mThumbnailIds[];
private boolean mUseSingleIcon;
public IconListPreference(Context context, AttributeSet attrs) {
@@ -46,6 +47,8 @@ public class IconListPreference extends ListPreference {
R.styleable.IconListPreference_largeIcons, 0));
mImageIds = getIds(res, a.getResourceId(
R.styleable.IconListPreference_images, 0));
+ mThumbnailIds = getIds(res, a.getResourceId(
+ R.styleable.IconListPreference_thumbnails, 0));
a.recycle();
}
@@ -61,6 +64,10 @@ public class IconListPreference extends ListPreference {
return mLargeIconIds;
}
+ public int[] getThumbnailIds() {
+ return mThumbnailIds;
+ }
+
public int[] getImageIds() {
return mImageIds;
}
@@ -77,6 +84,10 @@ public class IconListPreference extends ListPreference {
mLargeIconIds = largeIconIds;
}
+ public void setThumbnailIds(int[] thumbnailIds) {
+ mThumbnailIds = thumbnailIds;
+ }
+
public void setUseSingleIcon(boolean useSingle) {
mUseSingleIcon = useSingle;
}
@@ -99,12 +110,14 @@ public class IconListPreference extends ListPreference {
IntArray iconIds = new IntArray();
IntArray largeIconIds = new IntArray();
IntArray imageIds = new IntArray();
+ IntArray thumbnailIds = new IntArray();
for (int i = 0, len = entryValues.length; i < len; i++) {
if (supported.indexOf(entryValues[i].toString()) >= 0) {
if (mIconIds != null) iconIds.add(mIconIds[i]);
if (mLargeIconIds != null) largeIconIds.add(mLargeIconIds[i]);
if (mImageIds != null) imageIds.add(mImageIds[i]);
+ if (mThumbnailIds != null) thumbnailIds.add(mThumbnailIds[i]);
}
}
if (mIconIds != null) mIconIds = iconIds.toArray(new int[iconIds.size()]);
@@ -112,6 +125,7 @@ public class IconListPreference extends ListPreference {
mLargeIconIds = largeIconIds.toArray(new int[largeIconIds.size()]);
}
if (mImageIds != null) mImageIds = imageIds.toArray(new int[imageIds.size()]);
+ if (mThumbnailIds != null) mThumbnailIds = thumbnailIds.toArray(new int[thumbnailIds.size()]);
super.filterUnsupported(supported);
}
}