summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEthan Chen <intervigil@gmail.com>2013-12-12 18:18:32 -0800
committerGerrit Code Review <gerrit@cyanogenmod.org>2013-12-18 23:55:36 +0000
commit3cf4d9250091dd9e8644d78a6f9959f4f3af1732 (patch)
treee91abd3e0e46e13dc7a032cc18ca6cc656e29f06
parentfd68e408cc538108022068257688c0527874f0f6 (diff)
downloadandroid_packages_apps_Gallery2-stable/cm-10.2.tar.gz
android_packages_apps_Gallery2-stable/cm-10.2.tar.bz2
android_packages_apps_Gallery2-stable/cm-10.2.zip
Camera: Add indicator icon for burst modecm-10.2.1stable/cm-10.2
* Patchset places burst mode indicator next to auto-scene detect if active. Change-Id: Iba3f89490221b16dcce2531962f84752c00b1eef
-rwxr-xr-xres/drawable-hdpi/burst_mode_10.pngbin0 -> 3015 bytes
-rwxr-xr-xres/drawable-hdpi/burst_mode_15.pngbin0 -> 3188 bytes
-rwxr-xr-xres/drawable-hdpi/burst_mode_20.pngbin0 -> 3282 bytes
-rwxr-xr-xres/drawable-hdpi/burst_mode_5.pngbin0 -> 3046 bytes
-rwxr-xr-xres/drawable-mdpi/burst_mode_10.pngbin0 -> 2555 bytes
-rwxr-xr-xres/drawable-mdpi/burst_mode_15.pngbin0 -> 2546 bytes
-rwxr-xr-xres/drawable-mdpi/burst_mode_20.pngbin0 -> 2621 bytes
-rwxr-xr-xres/drawable-mdpi/burst_mode_5.pngbin0 -> 2457 bytes
-rwxr-xr-xres/drawable-xhdpi/burst_mode_10.pngbin0 -> 3648 bytes
-rwxr-xr-xres/drawable-xhdpi/burst_mode_15.pngbin0 -> 3994 bytes
-rwxr-xr-xres/drawable-xhdpi/burst_mode_20.pngbin0 -> 4220 bytes
-rwxr-xr-xres/drawable-xhdpi/burst_mode_5.pngbin0 -> 3810 bytes
-rw-r--r--res/layout/photo_module.xml12
-rw-r--r--src/com/android/camera/PhotoMenu.java9
-rw-r--r--src/com/android/camera/PhotoUI.java26
15 files changed, 46 insertions, 1 deletions
diff --git a/res/drawable-hdpi/burst_mode_10.png b/res/drawable-hdpi/burst_mode_10.png
new file mode 100755
index 000000000..795d852ae
--- /dev/null
+++ b/res/drawable-hdpi/burst_mode_10.png
Binary files differ
diff --git a/res/drawable-hdpi/burst_mode_15.png b/res/drawable-hdpi/burst_mode_15.png
new file mode 100755
index 000000000..c4fef5190
--- /dev/null
+++ b/res/drawable-hdpi/burst_mode_15.png
Binary files differ
diff --git a/res/drawable-hdpi/burst_mode_20.png b/res/drawable-hdpi/burst_mode_20.png
new file mode 100755
index 000000000..e6e46094e
--- /dev/null
+++ b/res/drawable-hdpi/burst_mode_20.png
Binary files differ
diff --git a/res/drawable-hdpi/burst_mode_5.png b/res/drawable-hdpi/burst_mode_5.png
new file mode 100755
index 000000000..a473e76e2
--- /dev/null
+++ b/res/drawable-hdpi/burst_mode_5.png
Binary files differ
diff --git a/res/drawable-mdpi/burst_mode_10.png b/res/drawable-mdpi/burst_mode_10.png
new file mode 100755
index 000000000..0741e521b
--- /dev/null
+++ b/res/drawable-mdpi/burst_mode_10.png
Binary files differ
diff --git a/res/drawable-mdpi/burst_mode_15.png b/res/drawable-mdpi/burst_mode_15.png
new file mode 100755
index 000000000..1da5781f4
--- /dev/null
+++ b/res/drawable-mdpi/burst_mode_15.png
Binary files differ
diff --git a/res/drawable-mdpi/burst_mode_20.png b/res/drawable-mdpi/burst_mode_20.png
new file mode 100755
index 000000000..bb6e9eedb
--- /dev/null
+++ b/res/drawable-mdpi/burst_mode_20.png
Binary files differ
diff --git a/res/drawable-mdpi/burst_mode_5.png b/res/drawable-mdpi/burst_mode_5.png
new file mode 100755
index 000000000..79e14d29f
--- /dev/null
+++ b/res/drawable-mdpi/burst_mode_5.png
Binary files differ
diff --git a/res/drawable-xhdpi/burst_mode_10.png b/res/drawable-xhdpi/burst_mode_10.png
new file mode 100755
index 000000000..feb4fb421
--- /dev/null
+++ b/res/drawable-xhdpi/burst_mode_10.png
Binary files differ
diff --git a/res/drawable-xhdpi/burst_mode_15.png b/res/drawable-xhdpi/burst_mode_15.png
new file mode 100755
index 000000000..6d127cd4f
--- /dev/null
+++ b/res/drawable-xhdpi/burst_mode_15.png
Binary files differ
diff --git a/res/drawable-xhdpi/burst_mode_20.png b/res/drawable-xhdpi/burst_mode_20.png
new file mode 100755
index 000000000..df2837aaf
--- /dev/null
+++ b/res/drawable-xhdpi/burst_mode_20.png
Binary files differ
diff --git a/res/drawable-xhdpi/burst_mode_5.png b/res/drawable-xhdpi/burst_mode_5.png
new file mode 100755
index 000000000..22a78e90d
--- /dev/null
+++ b/res/drawable-xhdpi/burst_mode_5.png
Binary files differ
diff --git a/res/layout/photo_module.xml b/res/layout/photo_module.xml
index 53832c6f8..3f77abc65 100644
--- a/res/layout/photo_module.xml
+++ b/res/layout/photo_module.xml
@@ -47,8 +47,18 @@
android:layout_width="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
- android:padding="23dp"
+ android:paddingLeft="12dp"
+ android:paddingTop="12dp"
android:visibility="gone"
android:src="@drawable/smart_scene_sports" />
+ <com.android.camera.ui.RotateImageView
+ android:id="@+id/burst_mode_icon"
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:layout_toRightOf="@+id/scene_detect_icon"
+ android:paddingLeft="12dp"
+ android:paddingTop="12dp"
+ android:visibility="gone"
+ android:src="@drawable/burst_mode_5" />
</com.android.camera.PreviewFrameLayout>
</merge>
diff --git a/src/com/android/camera/PhotoMenu.java b/src/com/android/camera/PhotoMenu.java
index 4eebbf6e7..9f2a45ec8 100644
--- a/src/com/android/camera/PhotoMenu.java
+++ b/src/com/android/camera/PhotoMenu.java
@@ -259,6 +259,9 @@ public class PhotoMenu extends PieController
}
});
more.addItem(item);
+ // burst mode
+ final ListPreference burstPref = group.findPreference(CameraSettings.KEY_BURST_MODE);
+ mUI.updateBurstModeIcon(Integer.valueOf(burstPref.getValue()));
}
@Override
@@ -318,6 +321,12 @@ public class PhotoMenu extends PieController
setPreference(CameraSettings.KEY_SCENE_MODE, Parameters.SCENE_MODE_AUTO);
setPreference(CameraSettings.KEY_ASD, mSettingOff);
setPreference(CameraSettings.KEY_BEAUTY_MODE, mSettingOff);
+ } else if (notSame(pref, CameraSettings.KEY_TIMER, "0")) {
+ setPreference(CameraSettings.KEY_BURST_MODE, "1");
+ mUI.updateBurstModeIcon(1);
+ } else if (pref.getKey().equals(CameraSettings.KEY_BURST_MODE)) {
+ setPreference(CameraSettings.KEY_TIMER, "0");
+ mUI.updateBurstModeIcon(Integer.valueOf(pref.getValue()));
}
super.onSettingChanged(pref);
}
diff --git a/src/com/android/camera/PhotoUI.java b/src/com/android/camera/PhotoUI.java
index f629a4daa..2a671bd2e 100644
--- a/src/com/android/camera/PhotoUI.java
+++ b/src/com/android/camera/PhotoUI.java
@@ -88,6 +88,8 @@ public class PhotoUI implements PieListener,
private ImageView mSceneDetectView;
+ private ImageView mBurstModeView;
+
private OnScreenIndicators mOnScreenIndicators;
protected PieRenderer mPieRenderer;
@@ -146,6 +148,7 @@ public class PhotoUI implements PieListener,
}
}
mSceneDetectView = (ImageView) mRootView.findViewById(R.id.scene_detect_icon);
+ mBurstModeView = (ImageView) mRootView.findViewById(R.id.burst_mode_icon);
}
public View getRootView() {
@@ -747,5 +750,28 @@ public class PhotoUI implements PieListener,
}
mSceneDetectView.setVisibility(View.VISIBLE);
}
+
+ public void updateBurstModeIcon(int burstCount) {
+ if (burstCount == 1) {
+ mBurstModeView.setVisibility(View.GONE);
+ return;
+ }
+
+ switch (burstCount) {
+ case 5:
+ mBurstModeView.setImageResource(R.drawable.burst_mode_5);
+ break;
+ case 10:
+ mBurstModeView.setImageResource(R.drawable.burst_mode_10);
+ break;
+ case 15:
+ mBurstModeView.setImageResource(R.drawable.burst_mode_15);
+ break;
+ case 20:
+ mBurstModeView.setImageResource(R.drawable.burst_mode_20);
+ break;
+ }
+ mBurstModeView.setVisibility(View.VISIBLE);
+ }
}