mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-05-17 07:22:45 +00:00
use TypedValueCompat for dp <-> px conversion
This commit is contained in:
parent
1874e11d30
commit
a0c7b28b91
8 changed files with 18 additions and 11 deletions
|
@ -58,7 +58,7 @@ fun loadCustomLayout(layoutContent: String, layoutName: String, languageTag: Str
|
|||
.setView(EditText(context).apply {
|
||||
setText(name)
|
||||
doAfterTextChanged { name = it.toString() }
|
||||
val padding = (8 * context.resources.displayMetrics.density).toInt()
|
||||
val padding = ResourceUtils.toPx(8, context.resources)
|
||||
setPadding(3 * padding, padding, 3 * padding, padding)
|
||||
inputType = InputType.TYPE_CLASS_TEXT or InputType.TYPE_TEXT_VARIATION_NORMAL
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue