mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
* Use and SP font size for marker labels on the map * Fix detekt issue
This commit is contained in:
parent
1a11c3351b
commit
5da827473a
2 changed files with 10 additions and 2 deletions
|
|
@ -19,6 +19,7 @@ package com.geeksville.mesh.android
|
|||
|
||||
import android.app.Activity
|
||||
import android.content.Context
|
||||
import android.util.TypedValue
|
||||
import android.view.inputmethod.InputMethodManager
|
||||
import android.widget.Toast
|
||||
|
||||
|
|
@ -35,3 +36,7 @@ fun Activity.hideKeyboard() {
|
|||
imm?.hideSoftInputFromWindow(v.windowToken, 0)
|
||||
}
|
||||
}
|
||||
|
||||
// Converts SP to pixels.
|
||||
fun Context.spToPx(sp: Float): Int =
|
||||
TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_SP, sp, resources.displayMetrics).toInt()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue