diff options
author | Michael Kolb <kolby@google.com> | 2011-01-13 20:35:06 -0800 |
---|---|---|
committer | Michael Kolb <kolby@google.com> | 2011-01-20 11:33:56 -0800 |
commit | 5a72f1858c2f73be3558c6cdaa2c84b4c36fa748 (patch) | |
tree | 4d27e2f21e1c080baaf07298deb8729dda61a6f7 /src/com/android/browser/TitleBarXLarge.java | |
parent | 91c83a0ffb0d33a614fefa6ee81ead47ec0d114b (diff) | |
download | packages_apps_Browser-5a72f1858c2f73be3558c6cdaa2c84b4c36fa748.zip packages_apps_Browser-5a72f1858c2f73be3558c6cdaa2c84b4c36fa748.tar.gz packages_apps_Browser-5a72f1858c2f73be3558c6cdaa2c84b4c36fa748.tar.bz2 |
asset drop & naming
drop in new assets
get naming in sync with UX
Note: not all resources are included yet
item_background...xm will be enabled when all required resources come in
Change-Id: I321084abd25ef6c533f1f3da636a246e7ee00547
Diffstat (limited to 'src/com/android/browser/TitleBarXLarge.java')
-rw-r--r-- | src/com/android/browser/TitleBarXLarge.java | 25 |
1 files changed, 19 insertions, 6 deletions
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); |