summaryrefslogtreecommitdiffstats
path: root/src/com/android/browser/TabScrollView.java
diff options
context:
space:
mode:
authorMichael Kolb <kolby@google.com>2011-01-13 19:24:18 -0800
committerMichael Kolb <kolby@google.com>2011-01-14 11:16:53 -0800
commitf558f0d9372ecf4eeba86dd52bf67f38ff79c0b8 (patch)
tree37daa2049cf77c8e9f6ab9f6b973171b3b7a73e4 /src/com/android/browser/TabScrollView.java
parentf18338a08c89467ef27e1fe3a9ac7130839b475d (diff)
downloadpackages_apps_browser-f558f0d9372ecf4eeba86dd52bf67f38ff79c0b8.zip
packages_apps_browser-f558f0d9372ecf4eeba86dd52bf67f38ff79c0b8.tar.gz
packages_apps_browser-f558f0d9372ecf4eeba86dd52bf67f38ff79c0b8.tar.bz2
change tabbar overflow handling
http://b/issue?id=3350118 remove arrows and fade scroll gap off to the left scroll under new tab button to right Change-Id: I1dcd45aadcce7881717f5af6bbdbc28bf21e7dc3
Diffstat (limited to 'src/com/android/browser/TabScrollView.java')
-rw-r--r--src/com/android/browser/TabScrollView.java30
1 files changed, 3 insertions, 27 deletions
diff --git a/src/com/android/browser/TabScrollView.java b/src/com/android/browser/TabScrollView.java
index f501e64..09dddee 100644
--- a/src/com/android/browser/TabScrollView.java
+++ b/src/com/android/browser/TabScrollView.java
@@ -16,15 +16,10 @@
package com.android.browser;
-import android.animation.Animator;
-import android.animation.AnimatorListenerAdapter;
import android.animation.ObjectAnimator;
import android.content.Context;
-import android.graphics.Canvas;
-import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
import android.view.View;
-import android.view.animation.AccelerateInterpolator;
import android.widget.HorizontalScrollView;
import android.widget.LinearLayout;
@@ -36,8 +31,6 @@ public class TabScrollView extends HorizontalScrollView {
private Context mContext;
private LinearLayout mContentView;
private int mSelected;
- private Drawable mArrowLeft;
- private Drawable mArrowRight;
private int mAnimationDuration;
private int mTabOverlap;
@@ -79,10 +72,11 @@ public class TabScrollView extends HorizontalScrollView {
mContentView.setOrientation(LinearLayout.HORIZONTAL);
mContentView.setLayoutParams(
new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.MATCH_PARENT));
+ mContentView.setPadding(
+ (int) ctx.getResources().getDimension(R.dimen.tab_first_padding_left),
+ 0, 0, 0);
addView(mContentView);
mSelected = -1;
- mArrowLeft = ctx.getResources().getDrawable(R.drawable.ic_arrow_left);
- mArrowRight = ctx.getResources().getDrawable(R.drawable.ic_arrow_right);
// prevent ProGuard from removing the property methods
setScroll(getScroll());
}
@@ -153,24 +147,6 @@ public class TabScrollView extends HorizontalScrollView {
}
}
- @Override
- protected void dispatchDraw(Canvas canvas) {
- super.dispatchDraw(canvas);
- int l = getScrollX();
- int r = l + getWidth();
- int dis = 8;
- if (l > 0) {
- int aw = mArrowLeft.getIntrinsicWidth();
- mArrowLeft.setBounds(l + dis, 0, l + dis + aw, getHeight());
- mArrowLeft.draw(canvas);
- }
- if (r < mContentView.getWidth()) {
- int aw = mArrowRight.getIntrinsicWidth();
- mArrowRight.setBounds(r - dis - aw, 0, r - dis, getHeight());
- mArrowRight.draw(canvas);
- }
- }
-
// TODO: These animations are broken and don't work correctly, removing for now
// as animateOut is actually causing issues
// private void animateIn(View tab) {