diff options
| author | Chung-yih Wang <cywang@google.com> | 2011-08-31 14:05:55 +0800 |
|---|---|---|
| committer | Chung-yih Wang <cywang@google.com> | 2011-09-01 00:09:29 +0800 |
| commit | b1ce29490ec61847602ece16f3745417787d3d8f (patch) | |
| tree | d9f41fc9a1f4722a8f3c7f8e5d712ab4275d88ac /src/com/android/camera/ui/SecondLevelIndicatorControlBar.java | |
| parent | c2f9a6866c8c0ea970f50645c33cf6296721bd91 (diff) | |
| download | LegacyCamera-b1ce29490ec61847602ece16f3745417787d3d8f.zip LegacyCamera-b1ce29490ec61847602ece16f3745417787d3d8f.tar.gz LegacyCamera-b1ce29490ec61847602ece16f3745417787d3d8f.tar.bz2 | |
Add the missing setEnabled() for phone UI controls.
bug:5109283
We have to hide the setting buttons during video recording, or it will crash
the camera driver easily by changing the camera settings. For camera
mode, we just simply disable the buttons with grey out effect.
Change-Id: Iec06a48f246ab5ef9ae4d8c6ca0b78851fcb0155
Diffstat (limited to 'src/com/android/camera/ui/SecondLevelIndicatorControlBar.java')
| -rw-r--r-- | src/com/android/camera/ui/SecondLevelIndicatorControlBar.java | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/com/android/camera/ui/SecondLevelIndicatorControlBar.java b/src/com/android/camera/ui/SecondLevelIndicatorControlBar.java index 5ce586e..b725002 100644 --- a/src/com/android/camera/ui/SecondLevelIndicatorControlBar.java +++ b/src/com/android/camera/ui/SecondLevelIndicatorControlBar.java @@ -43,7 +43,7 @@ public class SecondLevelIndicatorControlBar extends IndicatorControl implements public void initialize(Context context, PreferenceGroup group, String[] keys, String[] otherSettingKeys) { if (mCloseIcon == null) { - mCloseIcon = new ImageView(context); + mCloseIcon = new ColorFilterImageView(context); mCloseIcon.setImageResource(R.drawable.btn_close_settings); mCloseIcon.setOnClickListener(this); addView(mCloseIcon); @@ -112,4 +112,13 @@ public class SecondLevelIndicatorControlBar extends IndicatorControl implements top + i * height / count + h); } } + + @Override + public void setEnabled(boolean enabled) { + super.setEnabled(enabled); + if (mCurrentMode == MODE_VIDEO) { + mCloseIcon.setVisibility(enabled ? View.VISIBLE : View.INVISIBLE); + } + mCloseIcon.setEnabled(enabled); + } } |
