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/AddBookmarkPage.java2
-rw-r--r--src/com/android/browser/BaseUi.java6
-rw-r--r--src/com/android/browser/BreadCrumbView.java9
-rw-r--r--src/com/android/browser/BrowserBookmarksAdapter.java2
-rw-r--r--src/com/android/browser/BrowserBookmarksPage.java2
-rw-r--r--src/com/android/browser/TabBar.java10
-rw-r--r--src/com/android/browser/TitleBarXLarge.java25
-rw-r--r--src/com/android/browser/XLargeUi.java6
-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.java2
11 files changed, 52 insertions, 22 deletions
diff --git a/src/com/android/browser/AddBookmarkPage.java b/src/com/android/browser/AddBookmarkPage.java
index ee080ca..1444862 100644
--- a/src/com/android/browser/AddBookmarkPage.java
+++ b/src/com/android/browser/AddBookmarkPage.java
@@ -684,7 +684,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_bookmark_widget_holo_dark);
+ mHeaderIcon = getResources().getDrawable(R.drawable.ic_folder_holo_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 98fc349..20652cf 100644
--- a/src/com/android/browser/BaseUi.java
+++ b/src/com/android/browser/BaseUi.java
@@ -99,7 +99,7 @@ public abstract class BaseUi implements UI, WebViewFactory {
Resources res = mActivity.getResources();
mInputManager = (InputMethodManager)
browser.getSystemService(Activity.INPUT_METHOD_SERVICE);
- mSecLockIcon = res.getDrawable(R.drawable.ic_secure);
+ mSecLockIcon = res.getDrawable(R.drawable.ic_secure_holo_dark);
mMixLockIcon = res.getDrawable(R.drawable.ic_partial_secure);
FrameLayout frameLayout = (FrameLayout) mActivity.getWindow()
@@ -184,6 +184,7 @@ public abstract class BaseUi implements UI, WebViewFactory {
setUrlTitle(tab);
setFavicon(tab);
updateLockIconToLatest(tab);
+ updateNavigationState(tab);
}
@Override
@@ -518,6 +519,9 @@ public abstract class BaseUi implements UI, WebViewFactory {
// -------------------------------------------------------------------------
+ protected void updateNavigationState(Tab tab) {
+ }
+
/**
* Update the lock icon to correspond to our latest state.
*/
diff --git a/src/com/android/browser/BreadCrumbView.java b/src/com/android/browser/BreadCrumbView.java
index b8409f0..9aaecd7 100644
--- a/src/com/android/browser/BreadCrumbView.java
+++ b/src/com/android/browser/BreadCrumbView.java
@@ -21,6 +21,7 @@ import android.content.res.TypedArray;
import android.graphics.drawable.Drawable;
import android.text.TextUtils;
import android.util.AttributeSet;
+import android.util.TypedValue;
import android.view.Gravity;
import android.view.View;
import android.view.View.OnClickListener;
@@ -161,8 +162,12 @@ public class BreadCrumbView extends LinearLayout implements OnClickListener {
private void addBackButton() {
mBackButton = new ImageButton(mContext);
- mBackButton.setImageResource(R.drawable.ic_back_normal);
- mBackButton.setBackgroundResource(R.drawable.browserbarbutton);
+ mBackButton.setImageResource(R.drawable.ic_back_hierarchy_holo_dark);
+ TypedValue outValue = new TypedValue();
+ getContext().getTheme().resolveAttribute(
+ android.R.attr.selectableItemBackground, outValue, true);
+ int resid = outValue.resourceId;
+ mBackButton.setBackgroundResource(resid);
mBackButton.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT,
LayoutParams.MATCH_PARENT));
mBackButton.setOnClickListener(this);
diff --git a/src/com/android/browser/BrowserBookmarksAdapter.java b/src/com/android/browser/BrowserBookmarksAdapter.java
index ccd2fbc..9e71077 100644
--- a/src/com/android/browser/BrowserBookmarksAdapter.java
+++ b/src/com/android/browser/BrowserBookmarksAdapter.java
@@ -87,7 +87,7 @@ class BrowserBookmarksAdapter extends CursorAdapter {
tv.setText(cursor.getString(BookmarksLoader.COLUMN_INDEX_TITLE));
if (cursor.getInt(BookmarksLoader.COLUMN_INDEX_IS_FOLDER) != 0) {
// folder
- favicon.setImageResource(R.drawable.ic_folder_bookmark_widget_holo_dark);
+ favicon.setImageResource(R.drawable.ic_folder_holo_dark);
favicon.setBackgroundDrawable(null);
} else {
byte[] faviconData = cursor.getBlob(BookmarksLoader.COLUMN_INDEX_FAVICON);
diff --git a/src/com/android/browser/BrowserBookmarksPage.java b/src/com/android/browser/BrowserBookmarksPage.java
index cbaad2b..fa7a5e2 100644
--- a/src/com/android/browser/BrowserBookmarksPage.java
+++ b/src/com/android/browser/BrowserBookmarksPage.java
@@ -382,7 +382,7 @@ public class BrowserBookmarksPage extends Fragment implements View.OnCreateConte
if (isFolder) {
item.setUrl(null);
Bitmap bitmap =
- BitmapFactory.decodeResource(getResources(), R.drawable.ic_folder_bookmark_widget_holo_dark);
+ BitmapFactory.decodeResource(getResources(), R.drawable.ic_folder_holo_dark);
item.setFavicon(bitmap);
new LookupBookmarkCount(getActivity(), item)
.execute(cursor.getLong(BookmarksLoader.COLUMN_INDEX_ID));
diff --git a/src/com/android/browser/TabBar.java b/src/com/android/browser/TabBar.java
index b872cad..b0057ed 100644
--- a/src/com/android/browser/TabBar.java
+++ b/src/com/android/browser/TabBar.java
@@ -91,6 +91,7 @@ public class TabBar extends LinearLayout
private BitmapShader mInactiveShader;
private int mTabOverlap;
+ private int mAddTabOverlap;
private int mTabSliceWidth;
private int mTabPadding;
private boolean mUseQuickControls;
@@ -123,6 +124,7 @@ public class TabBar extends LinearLayout
mButtonWidth = -1;
// tab dimensions
mTabOverlap = (int) res.getDimension(R.dimen.tab_overlap);
+ mAddTabOverlap = (int) res.getDimension(R.dimen.tab_addoverlap);
mTabSliceWidth = (int) res.getDimension(R.dimen.tab_slice);
mTabPadding = (int) res.getDimension(R.dimen.tab_padding);
@@ -159,7 +161,7 @@ public class TabBar extends LinearLayout
int w = getMeasuredWidth();
// adjust for new tab overlap
if (!mUseQuickControls) {
- w -= mTabOverlap;
+ w -= mAddTabOverlap;
}
setMeasuredDimension(w, getMeasuredHeight());
}
@@ -174,7 +176,7 @@ public class TabBar extends LinearLayout
if (mUseQuickControls) {
mButtonWidth = 0;
} else {
- mButtonWidth = mNewTab.getMeasuredWidth() - mTabOverlap;
+ mButtonWidth = mNewTab.getMeasuredWidth() - mAddTabOverlap;
if (w-sw < mButtonWidth) {
sw = w - mButtonWidth;
}
@@ -182,8 +184,8 @@ public class TabBar extends LinearLayout
mTabs.layout(pl, pt, pl + sw, bottom - top);
// adjust for overlap
if (!mUseQuickControls) {
- mNewTab.layout(pl + sw - mTabOverlap, pt,
- pl + sw + mButtonWidth - mTabOverlap, bottom - top);
+ mNewTab.layout(pl + sw - mAddTabOverlap, pt,
+ pl + sw + mButtonWidth - mAddTabOverlap, bottom - top);
}
}
diff --git a/src/com/android/browser/TitleBarXLarge.java b/src/com/android/browser/TitleBarXLarge.java
index b5a8032..b5085b8 100644
--- a/src/com/android/browser/TitleBarXLarge.java
+++ b/src/com/android/browser/TitleBarXLarge.java
@@ -36,6 +36,7 @@ import android.view.View;
import android.view.View.OnClickListener;
import android.view.View.OnFocusChangeListener;
import android.webkit.WebView;
+import android.widget.ImageButton;
import android.widget.ImageView;
import java.util.List;
@@ -56,8 +57,8 @@ public class TitleBarXLarge extends TitleBarBase
private Drawable mReloadDrawable;
private View mContainer;
- private View mBackButton;
- private View mForwardButton;
+ private ImageButton mBackButton;
+ private ImageButton mForwardButton;
private ImageView mStar;
private View mSearchButton;
private View mUrlContainer;
@@ -83,8 +84,8 @@ public class TitleBarXLarge extends TitleBarBase
mUiController = controller;
mUi = ui;
Resources resources = activity.getResources();
- mStopDrawable = resources.getDrawable(R.drawable.ic_stop_normal);
- mReloadDrawable = resources.getDrawable(R.drawable.ic_refresh_normal);
+ mStopDrawable = resources.getDrawable(R.drawable.ic_stop_holo_dark);
+ mReloadDrawable = resources.getDrawable(R.drawable.ic_refresh_holo_dark);
mFocusDrawable = resources.getDrawable(
R.drawable.textfield_active_holo_dark);
mUnfocusDrawable = resources.getDrawable(
@@ -102,8 +103,8 @@ public class TitleBarXLarge extends TitleBarBase
mAllButton = findViewById(R.id.all_btn);
// TODO: Change enabled states based on whether you can go
// back/forward. Probably should be done inside onPageStarted.
- mBackButton = findViewById(R.id.back);
- mForwardButton = findViewById(R.id.forward);
+ mBackButton = (ImageButton) findViewById(R.id.back);
+ mForwardButton = (ImageButton) findViewById(R.id.forward);
mStar = (ImageView) findViewById(R.id.star);
mStopButton = (ImageView) findViewById(R.id.stop);
mSearchButton = findViewById(R.id.search);
@@ -133,6 +134,18 @@ public class TitleBarXLarge extends TitleBarBase
setUrlMode(false);
}
+ void updateNavigationState(Tab tab) {
+ WebView web = tab.getWebView();
+ if (web != null) {
+ mBackButton.setImageResource(web.canGoBack()
+ ? R.drawable.ic_back_holo_dark
+ : R.drawable.ic_back_disabled_holo_dark);
+ mForwardButton.setImageResource(web.canGoForward()
+ ? R.drawable.ic_forward_holo_dark
+ : R.drawable.ic_forward_disabled_holo_dark);
+ }
+ }
+
public void setEditable(boolean editable) {
mEditable = editable;
mUrlInput.setFocusable(mEditable);
diff --git a/src/com/android/browser/XLargeUi.java b/src/com/android/browser/XLargeUi.java
index d50d94e..a9cc9fe 100644
--- a/src/com/android/browser/XLargeUi.java
+++ b/src/com/android/browser/XLargeUi.java
@@ -342,6 +342,12 @@ public class XLargeUi extends BaseUi implements ScrollListener {
}
@Override
+ protected void updateNavigationState(Tab tab) {
+ mTitleBar.updateNavigationState(tab);
+ mFakeTitleBar.updateNavigationState(tab);
+ }
+
+ @Override
public void setUrlTitle(Tab tab) {
super.setUrlTitle(tab);
mTabBar.onUrlAndTitle(tab, tab.getUrl(), tab.getTitle());
diff --git a/src/com/android/browser/addbookmark/FolderSpinnerAdapter.java b/src/com/android/browser/addbookmark/FolderSpinnerAdapter.java
index 0144300..0712469 100644
--- a/src/com/android/browser/addbookmark/FolderSpinnerAdapter.java
+++ b/src/com/android/browser/addbookmark/FolderSpinnerAdapter.java
@@ -54,15 +54,15 @@ public class FolderSpinnerAdapter implements SpinnerAdapter {
switch (position) {
case HOME_SCREEN:
labelResource = R.string.add_to_homescreen_menu_option;
- drawableResource = R.drawable.ic_home;
+ drawableResource = R.drawable.ic_home_holo_dark;
break;
case ROOT_FOLDER:
labelResource = R.string.add_to_bookmarks_menu_option;
- drawableResource = R.drawable.ic_menu_bookmarks;
+ drawableResource = R.drawable.ic_bookmarks_holo_dark;
break;
case OTHER_FOLDER:
labelResource = R.string.add_to_other_folder_menu_option;
- drawableResource = R.drawable.ic_folder_bookmark_widget_holo_dark;
+ drawableResource = R.drawable.ic_folder_holo_dark;
break;
default:
labelResource = 0;
diff --git a/src/com/android/browser/preferences/WebsiteSettingsFragment.java b/src/com/android/browser/preferences/WebsiteSettingsFragment.java
index 1965ffe..6339d72 100644
--- a/src/com/android/browser/preferences/WebsiteSettingsFragment.java
+++ b/src/com/android/browser/preferences/WebsiteSettingsFragment.java
@@ -191,9 +191,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_list_gps_on);
+ R.drawable.ic_gps_on_holo_dark);
mLocationDisallowedIcon = BitmapFactory.decodeResource(getResources(),
- R.drawable.ic_list_gps_denied);
+ R.drawable.ic_gps_denied_holo_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 ff00c56..a51635c 100644
--- a/src/com/android/browser/provider/BrowserProvider2.java
+++ b/src/com/android/browser/provider/BrowserProvider2.java
@@ -1564,7 +1564,7 @@ public class BrowserProvider2 extends SQLiteContentProvider {
case SUGGEST_COLUMN_TEXT_1_ID:
return mSource.getString(TITLE_INDEX);
case SUGGEST_COLUMN_ICON_1_ID:
- return Integer.toString(R.drawable.ic_favorite_off_normal);
+ return Integer.toString(R.drawable.ic_bookmark_off_holo_dark);
}
return null;
}