diff options
author | Chung-yih Wang <cywang@google.com> | 2011-09-21 11:56:31 +0800 |
---|---|---|
committer | Chung-yih Wang <cywang@google.com> | 2011-09-22 02:10:08 +0800 |
commit | 606093cd434a89f5ca941d3a6d6e8470eb768c67 (patch) | |
tree | 0fee2c946b1693aff799d950c7d81f0e26e3c056 /src/com/android/camera/ui/ZoomControl.java | |
parent | 9e9aff5145a9c3e1e4e99fbd779cd3b9b3c20848 (diff) | |
download | LegacyCamera-606093cd434a89f5ca941d3a6d6e8470eb768c67.zip LegacyCamera-606093cd434a89f5ca941d3a6d6e8470eb768c67.tar.gz LegacyCamera-606093cd434a89f5ca941d3a6d6e8470eb768c67.tar.bz2 |
Fix the zoom control bar UI on phone.
+use drawable selector to activate/deactivate the zoom control bar
+update/add zoom assets
Change-Id: Ie429dd0d78c562c8d1045280f336ae74ea6ce898
Diffstat (limited to 'src/com/android/camera/ui/ZoomControl.java')
-rw-r--r-- | src/com/android/camera/ui/ZoomControl.java | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/src/com/android/camera/ui/ZoomControl.java b/src/com/android/camera/ui/ZoomControl.java index 662ee92..4258fd9 100644 --- a/src/com/android/camera/ui/ZoomControl.java +++ b/src/com/android/camera/ui/ZoomControl.java @@ -20,7 +20,6 @@ import com.android.camera.R; import android.content.Context; import android.os.Handler; -import android.os.SystemClock; import android.util.AttributeSet; import android.view.View; import android.widget.ImageView; @@ -75,9 +74,9 @@ public abstract class ZoomControl extends RelativeLayout { public ZoomControl(Context context, AttributeSet attrs) { super(context, attrs); - mZoomIn = addImageView(context, R.drawable.ic_zoom_in_holo_light); - mZoomSlider = addImageView(context, R.drawable.btn_zoom_slider); - mZoomOut = addImageView(context, R.drawable.ic_zoom_out_holo_light); + mZoomIn = addImageView(context, R.drawable.ic_zoom_in); + mZoomSlider = addImageView(context, R.drawable.ic_zoom_slider); + mZoomOut = addImageView(context, R.drawable.ic_zoom_out); mHandler = new Handler(); } @@ -105,6 +104,10 @@ public abstract class ZoomControl extends RelativeLayout { public void setZoomMax(int zoomMax) { mZoomMax = zoomMax; + + // Layout should be requested as the maximum zoom level is the key to + // show the correct zoom slider position. + requestLayout(); } public void setOnZoomChangeListener(OnZoomChangedListener listener) { @@ -219,4 +222,11 @@ public abstract class ZoomControl extends RelativeLayout { } } } + + @Override + public void setActivated(boolean activated) { + super.setActivated(activated); + mZoomIn.setActivated(activated); + mZoomOut.setActivated(activated); + } } |