summaryrefslogtreecommitdiff
path: root/library/main/src/com/android/setupwizardlib/view
diff options
context:
space:
mode:
Diffstat (limited to 'library/main/src/com/android/setupwizardlib/view')
-rw-r--r--library/main/src/com/android/setupwizardlib/view/NavigationBar.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/library/main/src/com/android/setupwizardlib/view/NavigationBar.java b/library/main/src/com/android/setupwizardlib/view/NavigationBar.java
index bc06976..2386339 100644
--- a/library/main/src/com/android/setupwizardlib/view/NavigationBar.java
+++ b/library/main/src/com/android/setupwizardlib/view/NavigationBar.java
@@ -23,6 +23,7 @@ import android.graphics.Color;
import android.graphics.drawable.Drawable;
import android.os.Build.VERSION;
import android.os.Build.VERSION_CODES;
+import android.text.TextUtils;
import android.util.AttributeSet;
import android.view.ContextThemeWrapper;
import android.view.View;
@@ -153,6 +154,14 @@ public class NavigationBar extends LinearLayout implements View.OnClickListener
}
}
}
+
+ @Override
+ protected void onTextChanged(CharSequence text, int start, int lengthBefore,
+ int lengthAfter) {
+ super.onTextChanged(text, start, lengthBefore, lengthAfter);
+ setCompoundDrawablePadding(TextUtils.isEmpty(text) ? 0 : getResources()
+ .getDimensionPixelSize(R.dimen.suw_navbar_button_drawable_padding));
+ }
}
}