summaryrefslogtreecommitdiffstats
path: root/src/com/android/browser/NavigationBarTablet.java
diff options
context:
space:
mode:
authorEnrico Ros <eros@codeaurora.org>2014-11-18 20:15:48 -0800
committerWebTech Code Review <code-review@localhost>2014-12-01 09:53:43 -0800
commit1f5a0952599285350be6b1351110518086047fd1 (patch)
tree6af2ffdb24ad21ad6cb567efb415e635de937daf /src/com/android/browser/NavigationBarTablet.java
parent49b7925ec66faf5015fdd1862eada2978ddd5fde (diff)
downloadandroid_packages_apps_Gello-1f5a0952599285350be6b1351110518086047fd1.tar.gz
android_packages_apps_Gello-1f5a0952599285350be6b1351110518086047fd1.tar.bz2
android_packages_apps_Gello-1f5a0952599285350be6b1351110518086047fd1.zip
Clean visual style: move to Light, add Material support, change Drawables (progress, icons).
This code alters the visual style moving the APP to a Light theme. Parents of the theme are either Theme.Holo.Light or Theme.Material.Light depending on which API we start the APK from. Needs SDK 21 to build. Other than the visual changes, this commit changes: - name of the APP to 'Browser' - animations and sequencing of the Tab switcher in {nav/anim}_screen - removal of the warning icon from the Exit dialog - change of the favicon appearance (removal of the double border) Vast amount of unused resources are removed from the APK. Just XHDPI drawables have been synthesized for now, and the Primary color was used for the icons and is accessible in R.color.Primary. Change-Id: If75cc051c5d4015383e96066cdb6507484e625d8
Diffstat (limited to 'src/com/android/browser/NavigationBarTablet.java')
-rw-r--r--src/com/android/browser/NavigationBarTablet.java26
1 files changed, 7 insertions, 19 deletions
diff --git a/src/com/android/browser/NavigationBarTablet.java b/src/com/android/browser/NavigationBarTablet.java
index a965e0a7..17f7398e 100644
--- a/src/com/android/browser/NavigationBarTablet.java
+++ b/src/com/android/browser/NavigationBarTablet.java
@@ -31,7 +31,6 @@ import android.view.View;
import android.widget.ImageButton;
import android.widget.ImageView;
-import com.android.browser.R;
import com.android.browser.UI.ComboViews;
import com.android.browser.UrlInputView.StateListener;
@@ -53,8 +52,6 @@ public class NavigationBarTablet extends NavigationBarBase implements StateListe
private View mClearButton;
private View mVoiceButton;
private View mNavButtons;
- private Drawable mFocusDrawable;
- private Drawable mUnfocusDrawable;
private boolean mHideNavButtons;
private Drawable mFaviconDrawable;
@@ -75,14 +72,10 @@ 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_action_stop);
+ mReloadDrawable = resources.getDrawable(R.drawable.ic_action_reload);
mStopDescription = resources.getString(R.string.accessibility_button_stop);
mRefreshDescription = resources.getString(R.string.accessibility_button_refresh);
- mFocusDrawable = resources.getDrawable(
- R.drawable.textfield_active_holo_dark);
- mUnfocusDrawable = resources.getDrawable(
- R.drawable.textfield_default_holo_dark);
mHideNavButtons = resources.getBoolean(R.bool.hide_nav_buttons);
}
@@ -140,12 +133,8 @@ 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);
- mForwardButton.setImageResource(tab.canGoForward()
- ? R.drawable.ic_forward_holo_dark
- : R.drawable.ic_forward_disabled_holo_dark);
+ mBackButton.setEnabled(tab.canGoBack());
+ mForwardButton.setEnabled(tab.canGoBack());
}
updateUrlIcon();
}
@@ -205,7 +194,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_action_search_normal);
} else {
if (mFaviconDrawable == null) {
mFaviconDrawable = mBaseUi.getFaviconDrawable(null);
@@ -223,7 +212,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_action_search_normal);
} else {
if (mHideNavButtons) {
showNavButtons();
@@ -232,8 +221,6 @@ public class NavigationBarTablet extends NavigationBarBase implements StateListe
mSearchButton.setVisibility(View.VISIBLE);
updateUrlIcon();
}
- mUrlContainer.setBackgroundDrawable(focus
- ? mFocusDrawable : mUnfocusDrawable);
}
private void stopOrRefresh() {
@@ -324,6 +311,7 @@ public class NavigationBarTablet extends NavigationBarBase implements StateListe
@Override
public void onStateChanged(int state) {
+ super.onStateChanged(state);
mVoiceButton.setVisibility(View.GONE);
switch(state) {
case STATE_NORMAL: