diff --git a/ui_spinner/src/main/java/de/kuschku/ui/internal/CollapsingTextHelper.java b/ui_spinner/src/main/java/de/kuschku/ui/internal/CollapsingTextHelper.java index 5c9314f0d..5396abea6 100644 --- a/ui_spinner/src/main/java/de/kuschku/ui/internal/CollapsingTextHelper.java +++ b/ui_spinner/src/main/java/de/kuschku/ui/internal/CollapsingTextHelper.java @@ -16,6 +16,7 @@ package de.kuschku.ui.internal; +import android.annotation.SuppressLint; import android.content.Context; import android.content.res.ColorStateList; import android.content.res.TypedArray; @@ -133,18 +134,17 @@ public void setCollapsedTextGravity(int gravity) { public void setCollapsedTextAppearance(int resId) { Context context = view.getContext(); - TypedArray a = context.obtainStyledAttributes(resId, R.styleable.TextAppearance); - ColorStateList textColor = MaterialResources.getColorStateList(context, a, R.styleable.TextAppearance_android_textColor); + TypedArray a = context.obtainStyledAttributes(resId, R.styleable.md_TextAppearance); + ColorStateList textColor = MaterialResources.getColorStateList(context, a, R.styleable.md_TextAppearance_android_textColor); if (textColor != null) { collapsedTextColor = textColor; } - float textSize = a.getDimension(R.styleable.TextAppearance_android_textSize, 0f); + float textSize = a.getDimension(R.styleable.md_TextAppearance_android_textSize, 0f); if (textSize != 0) { collapsedTextSize = textSize; } a.recycle(); - recalculate(); } @@ -212,6 +212,7 @@ private int getCurrentColor(@Nullable ColorStateList colorStateList) { return colorStateList.getDefaultColor(); } + @SuppressLint("RtlHardcoded") private void calculateBaseOffsets() { // We then calculate the collapsed text size, using the same logic calculateUsingTextSize(); diff --git a/ui_spinner/src/main/java/de/kuschku/ui/spinner/IndicatorViewController.java b/ui_spinner/src/main/java/de/kuschku/ui/spinner/IndicatorViewController.java index 2b413d5cb..2c679db7d 100644 --- a/ui_spinner/src/main/java/de/kuschku/ui/spinner/IndicatorViewController.java +++ b/ui_spinner/src/main/java/de/kuschku/ui/spinner/IndicatorViewController.java @@ -323,9 +323,11 @@ private TextView getCaptionViewFromDisplayState(@CaptionDisplayState int caption return errorView; case CAPTION_STATE_HELPER_TEXT: return helperTextView; - default: // No caption displayed, fall out and return null. + case CAPTION_STATE_NONE: + default: + // No caption displayed, fall out and return null. + return null; } - return null; } void adjustIndicatorPadding() {