diff options
author | Chih-Chung Chang <chihchung@google.com> | 2010-01-05 19:07:13 +0800 |
---|---|---|
committer | Chih-Chung Chang <chihchung@google.com> | 2010-01-06 10:21:21 +0800 |
commit | 2a8efc192e4c8dd6fff475494591b05b92920f22 (patch) | |
tree | 088af9ec1660c4ae39011e0fa38240b670bea927 /src | |
parent | 2e862df90cac949a91634da5dce4b54d7c20d505 (diff) | |
download | LegacyCamera-2a8efc192e4c8dd6fff475494591b05b92920f22.zip LegacyCamera-2a8efc192e4c8dd6fff475494591b05b92920f22.tar.gz LegacyCamera-2a8efc192e4c8dd6fff475494591b05b92920f22.tar.bz2 |
Use public api instead of hidden member. Don't use internal resource.
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/camera/MenuHelper.java | 3 | ||||
-rw-r--r-- | src/com/android/camera/Switcher.java | 10 |
2 files changed, 6 insertions, 7 deletions
diff --git a/src/com/android/camera/MenuHelper.java b/src/com/android/camera/MenuHelper.java index 6518e62..e2d6d78 100644 --- a/src/com/android/camera/MenuHelper.java +++ b/src/com/android/camera/MenuHelper.java @@ -817,8 +817,7 @@ public class MenuHelper { return onViewPlayClicked(onInvoke, activity); } }); - videoPlayItem.setIcon( - com.android.internal.R.drawable.ic_menu_play_clip); + videoPlayItem.setIcon(R.drawable.ic_menu_play_clip); requiresVideoItems.add(videoPlayItem); } diff --git a/src/com/android/camera/Switcher.java b/src/com/android/camera/Switcher.java index 0813633..8cc6336 100644 --- a/src/com/android/camera/Switcher.java +++ b/src/com/android/camera/Switcher.java @@ -84,7 +84,7 @@ public class Switcher extends ImageView implements View.OnTouchListener { public boolean onTouchEvent(MotionEvent event) { if (!isEnabled()) return false; - final int available = getHeight() - mPaddingTop - mPaddingBottom + final int available = getHeight() - getPaddingTop() - getPaddingBottom() - getDrawable().getIntrinsicHeight(); switch (event.getAction()) { @@ -121,10 +121,10 @@ public class Switcher extends ImageView implements View.OnTouchListener { Drawable drawable = getDrawable(); int drawableHeight = drawable.getIntrinsicHeight(); final int height = getHeight(); - final int available = height - mPaddingTop - mPaddingBottom + final int available = height - getPaddingTop() - getPaddingBottom() - drawableHeight; int x = (int) event.getY(); - mPosition = x - mPaddingTop - drawableHeight / 2; + mPosition = x - getPaddingTop() - drawableHeight / 2; if (mPosition < 0) mPosition = 0; if (mPosition > available) mPosition = available; invalidate(); @@ -142,7 +142,7 @@ public class Switcher extends ImageView implements View.OnTouchListener { } if (mAnimationStartTime != NO_ANIMATION) { - final int available = getHeight() - mPaddingTop - mPaddingBottom + final int available = getHeight() - getPaddingTop() - getPaddingBottom() - drawableHeight; long time = AnimationUtils.currentAnimationTimeMillis(); int deltaTime = (int) (time - mAnimationStartTime); @@ -158,7 +158,7 @@ public class Switcher extends ImageView implements View.OnTouchListener { } } - int offsetTop = mPaddingTop + mPosition; + int offsetTop = getPaddingTop() + mPosition; int offsetLeft = (getWidth() - drawableWidth - mPaddingLeft - mPaddingRight) / 2; int saveCount = canvas.getSaveCount(); |