summaryrefslogtreecommitdiffstats
path: root/src/com/android/browser
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/browser')
-rw-r--r--src/com/android/browser/TabBar.java12
-rw-r--r--src/com/android/browser/TabScrollView.java30
2 files changed, 4 insertions, 38 deletions
diff --git a/src/com/android/browser/TabBar.java b/src/com/android/browser/TabBar.java
index f1cdf2f..b872cad 100644
--- a/src/com/android/browser/TabBar.java
+++ b/src/com/android/browser/TabBar.java
@@ -111,15 +111,11 @@ public class TabBar extends LinearLayout
Resources resources = activity.getResources();
LayoutInflater factory = LayoutInflater.from(activity);
factory.inflate(R.layout.tab_bar, this);
- setPadding(12, 12, 0, 0);
+ setPadding(0, (int) res.getDimension(R.dimen.tab_padding_top), 0, 0);
mTabs = (TabScrollView) findViewById(R.id.tabs);
mNewTab = (ImageButton) findViewById(R.id.newtab);
mNewTab.setOnClickListener(this);
mGenericFavicon = res.getDrawable(R.drawable.app_web_browser_sm);
- setChildrenDrawingOrderEnabled(true);
-
- // TODO: Change enabled states based on whether you can go
- // back/forward. Probably should be done inside onPageStarted.
updateTabs(mUiController.getTabs());
@@ -277,12 +273,6 @@ public class TabBar extends LinearLayout
return tabview;
}
- @Override
- protected int getChildDrawingOrder(int count, int i) {
- // reverse
- return count - 1 - i;
- }
-
private static Bitmap getDrawableAsBitmap(Drawable drawable, int width, int height) {
Bitmap b = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);
Canvas c = new Canvas(b);
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) {