/*
- * Copyright © 2018 Damyan Ivanov.
+ * Copyright © 2019 Damyan Ivanov.
* This file is part of MoLe.
* MoLe is free software: you can distribute it and/or modify it
* under the term of the GNU General Public License as published by
return Math.round(TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, dp,
context.getResources().getDisplayMetrics()));
}
+ public static int sp2px(Context context, float sp) {
+ return Math.round(TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_SP, sp,
+ context.getResources().getDisplayMetrics()));
+ }
}