refactor: renamed isNumRow to isNumbersRow

This commit is contained in:
ismailnurudeen 2023-04-20 11:53:56 +01:00
parent 5363970799
commit 7bb026b278
16 changed files with 19 additions and 19 deletions

View File

@ -97,7 +97,7 @@ class MyKeyboard {
var parent: MyKeyboard
var isNumRow: Boolean = false
var isNumbersRow: Boolean = false
constructor(parent: MyKeyboard) {
this.parent = parent
@ -109,7 +109,7 @@ class MyKeyboard {
defaultWidth = getDimensionOrFraction(a, R.styleable.MyKeyboard_keyWidth, parent.mDisplayWidth, parent.mDefaultWidth)
defaultHeight = (res.getDimension(R.dimen.key_height) * this.parent.mKeyboardHeightMultiplier).roundToInt()
defaultHorizontalGap = getDimensionOrFraction(a, R.styleable.MyKeyboard_horizontalGap, parent.mDisplayWidth, parent.mDefaultHorizontalGap)
isNumRow = a.getBoolean(R.styleable.MyKeyboard_isNumRow, false)
isNumbersRow = a.getBoolean(R.styleable.MyKeyboard_isNumbersRow, false)
a.recycle()
}
}
@ -346,7 +346,7 @@ class MyKeyboard {
when (parser.name) {
TAG_ROW -> {
currentRow = createRowFromXml(res, parser)
if (currentRow.isNumRow && !context.config.showNumbersRow) {
if (currentRow.isNumbersRow && !context.config.showNumbersRow) {
continue
}
inRow = true
@ -355,7 +355,7 @@ class MyKeyboard {
}
TAG_KEY -> {
if (currentRow?.isNumRow == true && !context.config.showNumbersRow) {
if (currentRow?.isNumbersRow == true && !context.config.showNumbersRow) {
continue
}
inKey = true

View File

@ -11,7 +11,7 @@
<declare-styleable name="MyKeyboard">
<attr name="keyWidth" format="fraction" />
<attr name="horizontalGap" format="fraction" />
<attr name="isNumRow" format="boolean" />
<attr name="isNumbersRow" format="boolean" />
</declare-styleable>
<declare-styleable name="MyKeyboard_Key">

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Keyboard xmlns:app="http://schemas.android.com/apk/res-auto">
<Row app:isNumRow="true">
<Row app:isNumbersRow="true">
<Key
app:keyEdgeFlags="left"
app:keyLabel="1"

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Keyboard xmlns:app="http://schemas.android.com/apk/res-auto">
<Row app:isNumRow="true">
<Row app:isNumbersRow="true">
<Key
app:keyEdgeFlags="left"
app:keyLabel="1"

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Keyboard xmlns:app="http://schemas.android.com/apk/res-auto">
<Row app:isNumRow="true">
<Row app:isNumbersRow="true">
<Key
app:keyEdgeFlags="left"
app:keyLabel="1"

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Keyboard xmlns:app="http://schemas.android.com/apk/res-auto">
<Row app:isNumRow="true">
<Row app:isNumbersRow="true">
<Key
app:keyEdgeFlags="left"
app:keyLabel="1"

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Keyboard xmlns:app="http://schemas.android.com/apk/res-auto">
<Row app:isNumRow="true">
<Row app:isNumbersRow="true">
<Key
app:keyEdgeFlags="left"
app:keyLabel="1"

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Keyboard xmlns:app="http://schemas.android.com/apk/res-auto">
<Row app:isNumRow="true">
<Row app:isNumbersRow="true">
<Key
app:keyEdgeFlags="left"
app:keyLabel="1"

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Keyboard xmlns:app="http://schemas.android.com/apk/res-auto">
<Row app:isNumRow="true">
<Row app:isNumbersRow="true">
<Key
app:keyEdgeFlags="left"
app:keyLabel="1"

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Keyboard xmlns:app="http://schemas.android.com/apk/res-auto">
<Row app:isNumRow="true">
<Row app:isNumbersRow="true">
<Key
app:keyEdgeFlags="left"
app:keyLabel="1"

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Keyboard xmlns:app="http://schemas.android.com/apk/res-auto">
<Row app:isNumRow="true">
<Row app:isNumbersRow="true">
<Key
app:keyEdgeFlags="left"
app:keyLabel="1"

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Keyboard xmlns:app="http://schemas.android.com/apk/res-auto">
<Row app:isNumRow="true">
<Row app:isNumbersRow="true">
<Key
app:keyEdgeFlags="left"
app:keyLabel="1"

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Keyboard xmlns:app="http://schemas.android.com/apk/res-auto">
<Row app:isNumRow="true">
<Row app:isNumbersRow="true">
<Key
app:keyEdgeFlags="left"
app:keyLabel="1"

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Keyboard xmlns:app="http://schemas.android.com/apk/res-auto">
<Row app:isNumRow="true">
<Row app:isNumbersRow="true">
<Key
app:keyEdgeFlags="left"
app:keyLabel="1"

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Keyboard xmlns:app="http://schemas.android.com/apk/res-auto">
<Row app:isNumRow="true">
<Row app:isNumbersRow="true">
<Key
app:keyEdgeFlags="left"
app:keyLabel="1"

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Keyboard xmlns:app="http://schemas.android.com/apk/res-auto">
<Row app:isNumRow="true">
<Row app:isNumbersRow="true">
<Key
app:keyEdgeFlags="left"
app:keyLabel="1"