|
@@ -6,9 +6,6 @@ import android.graphics.drawable.Drawable;
|
6
|
6
|
import android.support.annotation.NonNull;
|
7
|
7
|
import android.support.v7.widget.ActionMenuView;
|
8
|
8
|
import android.support.v7.widget.Toolbar;
|
9
|
|
-import android.text.Spannable;
|
10
|
|
-import android.text.SpannableString;
|
11
|
|
-import android.text.style.AbsoluteSizeSpan;
|
12
|
9
|
import android.util.Log;
|
13
|
10
|
import android.view.MenuItem;
|
14
|
11
|
import android.widget.ImageButton;
|
|
@@ -128,7 +125,7 @@ public class TopBarButtonController extends ViewController<TitleBarReactButtonVi
|
128
|
125
|
});
|
129
|
126
|
} else {
|
130
|
127
|
optionsPresenter.setTextColor();
|
131
|
|
- setFontSize(menuItem);
|
|
128
|
+ if (button.fontSize.hasValue()) optionsPresenter.setFontSize(menuItem);
|
132
|
129
|
optionsPresenter.setTypeFace(button.fontFamily);
|
133
|
130
|
}
|
134
|
131
|
}
|
|
@@ -148,18 +145,6 @@ public class TopBarButtonController extends ViewController<TitleBarReactButtonVi
|
148
|
145
|
}
|
149
|
146
|
}
|
150
|
147
|
|
151
|
|
- private void setFontSize(MenuItem menuItem) {
|
152
|
|
- SpannableString spanString = new SpannableString(button.title.get());
|
153
|
|
- if (this.button.fontSize.hasValue())
|
154
|
|
- spanString.setSpan(
|
155
|
|
- new AbsoluteSizeSpan(button.fontSize.get(), true),
|
156
|
|
- 0,
|
157
|
|
- button.title.get().length(),
|
158
|
|
- Spannable.SPAN_INCLUSIVE_INCLUSIVE
|
159
|
|
- );
|
160
|
|
- menuItem.setTitleCondensed(spanString);
|
161
|
|
- }
|
162
|
|
-
|
163
|
148
|
private void setTestId(Toolbar toolbar, Text testId) {
|
164
|
149
|
if (!testId.hasValue()) return;
|
165
|
150
|
UiUtils.runOnPreDrawOnce(toolbar, () -> {
|