summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
Diffstat (limited to 'src/com')
-rw-r--r--src/com/android/browser/AddBookmarkPage.java2
-rw-r--r--src/com/android/browser/BaseUi.java4
-rw-r--r--src/com/android/browser/BreadCrumbView.java2
-rw-r--r--src/com/android/browser/BrowserBookmarksPage.java2
-rw-r--r--src/com/android/browser/NavScreen.java57
-rw-r--r--src/com/android/browser/NavTabScroller.java1068
-rw-r--r--src/com/android/browser/NavTabView.java4
-rw-r--r--src/com/android/browser/NavigationBarPhone.java4
-rw-r--r--src/com/android/browser/NavigationBarTablet.java16
-rw-r--r--src/com/android/browser/PieControl.java32
-rw-r--r--src/com/android/browser/addbookmark/FolderSpinnerAdapter.java6
-rw-r--r--src/com/android/browser/preferences/WebsiteSettingsFragment.java4
-rw-r--r--src/com/android/browser/provider/BrowserProvider2.java4
-rw-r--r--src/com/android/browser/view/StopProgressView.java2
-rw-r--r--src/com/android/browser/widget/BookmarkThumbnailWidgetService.java2
15 files changed, 609 insertions, 600 deletions
diff --git a/src/com/android/browser/AddBookmarkPage.java b/src/com/android/browser/AddBookmarkPage.java
index 6e82dbf02..6f3779ad4 100644
--- a/src/com/android/browser/AddBookmarkPage.java
+++ b/src/com/android/browser/AddBookmarkPage.java
@@ -669,7 +669,7 @@ public class AddBookmarkPage extends Activity
mCrumbs = (BreadCrumbView) findViewById(R.id.crumbs);
mCrumbs.setUseBackButton(true);
mCrumbs.setController(this);
- mHeaderIcon = getResources().getDrawable(R.drawable.ic_folder_holo_dark);
+ mHeaderIcon = getResources().getDrawable(R.drawable.ic_folder_dark);
mCrumbHolder = findViewById(R.id.crumb_holder);
mCrumbs.setMaxVisible(MAX_CRUMBS_SHOWN);
diff --git a/src/com/android/browser/BaseUi.java b/src/com/android/browser/BaseUi.java
index 6b1045978..c09804528 100644
--- a/src/com/android/browser/BaseUi.java
+++ b/src/com/android/browser/BaseUi.java
@@ -121,8 +121,8 @@ public abstract class BaseUi implements UI {
Resources res = mActivity.getResources();
mInputManager = (InputMethodManager)
browser.getSystemService(Activity.INPUT_METHOD_SERVICE);
- mLockIconSecure = res.getDrawable(R.drawable.ic_secure_holo_dark);
- mLockIconMixed = res.getDrawable(R.drawable.ic_secure_partial_holo_dark);
+ mLockIconSecure = res.getDrawable(R.drawable.ic_secure_dark);
+ mLockIconMixed = res.getDrawable(R.drawable.ic_secure_partial_dark);
FrameLayout frameLayout = (FrameLayout) mActivity.getWindow()
.getDecorView().findViewById(android.R.id.content);
LayoutInflater.from(mActivity)
diff --git a/src/com/android/browser/BreadCrumbView.java b/src/com/android/browser/BreadCrumbView.java
index d331b5364..c8d0f2b1e 100644
--- a/src/com/android/browser/BreadCrumbView.java
+++ b/src/com/android/browser/BreadCrumbView.java
@@ -169,7 +169,7 @@ public class BreadCrumbView extends LinearLayout implements OnClickListener {
private void addBackButton() {
mBackButton = new ImageButton(mContext);
- mBackButton.setImageResource(R.drawable.ic_back_hierarchy_holo_dark);
+ mBackButton.setImageResource(R.drawable.ic_back_hierarchy_dark);
TypedValue outValue = new TypedValue();
getContext().getTheme().resolveAttribute(
android.R.attr.selectableItemBackground, outValue, true);
diff --git a/src/com/android/browser/BrowserBookmarksPage.java b/src/com/android/browser/BrowserBookmarksPage.java
index af965f4b0..cb531073c 100644
--- a/src/com/android/browser/BrowserBookmarksPage.java
+++ b/src/com/android/browser/BrowserBookmarksPage.java
@@ -309,7 +309,7 @@ public class BrowserBookmarksPage extends Fragment implements View.OnCreateConte
if (isFolder) {
item.setUrl(null);
Bitmap bitmap =
- BitmapFactory.decodeResource(getResources(), R.drawable.ic_folder_holo_dark);
+ BitmapFactory.decodeResource(getResources(), R.drawable.ic_folder_dark);
item.setFavicon(bitmap);
new LookupBookmarkCount(getActivity(), item)
.execute(cursor.getLong(BookmarksLoader.COLUMN_INDEX_ID));
diff --git a/src/com/android/browser/NavScreen.java b/src/com/android/browser/NavScreen.java
index 1e4704e46..7730cae1b 100644
--- a/src/com/android/browser/NavScreen.java
+++ b/src/com/android/browser/NavScreen.java
@@ -62,6 +62,7 @@ public class NavScreen extends RelativeLayout
TextView mTitle;
ImageView mFavicon;
ImageButton mCloseTab;
+ ImageView mNewTabFab;
NavTabScroller mScroller;
TabAdapter mAdapter;
@@ -113,30 +114,38 @@ public class NavScreen extends RelativeLayout
}
private void init() {
- LayoutInflater.from(mContext).inflate(R.layout.nav_screen, this);
- setContentDescription(mContext.getResources().getString(
- R.string.accessibility_transition_navscreen));
- mBookmarks = (ImageButton) findViewById(R.id.bookmarks);
- mNewTab = (ImageButton) findViewById(R.id.newtab);
- mMore = (ImageButton) findViewById(R.id.more);
- mBookmarks.setOnClickListener(this);
- mNewTab.setOnClickListener(this);
- mMore.setOnClickListener(this);
- mScroller = (NavTabScroller) findViewById(R.id.scroller);
- TabControl tc = mUiController.getTabControl();
- mTabViews = new HashMap<Tab, View>(tc.getTabCount());
- mAdapter = new TabAdapter(mContext, tc);
- mScroller.setOrientation(mOrientation == Configuration.ORIENTATION_LANDSCAPE
- ? LinearLayout.HORIZONTAL : LinearLayout.VERTICAL);
- // update state for active tab
- mScroller.setAdapter(mAdapter,
- mUiController.getTabControl().getTabPosition(mUi.getActiveTab()));
- mScroller.setOnRemoveListener(new OnRemoveListener() {
- public void onRemovePosition(int pos) {
- Tab tab = mAdapter.getItem(pos);
- onCloseTab(tab);
- }
- });
+ LayoutInflater.from(mContext).inflate(R.layout.nav_screen, this);
+ setContentDescription(mContext.getResources().getString(
+ R.string.accessibility_transition_navscreen));
+ mBookmarks = (ImageButton) findViewById(R.id.bookmarks);
+ mNewTab = (ImageButton) findViewById(R.id.newtab);
+ mMore = (ImageButton) findViewById(R.id.more);
+ mBookmarks.setOnClickListener(this);
+ mNewTab.setOnClickListener(this);
+ mMore.setOnClickListener(this);
+ mScroller = (NavTabScroller) findViewById(R.id.scroller);
+ TabControl tc = mUiController.getTabControl();
+ mTabViews = new HashMap<Tab, View>(tc.getTabCount());
+ mAdapter = new TabAdapter(mContext, tc);
+ mScroller.setOrientation(mOrientation == Configuration.ORIENTATION_LANDSCAPE
+ ? LinearLayout.HORIZONTAL : LinearLayout.VERTICAL);
+ // update state for active tab
+ mScroller.setAdapter(mAdapter,
+ mUiController.getTabControl().getTabPosition(mUi.getActiveTab()));
+ mScroller.setOnRemoveListener(new OnRemoveListener() {
+ public void onRemovePosition(int pos) {
+ Tab tab = mAdapter.getItem(pos);
+ onCloseTab(tab);
+ }
+ });
+ mNewTabFab = (ImageView) findViewById(R.id.floating_action_button);
+ mNewTabFab.setOnClickListener(
+ new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ openNewTab();
+ }
+ });
}
@Override
diff --git a/src/com/android/browser/NavTabScroller.java b/src/com/android/browser/NavTabScroller.java
index c940bf553..f1f8e3582 100644
--- a/src/com/android/browser/NavTabScroller.java
+++ b/src/com/android/browser/NavTabScroller.java
@@ -1,18 +1,18 @@
/*
- * Copyright (C) 2011 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
+* Copyright (C) 2011 The Android Open Source Project
+*
+* Licensed under the Apache License, Version 2.0 (the "License"); you may not
+* use this file except in compliance with the License. You may obtain a copy of
+* the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+* License for the specific language governing permissions and limitations under
+* the License.
+*/
package com.android.browser;
@@ -35,535 +35,535 @@ import android.widget.LinearLayout;
import com.android.browser.view.ScrollerView;
/**
- * custom view for displaying tabs in the nav screen
- */
+* custom view for displaying tabs in the nav screen
+*/
public class NavTabScroller extends ScrollerView {
- static final int INVALID_POSITION = -1;
- static final float[] PULL_FACTOR = { 2.5f, 0.9f };
-
- interface OnRemoveListener {
- public void onRemovePosition(int position);
- }
-
- interface OnLayoutListener {
- public void onLayout(int l, int t, int r, int b);
- }
-
- private ContentLayout mContentView;
- private BaseAdapter mAdapter;
- private OnRemoveListener mRemoveListener;
- private OnLayoutListener mLayoutListener;
- private int mGap;
- private int mGapPosition;
- private ObjectAnimator mGapAnimator;
-
- // after drag animation velocity in pixels/sec
- private static final float MIN_VELOCITY = 1500;
- private AnimatorSet mAnimator;
-
- private float mFlingVelocity;
- private boolean mNeedsScroll;
- private int mScrollPosition;
-
- DecelerateInterpolator mCubic;
- int mPullValue;
-
- public NavTabScroller(Context context, AttributeSet attrs, int defStyle) {
- super(context, attrs, defStyle);
- init(context);
- }
-
- public NavTabScroller(Context context, AttributeSet attrs) {
- super(context, attrs);
- init(context);
- }
-
- public NavTabScroller(Context context) {
- super(context);
- init(context);
- }
-
- private void init(Context ctx) {
- mCubic = new DecelerateInterpolator(1.5f);
- mGapPosition = INVALID_POSITION;
- setHorizontalScrollBarEnabled(false);
- setVerticalScrollBarEnabled(false);
- mContentView = new ContentLayout(ctx, this);
- mContentView.setOrientation(LinearLayout.HORIZONTAL);
- addView(mContentView);
- mContentView.setLayoutParams(
- new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.MATCH_PARENT));
- // ProGuard !
- setGap(getGap());
- mFlingVelocity = getContext().getResources().getDisplayMetrics().density
- * MIN_VELOCITY;
- }
-
- protected int getScrollValue() {
- return mHorizontal ? mScrollX : mScrollY;
- }
-
- protected void setScrollValue(int value) {
- scrollTo(mHorizontal ? value : 0, mHorizontal ? 0 : value);
- }
-
- protected NavTabView getTabView(int pos) {
- return (NavTabView) mContentView.getChildAt(pos);
- }
-
- protected boolean isHorizontal() {
- return mHorizontal;
- }
-
- public void setOrientation(int orientation) {
- mContentView.setOrientation(orientation);
- if (orientation == LinearLayout.HORIZONTAL) {
- mContentView.setLayoutParams(
- new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.MATCH_PARENT));
- } else {
- mContentView.setLayoutParams(
- new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT));
+ static final int INVALID_POSITION = -1;
+ static final float[] PULL_FACTOR = { 2.5f, 0.9f };
+
+ interface OnRemoveListener {
+ public void onRemovePosition(int position);
+ }
+
+ interface OnLayoutListener {
+ public void onLayout(int l, int t, int r, int b);
+ }
+
+ private ContentLayout mContentView;
+ private BaseAdapter mAdapter;
+ private OnRemoveListener mRemoveListener;
+ private OnLayoutListener mLayoutListener;
+ private int mGap;
+ private int mGapPosition;
+ private ObjectAnimator mGapAnimator;
+
+ // after drag animation velocity in pixels/sec
+ private static final float MIN_VELOCITY = 1500;
+ private AnimatorSet mAnimator;
+
+ private float mFlingVelocity;
+ private boolean mNeedsScroll;
+ private int mScrollPosition;
+
+ DecelerateInterpolator mCubic;
+ int mPullValue;
+
+ public NavTabScroller(Context context, AttributeSet attrs, int defStyle) {
+ super(context, attrs, defStyle);
+ init(context);
+ }
+
+ public NavTabScroller(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ init(context);
+ }
+
+ public NavTabScroller(Context context) {
+ super(context);
+ init(context);
+ }
+
+ private void init(Context ctx) {
+ mCubic = new DecelerateInterpolator(1.5f);
+ mGapPosition = INVALID_POSITION;
+ setHorizontalScrollBarEnabled(false);
+ setVerticalScrollBarEnabled(false);
+ mContentView = new ContentLayout(ctx, this);
+ mContentView.setOrientation(LinearLayout.HORIZONTAL);
+ addView(mContentView);
+ mContentView.setLayoutParams(
+ new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.MATCH_PARENT));
+ // ProGuard !
+ setGap(getGap());
+ mFlingVelocity = getContext().getResources().getDisplayMetrics().density
+ * MIN_VELOCITY;
+ }
+
+ protected int getScrollValue() {
+ return mHorizontal ? mScrollX : mScrollY;
+ }
+
+ protected void setScrollValue(int value) {
+ scrollTo(mHorizontal ? value : 0, mHorizontal ? 0 : value);
+ }
+
+ protected NavTabView getTabView(int pos) {
+ return (NavTabView) mContentView.getChildAt(pos);
+ }
+
+ protected boolean isHorizontal() {
+ return mHorizontal;
+ }
+
+ public void setOrientation(int orientation) {
+ mContentView.setOrientation(orientation);
+ if (orientation == LinearLayout.HORIZONTAL) {
+ mContentView.setLayoutParams(
+ new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.MATCH_PARENT));
+ } else {
+ mContentView.setLayoutParams(
+ new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT));
+ }
+ super.setOrientation(orientation);
+ }
+
+ @Override
+ protected void onMeasure(int wspec, int hspec) {
+ super.onMeasure(wspec, hspec);
+ calcPadding();
+ }
+
+ private void calcPadding() {
+ if (mAdapter.getCount() > 0) {
+ View v = mContentView.getChildAt(0);
+ if (mHorizontal) {
+ int pad = (getMeasuredWidth() - v.getMeasuredWidth()) / 2 + 2;
+ mContentView.setPadding(pad, 0, pad, 0);
+ } else {
+ int pad = (getMeasuredHeight() - v.getMeasuredHeight()) / 2 + 2;
+ mContentView.setPadding(0, pad, 0, pad);
+ }
+ }
+ }
+
+ public void setAdapter(BaseAdapter adapter) {
+ setAdapter(adapter, 0);
+ }
+
+
+ public void setOnRemoveListener(OnRemoveListener l) {
+ mRemoveListener = l;
+ }
+
+ public void setOnLayoutListener(OnLayoutListener l) {
+ mLayoutListener = l;
+ }
+
+ protected void setAdapter(BaseAdapter adapter, int selection) {
+ mAdapter = adapter;
+ mAdapter.registerDataSetObserver(new DataSetObserver() {
+
+ @Override
+ public void onChanged() {
+ super.onChanged();
+ handleDataChanged();
+ }
+
+ @Override
+ public void onInvalidated() {
+ super.onInvalidated();
+ }
+ });
+ handleDataChanged(selection);
+ }
+
+ protected ViewGroup getContentView() {
+ return mContentView;
+ }
+
+ protected int getRelativeChildTop(int ix) {
+ return mContentView.getChildAt(ix).getTop() - mScrollY;
+ }
+
+ protected void handleDataChanged() {
+ handleDataChanged(INVALID_POSITION);
+ }
+
+ void handleDataChanged(int newscroll) {
+ int scroll = getScrollValue();
+ if (mGapAnimator != null) {
+ mGapAnimator.cancel();
+ }
+ mContentView.removeAllViews();
+ for (int i = 0; i < mAdapter.getCount(); i++) {
+ View v = mAdapter.getView(i, null, mContentView);
+ LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(
+ LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
+ lp.gravity = (mHorizontal ? Gravity.CENTER_VERTICAL : Gravity.CENTER_HORIZONTAL);
+ mContentView.addView(v, lp);
+ if (mGapPosition > INVALID_POSITION){
+ adjustViewGap(v, i);
+ }
+ }
+ if (newscroll > INVALID_POSITION) {
+ newscroll = Math.min(mAdapter.getCount() - 1, newscroll);
+ mNeedsScroll = true;
+ mScrollPosition = newscroll;
+ requestLayout();
+ } else {
+ setScrollValue(scroll);
+ }
+ }
+
+ protected void finishScroller() {
+ mScroller.forceFinished(true);
+ }
+
+ @Override
+ protected void onLayout(boolean changed, int l, int t, int r, int b) {
+ super.onLayout(changed, l, t, r, b);
+ if (mNeedsScroll) {
+ mScroller.forceFinished(true);
+ snapToSelected(mScrollPosition, false);
+ mNeedsScroll = false;
+ }
+ if (mLayoutListener != null) {
+ mLayoutListener.onLayout(l, t, r, b);
+ mLayoutListener = null;
+ }
+ }
+
+ void clearTabs() {
+ mContentView.removeAllViews();
+ }
+
+ void snapToSelected(int pos, boolean smooth) {
+ if (pos < 0) return;
+ View v = mContentView.getChildAt(pos);
+ if (v == null) return;
+ int sx = 0;
+ int sy = 0;
+ if (mHorizontal) {
+ sx = (v.getLeft() + v.getRight() - getWidth()) / 2;
+ } else {
+ sy = (v.getTop() + v.getBottom() - getHeight()) / 2;
+ }
+ if ((sx != mScrollX) || (sy != mScrollY)) {
+ if (smooth) {
+ smoothScrollTo(sx,sy);
+ } else {
+ scrollTo(sx, sy);
+ }
+ }
+ }
+
+ protected void animateOut(View v) {
+ if (v == null) return;
+ animateOut(v, -mFlingVelocity);
+ }
+
+ private void animateOut(final View v, float velocity) {
+ float start = mHorizontal ? v.getTranslationY() : v.getTranslationX();
+ animateOut(v, velocity, start);
+ }
+
+ private void animateOut(final View v, float velocity, float start) {
+ if ((v == null) || (mAnimator != null)) return;
+ final int position = mContentView.indexOfChild(v);
+ int target = 0;
+ if (velocity < 0) {
+ target = mHorizontal ? -getHeight() : -getWidth();
+ } else {
+ target = mHorizontal ? getHeight() : getWidth();
+ }
+ int distance = target - (mHorizontal ? v.getTop() : v.getLeft());
+ long duration = (long) (Math.abs(distance) * 1000 / Math.abs(velocity));
+ int scroll = 0;
+ int translate = 0;
+ int gap = mHorizontal ? v.getWidth() : v.getHeight();
+ int centerView = getViewCenter(v);
+ int centerScreen = getScreenCenter();
+ int newpos = INVALID_POSITION;
+ if (centerView < centerScreen - gap / 2) {
+ // top view
+ scroll = - (centerScreen - centerView - gap);
+ translate = (position > 0) ? gap : 0;
+ newpos = position;
+ } else if (centerView > centerScreen + gap / 2) {
+ // bottom view
+ scroll = - (centerScreen + gap - centerView);
+ if (position < mAdapter.getCount() - 1) {
+ translate = -gap;
+ }
+ } else {
+ // center view
+ scroll = - (centerScreen - centerView);
+ if (position < mAdapter.getCount() - 1) {
+ translate = -gap;
+ } else {
+ scroll -= gap;
+ }
+ }
+ mGapPosition = position;
+ final int pos = newpos;
+ ObjectAnimator trans = ObjectAnimator.ofFloat(v,
+ (mHorizontal ? TRANSLATION_Y : TRANSLATION_X), start, target);
+ ObjectAnimator alpha = ObjectAnimator.ofFloat(v, ALPHA, getAlpha(v,start),
+ getAlpha(v,target));
+ AnimatorSet set1 = new AnimatorSet();
+ set1.playTogether(trans, alpha);
+ set1.setDuration(duration);
+ mAnimator = new AnimatorSet();
+ ObjectAnimator trans2 = null;
+ ObjectAnimator scroll1 = null;
+ if (scroll != 0) {
+ if (mHorizontal) {
+ scroll1 = ObjectAnimator.ofInt(this, "scrollX", getScrollX(), getScrollX() + scroll);
+ } else {
+ scroll1 = ObjectAnimator.ofInt(this, "scrollY", getScrollY(), getScrollY() + scroll);
+ }
+ }
+ if (translate != 0) {
+ trans2 = ObjectAnimator.ofInt(this, "gap", 0, translate);
+ }
+ final int duration2 = 200;
+ if (scroll1 != null) {
+ if (trans2 != null) {
+ AnimatorSet set2 = new AnimatorSet();
+ set2.playTogether(scroll1, trans2);
+ set2.setDuration(duration2);
+ mAnimator.playSequentially(set1, set2);
+ } else {
+ scroll1.setDuration(duration2);
+ mAnimator.playSequentially(set1, scroll1);
+ }
+ } else {
+ if (trans2 != null) {
+ trans2.setDuration(duration2);
+ mAnimator.playSequentially(set1, trans2);
+ }
+ }
+ mAnimator.addListener(new AnimatorListenerAdapter() {
+ public void onAnimationEnd(Animator a) {
+ if (mRemoveListener != null) {
+ mRemoveListener.onRemovePosition(position);
+ mAnimator = null;
+ mGapPosition = INVALID_POSITION;
+ mGap = 0;
+ handleDataChanged(pos);
}
- super.setOrientation(orientation);
- }
-
- @Override
- protected void onMeasure(int wspec, int hspec) {
- super.onMeasure(wspec, hspec);
- calcPadding();
- }
-
- private void calcPadding() {
- if (mAdapter.getCount() > 0) {
- View v = mContentView.getChildAt(0);
- if (mHorizontal) {
- int pad = (getMeasuredWidth() - v.getMeasuredWidth()) / 2 + 2;
- mContentView.setPadding(pad, 0, pad, 0);
- } else {
- int pad = (getMeasuredHeight() - v.getMeasuredHeight()) / 2 + 2;
- mContentView.setPadding(0, pad, 0, pad);
- }
+ }
+ });
+ mAnimator.start();
+ }
+
+ public void setGap(int gap) {
+ if (mGapPosition != INVALID_POSITION) {
+ mGap = gap;
+ postInvalidate();
+ }
+ }
+
+ public int getGap() {
+ return mGap;
+ }
+
+ void adjustGap() {
+ for (int i = 0; i < mContentView.getChildCount(); i++) {
+ final View child = mContentView.getChildAt(i);
+ adjustViewGap(child, i);
+ }
+ }
+
+ private void adjustViewGap(View view, int pos) {
+ if ((mGap < 0 && pos > mGapPosition)
+ || (mGap > 0 && pos < mGapPosition)) {
+ if (mHorizontal) {
+ view.setTranslationX(mGap);
+ } else {
+ view.setTranslationY(mGap);
+ }
+ }
+ }
+
+ private int getViewCenter(View v) {
+ if (mHorizontal) {
+ return v.getLeft() + v.getWidth() / 2;
+ } else {
+ return v.getTop() + v.getHeight() / 2;
+ }
+ }
+
+ private int getScreenCenter() {
+ if (mHorizontal) {
+ return getScrollX() + getWidth() / 2;
+ } else {
+ return getScrollY() + getHeight() / 2;
+ }
+ }
+
+ @Override
+ public void draw(Canvas canvas) {
+ if (mGapPosition > INVALID_POSITION) {
+ adjustGap();
+ }
+ super.draw(canvas);
+ }
+
+ @Override
+ protected View findViewAt(int x, int y) {
+ x += mScrollX;
+ y += mScrollY;
+ final int count = mContentView.getChildCount();
+ for (int i = count - 1; i >= 0; i--) {
+ View child = mContentView.getChildAt(i);
+ if (child.getVisibility() == View.VISIBLE) {
+ if ((x >= child.getLeft()) && (x < child.getRight())
+ && (y >= child.getTop()) && (y < child.getBottom())) {
+ return child;
}
- }
-
- public void setAdapter(BaseAdapter adapter) {
- setAdapter(adapter, 0);
- }
-
-
- public void setOnRemoveListener(OnRemoveListener l) {
- mRemoveListener = l;
- }
-
- public void setOnLayoutListener(OnLayoutListener l) {
- mLayoutListener = l;
- }
-
- protected void setAdapter(BaseAdapter adapter, int selection) {
- mAdapter = adapter;
- mAdapter.registerDataSetObserver(new DataSetObserver() {
-
- @Override
- public void onChanged() {
- super.onChanged();
- handleDataChanged();
- }
-
- @Override
- public void onInvalidated() {
- super.onInvalidated();
- }
- });
- handleDataChanged(selection);
- }
-
- protected ViewGroup getContentView() {
- return mContentView;
- }
-
- protected int getRelativeChildTop(int ix) {
- return mContentView.getChildAt(ix).getTop() - mScrollY;
- }
-
- protected void handleDataChanged() {
- handleDataChanged(INVALID_POSITION);
- }
-
- void handleDataChanged(int newscroll) {
- int scroll = getScrollValue();
- if (mGapAnimator != null) {
- mGapAnimator.cancel();
- }
- mContentView.removeAllViews();
- for (int i = 0; i < mAdapter.getCount(); i++) {
- View v = mAdapter.getView(i, null, mContentView);
- LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(
- LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
- lp.gravity = (mHorizontal ? Gravity.CENTER_VERTICAL : Gravity.CENTER_HORIZONTAL);
- mContentView.addView(v, lp);
- if (mGapPosition > INVALID_POSITION){
- adjustViewGap(v, i);
- }
- }
- if (newscroll > INVALID_POSITION) {
- newscroll = Math.min(mAdapter.getCount() - 1, newscroll);
- mNeedsScroll = true;
- mScrollPosition = newscroll;
- requestLayout();
- } else {
- setScrollValue(scroll);
- }
- }
-
- protected void finishScroller() {
- mScroller.forceFinished(true);
+ }
+ }
+ return null;
+ }
+
+ @Override
+ protected void onOrthoDrag(View v, float distance) {
+ if ((v != null) && (mAnimator == null)) {
+ offsetView(v, distance);
+ }
+ }
+
+ @Override
+ protected void onOrthoDragFinished(View downView) {
+ if (mAnimator != null) return;
+ if (mIsOrthoDragged && downView != null) {
+ // offset
+ float diff = mHorizontal ? downView.getTranslationY() : downView.getTranslationX();
+ if (Math.abs(diff) > (mHorizontal ? downView.getHeight() : downView.getWidth()) / 2) {
+ // remove it
+ animateOut(downView, Math.signum(diff) * mFlingVelocity, diff);
+ } else {
+ // snap back
+ offsetView(downView, 0);
+ }
+ }
+ }
+
+ @Override
+ protected void onOrthoFling(View v, float velocity) {
+ if (v == null) return;
+ if (mAnimator == null && Math.abs(velocity) > mFlingVelocity / 2) {
+ animateOut(v, velocity);
+ } else {
+ offsetView(v, 0);
+ }
+ }
+
+ private void offsetView(View v, float distance) {
+ v.setAlpha(getAlpha(v, distance));
+ if (mHorizontal) {
+ v.setTranslationY(distance);
+ } else {
+ v.setTranslationX(distance);
+ }
+ }
+
+ private float getAlpha(View v, float distance) {
+ return 1 - (float) Math.abs(distance) / (mHorizontal ? v.getHeight() : v.getWidth());
+ }
+
+ private float ease(DecelerateInterpolator inter, float value, float start,
+ float dist, float duration) {
+ return start + dist * inter.getInterpolation(value / duration);
+ }
+
+ @Override
+ protected void onPull(int delta) {
+ boolean layer = false;
+ int count = 2;
+ if (delta == 0 && mPullValue == 0) return;
+ if (delta == 0 && mPullValue != 0) {
+ // reset
+ for (int i = 0; i < count; i++) {
+ View child = mContentView.getChildAt((mPullValue < 0)
+ ? i
+ : mContentView.getChildCount() - 1 - i);
+ if (child == null) break;
+ ObjectAnimator trans = ObjectAnimator.ofFloat(child,
+ mHorizontal ? "translationX" : "translationY",
+ mHorizontal ? getTranslationX() : getTranslationY(),
+ 0);
+ ObjectAnimator rot = ObjectAnimator.ofFloat(child,
+ mHorizontal ? "rotationY" : "rotationX",
+ mHorizontal ? getRotationY() : getRotationX(),
+ 0);
+ AnimatorSet set = new AnimatorSet();
+ set.playTogether(trans, rot);
+ set.setDuration(100);
+ set.start();
+ }
+ mPullValue = 0;
+ } else {
+ if (mPullValue == 0) {
+ layer = true;
+ }
+ mPullValue += delta;
+ }
+ final int height = mHorizontal ? getWidth() : getHeight();
+ int oscroll = Math.abs(mPullValue);
+ int factor = (mPullValue <= 0) ? 1 : -1;
+ for (int i = 0; i < count; i++) {
+ View child = mContentView.getChildAt((mPullValue < 0)
+ ? i
+ : mContentView.getChildCount() - 1 - i);
+ if (child == null) break;
+ if (layer) {
+ }
+ float k = PULL_FACTOR[i];
+ float rot = -factor * ease(mCubic, oscroll, 0, k * 2, height);
+ int y = factor * (int) ease(mCubic, oscroll, 0, k*20, height);
+ if (mHorizontal) {
+ child.setTranslationX(y);
+ } else {
+ child.setTranslationY(y);
+ }
+ if (mHorizontal) {
+ child.setRotationY(-rot);
+ } else {
+ child.setRotationX(rot);
+ }
+ }
+ }
+
+ static class ContentLayout extends LinearLayout {
+
+ NavTabScroller mScroller;
+
+ public ContentLayout(Context context, NavTabScroller scroller) {
+ super(context);
+ mScroller = scroller;
}
@Override
- protected void onLayout(boolean changed, int l, int t, int r, int b) {
- super.onLayout(changed, l, t, r, b);
- if (mNeedsScroll) {
- mScroller.forceFinished(true);
- snapToSelected(mScrollPosition, false);
- mNeedsScroll = false;
+ protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
+ super.onMeasure(widthMeasureSpec, heightMeasureSpec);
+ if (mScroller.getGap() != 0) {
+ View v = getChildAt(0);
+ if (v != null) {
+ if (mScroller.isHorizontal()) {
+ int total = v.getMeasuredWidth() + getMeasuredWidth();
+ setMeasuredDimension(total, getMeasuredHeight());
+ } else {
+ int total = v.getMeasuredHeight() + getMeasuredHeight();
+ setMeasuredDimension(getMeasuredWidth(), total);
+ }
}
- if (mLayoutListener != null) {
- mLayoutListener.onLayout(l, t, r, b);
- mLayoutListener = null;
- }
- }
- void clearTabs() {
- mContentView.removeAllViews();
+ }
}
- void snapToSelected(int pos, boolean smooth) {
- if (pos < 0) return;
- View v = mContentView.getChildAt(pos);
- if (v == null) return;
- int sx = 0;
- int sy = 0;
- if (mHorizontal) {
- sx = (v.getLeft() + v.getRight() - getWidth()) / 2;
- } else {
- sy = (v.getTop() + v.getBottom() - getHeight()) / 2;
- }
- if ((sx != mScrollX) || (sy != mScrollY)) {
- if (smooth) {
- smoothScrollTo(sx,sy);
- } else {
- scrollTo(sx, sy);
- }
- }
- }
-
- protected void animateOut(View v) {
- if (v == null) return;
- animateOut(v, -mFlingVelocity);
- }
-
- private void animateOut(final View v, float velocity) {
- float start = mHorizontal ? v.getTranslationY() : v.getTranslationX();
- animateOut(v, velocity, start);
- }
-
- private void animateOut(final View v, float velocity, float start) {
- if ((v == null) || (mAnimator != null)) return;
- final int position = mContentView.indexOfChild(v);
- int target = 0;
- if (velocity < 0) {
- target = mHorizontal ? -getHeight() : -getWidth();
- } else {
- target = mHorizontal ? getHeight() : getWidth();
- }
- int distance = target - (mHorizontal ? v.getTop() : v.getLeft());
- long duration = (long) (Math.abs(distance) * 1000 / Math.abs(velocity));
- int scroll = 0;
- int translate = 0;
- int gap = mHorizontal ? v.getWidth() : v.getHeight();
- int centerView = getViewCenter(v);
- int centerScreen = getScreenCenter();
- int newpos = INVALID_POSITION;
- if (centerView < centerScreen - gap / 2) {
- // top view
- scroll = - (centerScreen - centerView - gap);
- translate = (position > 0) ? gap : 0;
- newpos = position;
- } else if (centerView > centerScreen + gap / 2) {
- // bottom view
- scroll = - (centerScreen + gap - centerView);
- if (position < mAdapter.getCount() - 1) {
- translate = -gap;
- }
- } else {
- // center view
- scroll = - (centerScreen - centerView);
- if (position < mAdapter.getCount() - 1) {
- translate = -gap;
- } else {
- scroll -= gap;
- }
- }
- mGapPosition = position;
- final int pos = newpos;
- ObjectAnimator trans = ObjectAnimator.ofFloat(v,
- (mHorizontal ? TRANSLATION_Y : TRANSLATION_X), start, target);
- ObjectAnimator alpha = ObjectAnimator.ofFloat(v, ALPHA, getAlpha(v,start),
- getAlpha(v,target));
- AnimatorSet set1 = new AnimatorSet();
- set1.playTogether(trans, alpha);
- set1.setDuration(duration);
- mAnimator = new AnimatorSet();
- ObjectAnimator trans2 = null;
- ObjectAnimator scroll1 = null;
- if (scroll != 0) {
- if (mHorizontal) {
- scroll1 = ObjectAnimator.ofInt(this, "scrollX", getScrollX(), getScrollX() + scroll);
- } else {
- scroll1 = ObjectAnimator.ofInt(this, "scrollY", getScrollY(), getScrollY() + scroll);
- }
- }
- if (translate != 0) {
- trans2 = ObjectAnimator.ofInt(this, "gap", 0, translate);
- }
- final int duration2 = 200;
- if (scroll1 != null) {
- if (trans2 != null) {
- AnimatorSet set2 = new AnimatorSet();
- set2.playTogether(scroll1, trans2);
- set2.setDuration(duration2);
- mAnimator.playSequentially(set1, set2);
- } else {
- scroll1.setDuration(duration2);
- mAnimator.playSequentially(set1, scroll1);
- }
- } else {
- if (trans2 != null) {
- trans2.setDuration(duration2);
- mAnimator.playSequentially(set1, trans2);
- }
- }
- mAnimator.addListener(new AnimatorListenerAdapter() {
- public void onAnimationEnd(Animator a) {
- if (mRemoveListener != null) {
- mRemoveListener.onRemovePosition(position);
- mAnimator = null;
- mGapPosition = INVALID_POSITION;
- mGap = 0;
- handleDataChanged(pos);
- }
- }
- });
- mAnimator.start();
- }
-
- public void setGap(int gap) {
- if (mGapPosition != INVALID_POSITION) {
- mGap = gap;
- postInvalidate();
- }
- }
-
- public int getGap() {
- return mGap;
- }
-
- void adjustGap() {
- for (int i = 0; i < mContentView.getChildCount(); i++) {
- final View child = mContentView.getChildAt(i);
- adjustViewGap(child, i);
- }
- }
-
- private void adjustViewGap(View view, int pos) {
- if ((mGap < 0 && pos > mGapPosition)
- || (mGap > 0 && pos < mGapPosition)) {
- if (mHorizontal) {
- view.setTranslationX(mGap);
- } else {
- view.setTranslationY(mGap);
- }
- }
- }
-
- private int getViewCenter(View v) {
- if (mHorizontal) {
- return v.getLeft() + v.getWidth() / 2;
- } else {
- return v.getTop() + v.getHeight() / 2;
- }
- }
-
- private int getScreenCenter() {
- if (mHorizontal) {
- return getScrollX() + getWidth() / 2;
- } else {
- return getScrollY() + getHeight() / 2;
- }
- }
-
- @Override
- public void draw(Canvas canvas) {
- if (mGapPosition > INVALID_POSITION) {
- adjustGap();
- }
- super.draw(canvas);
- }
-
- @Override
- protected View findViewAt(int x, int y) {
- x += mScrollX;
- y += mScrollY;
- final int count = mContentView.getChildCount();
- for (int i = count - 1; i >= 0; i--) {
- View child = mContentView.getChildAt(i);
- if (child.getVisibility() == View.VISIBLE) {
- if ((x >= child.getLeft()) && (x < child.getRight())
- && (y >= child.getTop()) && (y < child.getBottom())) {
- return child;
- }
- }
- }
- return null;
- }
-
- @Override
- protected void onOrthoDrag(View v, float distance) {
- if ((v != null) && (mAnimator == null)) {
- offsetView(v, distance);
- }
- }
-
- @Override
- protected void onOrthoDragFinished(View downView) {
- if (mAnimator != null) return;
- if (mIsOrthoDragged && downView != null) {
- // offset
- float diff = mHorizontal ? downView.getTranslationY() : downView.getTranslationX();
- if (Math.abs(diff) > (mHorizontal ? downView.getHeight() : downView.getWidth()) / 2) {
- // remove it
- animateOut(downView, Math.signum(diff) * mFlingVelocity, diff);
- } else {
- // snap back
- offsetView(downView, 0);
- }
- }
- }
-
- @Override
- protected void onOrthoFling(View v, float velocity) {
- if (v == null) return;
- if (mAnimator == null && Math.abs(velocity) > mFlingVelocity / 2) {
- animateOut(v, velocity);
- } else {
- offsetView(v, 0);
- }
- }
-
- private void offsetView(View v, float distance) {
- v.setAlpha(getAlpha(v, distance));
- if (mHorizontal) {
- v.setTranslationY(distance);
- } else {
- v.setTranslationX(distance);
- }
- }
-
- private float getAlpha(View v, float distance) {
- return 1 - (float) Math.abs(distance) / (mHorizontal ? v.getHeight() : v.getWidth());
- }
-
- private float ease(DecelerateInterpolator inter, float value, float start,
- float dist, float duration) {
- return start + dist * inter.getInterpolation(value / duration);
- }
-
- @Override
- protected void onPull(int delta) {
- boolean layer = false;
- int count = 2;
- if (delta == 0 && mPullValue == 0) return;
- if (delta == 0 && mPullValue != 0) {
- // reset
- for (int i = 0; i < count; i++) {
- View child = mContentView.getChildAt((mPullValue < 0)
- ? i
- : mContentView.getChildCount() - 1 - i);
- if (child == null) break;
- ObjectAnimator trans = ObjectAnimator.ofFloat(child,
- mHorizontal ? "translationX" : "translationY",
- mHorizontal ? getTranslationX() : getTranslationY(),
- 0);
- ObjectAnimator rot = ObjectAnimator.ofFloat(child,
- mHorizontal ? "rotationY" : "rotationX",
- mHorizontal ? getRotationY() : getRotationX(),
- 0);
- AnimatorSet set = new AnimatorSet();
- set.playTogether(trans, rot);
- set.setDuration(100);
- set.start();
- }
- mPullValue = 0;
- } else {
- if (mPullValue == 0) {
- layer = true;
- }
- mPullValue += delta;
- }
- final int height = mHorizontal ? getWidth() : getHeight();
- int oscroll = Math.abs(mPullValue);
- int factor = (mPullValue <= 0) ? 1 : -1;
- for (int i = 0; i < count; i++) {
- View child = mContentView.getChildAt((mPullValue < 0)
- ? i
- : mContentView.getChildCount() - 1 - i);
- if (child == null) break;
- if (layer) {
- }
- float k = PULL_FACTOR[i];
- float rot = -factor * ease(mCubic, oscroll, 0, k * 2, height);
- int y = factor * (int) ease(mCubic, oscroll, 0, k*20, height);
- if (mHorizontal) {
- child.setTranslationX(y);
- } else {
- child.setTranslationY(y);
- }
- if (mHorizontal) {
- child.setRotationY(-rot);
- } else {
- child.setRotationX(rot);
- }
- }
- }
-
- static class ContentLayout extends LinearLayout {
-
- NavTabScroller mScroller;
-
- public ContentLayout(Context context, NavTabScroller scroller) {
- super(context);
- mScroller = scroller;
- }
-
- @Override
- protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
- super.onMeasure(widthMeasureSpec, heightMeasureSpec);
- if (mScroller.getGap() != 0) {
- View v = getChildAt(0);
- if (v != null) {
- if (mScroller.isHorizontal()) {
- int total = v.getMeasuredWidth() + getMeasuredWidth();
- setMeasuredDimension(total, getMeasuredHeight());
- } else {
- int total = v.getMeasuredHeight() + getMeasuredHeight();
- setMeasuredDimension(getMeasuredWidth(), total);
- }
- }
-
- }
- }
-
- }
+ }
-} \ No newline at end of file
+}
diff --git a/src/com/android/browser/NavTabView.java b/src/com/android/browser/NavTabView.java
index b15e828f0..91f074c10 100644
--- a/src/com/android/browser/NavTabView.java
+++ b/src/com/android/browser/NavTabView.java
@@ -86,9 +86,9 @@ public class NavTabView extends LinearLayout {
mTitle.setText(txt);
}
if (mTab.isSnapshot()) {
- setTitleIcon(R.drawable.ic_history_holo_dark);
+ setTitleIcon(R.drawable.ic_history_dark);
} else if (mTab.isPrivateBrowsingEnabled()) {
- setTitleIcon(R.drawable.ic_incognito_holo_dark);
+ setTitleIcon(R.drawable.ic_incognito_dark);
} else {
setTitleIcon(0);
}
diff --git a/src/com/android/browser/NavigationBarPhone.java b/src/com/android/browser/NavigationBarPhone.java
index 6bdbf7d7c..cdf73c74f 100644
--- a/src/com/android/browser/NavigationBarPhone.java
+++ b/src/com/android/browser/NavigationBarPhone.java
@@ -83,8 +83,8 @@ public class NavigationBarPhone extends NavigationBarBase implements
mTitleContainer = findViewById(R.id.title_bg);
setFocusState(false);
Resources res = getContext().getResources();
- mStopDrawable = res.getDrawable(R.drawable.ic_stop_holo_dark);
- mRefreshDrawable = res.getDrawable(R.drawable.ic_refresh_holo_dark);
+ mStopDrawable = res.getDrawable(R.drawable.ic_stop_dark);
+ mRefreshDrawable = res.getDrawable(R.drawable.ic_refresh_dark);
mStopDescription = res.getString(R.string.accessibility_button_stop);
mRefreshDescription = res.getString(R.string.accessibility_button_refresh);
mTextfieldBgDrawable = res.getDrawable(R.drawable.textfield_active_holo_dark);
diff --git a/src/com/android/browser/NavigationBarTablet.java b/src/com/android/browser/NavigationBarTablet.java
index adfd5e799..d66553fbd 100644
--- a/src/com/android/browser/NavigationBarTablet.java
+++ b/src/com/android/browser/NavigationBarTablet.java
@@ -74,8 +74,8 @@ public class NavigationBarTablet extends NavigationBarBase implements StateListe
private void init(Context context) {
Resources resources = context.getResources();
- mStopDrawable = resources.getDrawable(R.drawable.ic_stop_holo_dark);
- mReloadDrawable = resources.getDrawable(R.drawable.ic_refresh_holo_dark);
+ mStopDrawable = resources.getDrawable(R.drawable.ic_stop_dark);
+ mReloadDrawable = resources.getDrawable(R.drawable.ic_refresh_dark);
mStopDescription = resources.getString(R.string.accessibility_button_stop);
mRefreshDescription = resources.getString(R.string.accessibility_button_refresh);
mFocusDrawable = resources.getDrawable(
@@ -140,11 +140,11 @@ public class NavigationBarTablet extends NavigationBarBase implements StateListe
void updateNavigationState(Tab tab) {
if (tab != null) {
mBackButton.setImageResource(tab.canGoBack()
- ? R.drawable.ic_back_holo_dark
- : R.drawable.ic_back_disabled_holo_dark);
+ ? R.drawable.ic_back_dark
+ : R.drawable.ic_back_disabled_dark);
mForwardButton.setImageResource(tab.canGoForward()
- ? R.drawable.ic_forward_holo_dark
- : R.drawable.ic_forward_disabled_holo_dark);
+ ? R.drawable.ic_forward_dark
+ : R.drawable.ic_forward_disabled_dark);
}
updateUrlIcon();
}
@@ -204,7 +204,7 @@ public class NavigationBarTablet extends NavigationBarBase implements StateListe
void updateUrlIcon() {
if (mUrlInput.hasFocus()) {
- mUrlIcon.setImageResource(R.drawable.ic_search_holo_dark);
+ mUrlIcon.setImageResource(R.drawable.ic_search_dark);
} else {
if (mFaviconDrawable == null) {
mFaviconDrawable = mBaseUi.getFaviconDrawable(null);
@@ -222,7 +222,7 @@ public class NavigationBarTablet extends NavigationBarBase implements StateListe
}
mSearchButton.setVisibility(View.GONE);
mStar.setVisibility(View.GONE);
- mUrlIcon.setImageResource(R.drawable.ic_search_holo_dark);
+ mUrlIcon.setImageResource(R.drawable.ic_search_dark);
} else {
if (mHideNavButtons) {
showNavButtons();
diff --git a/src/com/android/browser/PieControl.java b/src/com/android/browser/PieControl.java
index d853808b2..18c348e08 100644
--- a/src/com/android/browser/PieControl.java
+++ b/src/com/android/browser/PieControl.java
@@ -125,30 +125,30 @@ public class PieControl implements PieMenu.PieController, OnClickListener {
if (mUiController.getSettings().hasDesktopUseragent(view)) {
icon.setImageResource(R.drawable.ic_mobile);
} else {
- icon.setImageResource(R.drawable.ic_desktop_holo_dark);
+ icon.setImageResource(R.drawable.ic_desktop_dark);
}
}
return true;
}
protected void populateMenu() {
- mBack = makeItem(R.drawable.ic_back_holo_dark, 1);
- mUrl = makeItem(R.drawable.ic_web_holo_dark, 1);
- mBookmarks = makeItem(R.drawable.ic_bookmarks_holo_dark, 1);
- mHistory = makeItem(R.drawable.ic_history_holo_dark, 1);
- mAddBookmark = makeItem(R.drawable.ic_bookmark_on_holo_dark, 1);
- mRefresh = makeItem(R.drawable.ic_refresh_holo_dark, 1);
- mForward = makeItem(R.drawable.ic_forward_holo_dark, 1);
- mNewTab = makeItem(R.drawable.ic_new_window_holo_dark, 1);
- mIncognito = makeItem(R.drawable.ic_new_incognito_holo_dark, 1);
- mClose = makeItem(R.drawable.ic_close_window_holo_dark, 1);
+ mBack = makeItem(R.drawable.ic_back_dark, 1);
+ mUrl = makeItem(R.drawable.ic_web_dark, 1);
+ mBookmarks = makeItem(R.drawable.ic_bookmarks_dark, 1);
+ mHistory = makeItem(R.drawable.ic_history_dark, 1);
+ mAddBookmark = makeItem(R.drawable.ic_bookmark_on_dark, 1);
+ mRefresh = makeItem(R.drawable.ic_refresh_dark, 1);
+ mForward = makeItem(R.drawable.ic_forward_dark, 1);
+ mNewTab = makeItem(R.drawable.ic_new_window_dark, 1);
+ mIncognito = makeItem(R.drawable.ic_new_incognito_dark, 1);
+ mClose = makeItem(R.drawable.ic_close_window_dark, 1);
mInfo = makeItem(android.R.drawable.ic_menu_info_details, 1);
- mFind = makeItem(R.drawable.ic_search_holo_dark, 1);
- mShare = makeItem(R.drawable.ic_share_holo_dark, 1);
+ mFind = makeItem(R.drawable.ic_search_dark, 1);
+ mShare = makeItem(R.drawable.ic_share_dark, 1);
View tabs = makeTabsView();
mShowTabs = new PieItem(tabs, 1);
- mOptions = makeItem(R.drawable.ic_settings_holo_dark, 1);
- mRDS = makeItem(R.drawable.ic_desktop_holo_dark, 1);
+ mOptions = makeItem(R.drawable.ic_settings_dark, 1);
+ mRDS = makeItem(R.drawable.ic_desktop_dark, 1);
mTabAdapter = new TabAdapter(mActivity, mUiController);
PieStackView stack = new PieStackView(mActivity);
stack.setLayoutListener(new OnLayoutListener() {
@@ -272,7 +272,7 @@ public class PieControl implements PieMenu.PieController, OnClickListener {
mTabsCount = (TextView) v.findViewById(R.id.label);
mTabsCount.setText("1");
ImageView image = (ImageView) v.findViewById(R.id.icon);
- image.setImageResource(R.drawable.ic_windows_holo_dark);
+ image.setImageResource(R.drawable.ic_windows_dark);
image.setScaleType(ScaleType.CENTER);
LayoutParams lp = new LayoutParams(mItemSize, mItemSize);
v.setLayoutParams(lp);
diff --git a/src/com/android/browser/addbookmark/FolderSpinnerAdapter.java b/src/com/android/browser/addbookmark/FolderSpinnerAdapter.java
index f86c9c6e0..1cad1dddd 100644
--- a/src/com/android/browser/addbookmark/FolderSpinnerAdapter.java
+++ b/src/com/android/browser/addbookmark/FolderSpinnerAdapter.java
@@ -69,17 +69,17 @@ public class FolderSpinnerAdapter extends BaseAdapter {
switch (position) {
case HOME_SCREEN:
labelResource = R.string.add_to_homescreen_menu_option;
- drawableResource = R.drawable.ic_home_holo_dark;
+ drawableResource = R.drawable.ic_home_dark;
break;
case ROOT_FOLDER:
labelResource = R.string.add_to_bookmarks_menu_option;
- drawableResource = R.drawable.ic_bookmarks_holo_dark;
+ drawableResource = R.drawable.ic_bookmarks_dark;
break;
case RECENT_FOLDER:
// Fall through and use the same icon resource
case OTHER_FOLDER:
labelResource = R.string.add_to_other_folder_menu_option;
- drawableResource = R.drawable.ic_folder_holo_dark;
+ drawableResource = R.drawable.ic_folder_dark;
break;
default:
labelResource = 0;
diff --git a/src/com/android/browser/preferences/WebsiteSettingsFragment.java b/src/com/android/browser/preferences/WebsiteSettingsFragment.java
index c84c6693a..be38f3e03 100644
--- a/src/com/android/browser/preferences/WebsiteSettingsFragment.java
+++ b/src/com/android/browser/preferences/WebsiteSettingsFragment.java
@@ -219,9 +219,9 @@ public class WebsiteSettingsFragment extends ListFragment implements OnClickList
mUsageHighIcon = BitmapFactory.decodeResource(getResources(),
R.drawable.ic_list_data_large);
mLocationAllowedIcon = BitmapFactory.decodeResource(getResources(),
- R.drawable.ic_gps_on_holo_dark);
+ R.drawable.ic_gps_on_dark);
mLocationDisallowedIcon = BitmapFactory.decodeResource(getResources(),
- R.drawable.ic_gps_denied_holo_dark);
+ R.drawable.ic_gps_denied_dark);
mCurrentSite = site;
if (mCurrentSite == null) {
askForOrigins();
diff --git a/src/com/android/browser/provider/BrowserProvider2.java b/src/com/android/browser/provider/BrowserProvider2.java
index 97efb3f0b..e791a98ea 100644
--- a/src/com/android/browser/provider/BrowserProvider2.java
+++ b/src/com/android/browser/provider/BrowserProvider2.java
@@ -129,8 +129,8 @@ public class BrowserProvider2 extends SQLiteContentProvider {
qualifyColumn(TABLE_HISTORY, History.URL),
bookmarkOrHistoryColumn(Combined.TITLE),
bookmarkOrHistoryLiteral(Combined.URL,
- Integer.toString(R.drawable.ic_bookmark_off_holo_dark),
- Integer.toString(R.drawable.ic_history_holo_dark)),
+ Integer.toString(R.drawable.ic_bookmark_off_dark),
+ Integer.toString(R.drawable.ic_history_dark)),
qualifyColumn(TABLE_HISTORY, History.DATE_LAST_VISITED)};
private static final String SUGGEST_SELECTION =
diff --git a/src/com/android/browser/view/StopProgressView.java b/src/com/android/browser/view/StopProgressView.java
index 64fa5d030..5da3e15ad 100644
--- a/src/com/android/browser/view/StopProgressView.java
+++ b/src/com/android/browser/view/StopProgressView.java
@@ -58,7 +58,7 @@ public class StopProgressView extends ProgressBar {
private void init(AttributeSet attrs) {
mProgressDrawable = getIndeterminateDrawable();
setImageDrawable(mContext.getResources()
- .getDrawable(R.drawable.ic_stop_holo_dark));
+ .getDrawable(R.drawable.ic_stop_dark));
}
public void hideProgress() {
diff --git a/src/com/android/browser/widget/BookmarkThumbnailWidgetService.java b/src/com/android/browser/widget/BookmarkThumbnailWidgetService.java
index 209faadf7..3c40645a4 100644
--- a/src/com/android/browser/widget/BookmarkThumbnailWidgetService.java
+++ b/src/com/android/browser/widget/BookmarkThumbnailWidgetService.java
@@ -246,7 +246,7 @@ public class BookmarkThumbnailWidgetService extends RemoteViewsService {
} else {
views.setImageViewResource(R.id.thumb, R.drawable.thumb_bookmark_widget_folder_holo);
}
- views.setImageViewResource(R.id.favicon, R.drawable.ic_bookmark_widget_bookmark_holo_dark);
+ views.setImageViewResource(R.id.favicon, R.drawable.ic_bookmark_widget_bookmark_dark);
views.setDrawableParameters(R.id.thumb, true, 0, -1, null, -1);
} else {
// RemoteViews require a valid bitmap config