Small behavior/display fixes/improvements

This commit is contained in:
M66B
2019-10-04 20:06:59 +02:00
parent 725c4d9202
commit 708ea16296
5 changed files with 31 additions and 23 deletions

View File

@@ -280,6 +280,11 @@ public class Helper {
return Math.round(dp * scale);
}
static int pixels2dp(Context context, float pixels) {
float scale = context.getResources().getDisplayMetrics().density;
return Math.round(pixels / scale);
}
static float getTextSize(Context context, int zoom) {
TypedArray ta = null;
try {