let's preserve old typeface style

This commit is contained in:
serso 2014-09-09 14:55:11 +02:00
parent a9762aaab4
commit c9dd0c0c86

View File

@ -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);
} }
}); });
} }