let's preserve old typeface style
This commit is contained in:
parent
a9762aaab4
commit
c9dd0c0c86
@ -220,7 +220,12 @@ public abstract class AbstractCalculatorHelper implements SharedPreferences.OnSh
|
|||||||
Views.processViewsOfType(root, TextView.class, new Views.ViewProcessor<TextView>() {
|
Views.processViewsOfType(root, TextView.class, new Views.ViewProcessor<TextView>() {
|
||||||
@Override
|
@Override
|
||||||
public void process(@Nonnull TextView view) {
|
public void process(@Nonnull TextView view) {
|
||||||
view.setTypeface(typeFace);
|
int style = Typeface.NORMAL;
|
||||||
|
final Typeface oldTypeface = view.getTypeface();
|
||||||
|
if (oldTypeface != null) {
|
||||||
|
style = oldTypeface.getStyle();
|
||||||
|
}
|
||||||
|
view.setTypeface(typeFace, style);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user