summaryrefslogtreecommitdiff
path: root/main/src/com/google/android/setupdesign/view/NavigationBar.java
diff options
context:
space:
mode:
authorSetup Wizard Team <android-setup-team-eng@google.com>2019-12-31 20:58:11 +0800
committerPasty Chang <pastychang@google.com>2019-01-03 02:45:20 +0000
commit345d220b699eb61a85d0e9b69438a154d5d4bc46 (patch)
tree24feade13468b26e490297aee2f487035bb88b4f /main/src/com/google/android/setupdesign/view/NavigationBar.java
parent545407a543787b20ff37e59c1bff7ce03e584a4b (diff)
downloadsetupdesign-345d220b699eb61a85d0e9b69438a154d5d4bc46.tar.gz
Import updated Android Setupdesign Library 227351086
Test: mm PiperOrigin-RevId: 227351086 Change-Id: I12fb273204bd0a999b813d3e33af0556263dc0fb
Diffstat (limited to 'main/src/com/google/android/setupdesign/view/NavigationBar.java')
-rw-r--r--main/src/com/google/android/setupdesign/view/NavigationBar.java16
1 files changed, 8 insertions, 8 deletions
diff --git a/main/src/com/google/android/setupdesign/view/NavigationBar.java b/main/src/com/google/android/setupdesign/view/NavigationBar.java
index ac0f8c8..9d978f0 100644
--- a/main/src/com/google/android/setupdesign/view/NavigationBar.java
+++ b/main/src/com/google/android/setupdesign/view/NavigationBar.java
@@ -50,16 +50,16 @@ public class NavigationBar extends LinearLayout implements View.OnClickListener
private static int getNavbarTheme(Context context) {
// Normally we can automatically guess the theme by comparing the foreground color against
- // the background color. But we also allow specifying explicitly using suwNavBarTheme.
+ // the background color. But we also allow specifying explicitly using sudNavBarTheme.
TypedArray attributes =
context.obtainStyledAttributes(
new int[] {
- R.attr.suwNavBarTheme, android.R.attr.colorForeground, android.R.attr.colorBackground
+ R.attr.sudNavBarTheme, android.R.attr.colorForeground, android.R.attr.colorBackground
});
- @StyleableRes int suwNavBarTheme = 0;
+ @StyleableRes int navBarTheme = 0;
@StyleableRes int colorForeground = 1;
@StyleableRes int colorBackground = 2;
- int theme = attributes.getResourceId(suwNavBarTheme, 0);
+ int theme = attributes.getResourceId(navBarTheme, 0);
if (theme == 0) {
// Compare the value of the foreground against the background color to see if current
// theme is light-on-dark or dark-on-light.
@@ -68,7 +68,7 @@ public class NavigationBar extends LinearLayout implements View.OnClickListener
Color.colorToHSV(attributes.getColor(colorForeground, 0), foregroundHsv);
Color.colorToHSV(attributes.getColor(colorBackground, 0), backgroundHsv);
boolean isDarkBg = foregroundHsv[2] > backgroundHsv[2];
- theme = isDarkBg ? R.style.SuwNavBarThemeDark : R.style.SuwNavBarThemeLight;
+ theme = isDarkBg ? R.style.SudNavBarThemeDark : R.style.SudNavBarThemeLight;
}
attributes.recycle();
return theme;
@@ -104,9 +104,9 @@ public class NavigationBar extends LinearLayout implements View.OnClickListener
// available in LinearLayout before v11, so call super with the exact same arguments.
private void init() {
View.inflate(getContext(), R.layout.sud_navbar_view, this);
- nextButton = (Button) findViewById(R.id.suw_navbar_next);
- backButton = (Button) findViewById(R.id.suw_navbar_back);
- moreButton = (Button) findViewById(R.id.suw_navbar_more);
+ nextButton = (Button) findViewById(R.id.sud_navbar_next);
+ backButton = (Button) findViewById(R.id.sud_navbar_back);
+ moreButton = (Button) findViewById(R.id.sud_navbar_more);
}
public Button getBackButton() {