cpp-127: Text size in the buttons on tablet (Big buttons)
For some reason getDimension now returns dimension in pixels (?). Calling getDimensionPixelSize fixes the problem. Also optimized font size for large xhdpi tablets Fixes #127
This commit is contained in:
@@ -64,12 +64,12 @@ public final class CalculatorButtons {
|
||||
@Nonnull View root) {
|
||||
if (!layout.isOptimized()) {
|
||||
|
||||
final float textSize = root.getContext().getResources().getDimension(R.dimen.cpp_keyboard_button_text_size_mobile);
|
||||
final float textSize = root.getContext().getResources().getDimensionPixelSize(R.dimen.cpp_keyboard_button_text_size_mobile);
|
||||
|
||||
Views.processViewsOfType(root, DragButton.class, new Views.ViewProcessor<DragButton>() {
|
||||
@Override
|
||||
public void process(@Nonnull DragButton button) {
|
||||
button.setTextSize(TypedValue.COMPLEX_UNIT_DIP, textSize);
|
||||
button.setTextSize(TypedValue.COMPLEX_UNIT_PX, textSize);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user