From ed211fbccd42f61d56a8d2bdb97f3f4e7d9caf9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danilo=20Dom=C3=ADnguez=20P=C3=A9rez?= Date: Thu, 23 Jan 2025 09:20:25 -0500 Subject: [PATCH 01/10] Intercept touch event to handle it before the cursor is moved --- .../kotlin/org/wordpress/aztec/AztecText.kt | 33 +++++++++++++++++-- .../aztec/formatting/BlockFormatter.kt | 4 +++ 2 files changed, 34 insertions(+), 3 deletions(-) diff --git a/aztec/src/main/kotlin/org/wordpress/aztec/AztecText.kt b/aztec/src/main/kotlin/org/wordpress/aztec/AztecText.kt index a326e684a..221f4229c 100644 --- a/aztec/src/main/kotlin/org/wordpress/aztec/AztecText.kt +++ b/aztec/src/main/kotlin/org/wordpress/aztec/AztecText.kt @@ -703,7 +703,34 @@ open class AztecText : AppCompatEditText, TextWatcher, UnknownHtmlSpan.OnUnknown return containingBoxBounds } + private fun getTaskListHandler(): TaskListClickHandler? { + return EnhancedMovementMethod.taskListClickHandler + } + override fun onTouchEvent(event: MotionEvent): Boolean { + var x = event.x.toInt() + var y = event.y.toInt() + + x -= totalPaddingLeft + y -= totalPaddingTop + + x += scrollX + y += scrollY + + // Check if we're in the task list area + if (x + totalPaddingStart <= blockFormatter.listStyleLeadingMargin()) { + val line = layout.getLineForVertical(y) + val off = layout.getOffsetForHorizontal(line, x.toFloat()) + if (getTaskListHandler()?.handleTaskListClick( + text, + off, + x, + totalPaddingStart + ) == true) { + return false + } + } + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P && event.action == MotionEvent.ACTION_DOWN) { // we'll use these values in OnLongClickListener @@ -1788,8 +1815,8 @@ open class AztecText : AppCompatEditText, TextWatcher, UnknownHtmlSpan.OnUnknown } private fun refreshTaskListSpan(taskList: AztecTaskListSpan) { - val selStart = selectionStart - val selEnd = selectionEnd +// val selStart = selectionStart +// val selEnd = selectionEnd val spanStart = this.editableText.getSpanStart(taskList) val spanEnd = this.editableText.getSpanEnd(taskList) val flags = this.editableText.getSpanFlags(taskList) @@ -1804,7 +1831,7 @@ open class AztecText : AppCompatEditText, TextWatcher, UnknownHtmlSpan.OnUnknown refreshTaskListSpan(it) } this.editableText.setSpan(newSpan, spanStart, spanEnd, flags) - setSelection(selStart, selEnd) + //setSelection(selStart, selEnd) } private fun clearTaskListRefreshListeners() { diff --git a/aztec/src/main/kotlin/org/wordpress/aztec/formatting/BlockFormatter.kt b/aztec/src/main/kotlin/org/wordpress/aztec/formatting/BlockFormatter.kt index a6e83c467..7eed25331 100644 --- a/aztec/src/main/kotlin/org/wordpress/aztec/formatting/BlockFormatter.kt +++ b/aztec/src/main/kotlin/org/wordpress/aztec/formatting/BlockFormatter.kt @@ -80,6 +80,10 @@ class BlockFormatter(editor: AztecText, indentFormatter.outdent() } + fun listStyleLeadingMargin(): Int { + return listStyle.leadingMargin() + } + fun isIndentAvailable(): Boolean { if (listFormatter.isIndentAvailable()) return true return indentFormatter.isIndentAvailable() From 2a626c8eb5cd7495cdfd2d60f5af46e8fcf43669 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danilo=20Dom=C3=ADnguez=20P=C3=A9rez?= Date: Thu, 23 Jan 2025 09:28:41 -0500 Subject: [PATCH 02/10] Fix indentation --- .../kotlin/org/wordpress/aztec/formatting/BlockFormatter.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aztec/src/main/kotlin/org/wordpress/aztec/formatting/BlockFormatter.kt b/aztec/src/main/kotlin/org/wordpress/aztec/formatting/BlockFormatter.kt index 7eed25331..3e9f3802c 100644 --- a/aztec/src/main/kotlin/org/wordpress/aztec/formatting/BlockFormatter.kt +++ b/aztec/src/main/kotlin/org/wordpress/aztec/formatting/BlockFormatter.kt @@ -81,7 +81,7 @@ class BlockFormatter(editor: AztecText, } fun listStyleLeadingMargin(): Int { - return listStyle.leadingMargin() + return listStyle.leadingMargin() } fun isIndentAvailable(): Boolean { From c596f4efb76e5b4f2ab3b6a419c6d2b344b07859 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danilo=20Dom=C3=ADnguez=20P=C3=A9rez?= Date: Thu, 23 Jan 2025 13:22:06 -0500 Subject: [PATCH 03/10] Fix ktlint warnings --- .../aztec/placeholders/ComposePlaceholderAdapter.kt | 5 +---- .../aztec/placeholders/ComposePlaceholderManager.kt | 6 ++++-- .../wordpress/aztec/placeholders/ViewPlaceholderManager.kt | 6 +++--- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/media-placeholders/src/main/java/org/wordpress/aztec/placeholders/ComposePlaceholderAdapter.kt b/media-placeholders/src/main/java/org/wordpress/aztec/placeholders/ComposePlaceholderAdapter.kt index b4150e7eb..bd5465b6c 100644 --- a/media-placeholders/src/main/java/org/wordpress/aztec/placeholders/ComposePlaceholderAdapter.kt +++ b/media-placeholders/src/main/java/org/wordpress/aztec/placeholders/ComposePlaceholderAdapter.kt @@ -10,8 +10,5 @@ interface ComposePlaceholderAdapter : PlaceholderManager.PlaceholderAdapter { * @param attrs aztec attributes of the view */ @Composable - fun Placeholder( - placeholderUuid: String, - attrs: AztecAttributes, - ) + fun Placeholder(placeholderUuid: String, attrs: AztecAttributes) } diff --git a/media-placeholders/src/main/java/org/wordpress/aztec/placeholders/ComposePlaceholderManager.kt b/media-placeholders/src/main/java/org/wordpress/aztec/placeholders/ComposePlaceholderManager.kt index 0ce253677..600b89182 100644 --- a/media-placeholders/src/main/java/org/wordpress/aztec/placeholders/ComposePlaceholderManager.kt +++ b/media-placeholders/src/main/java/org/wordpress/aztec/placeholders/ComposePlaceholderManager.kt @@ -1,3 +1,5 @@ +@file:Suppress("ktlint") + package org.wordpress.aztec.placeholders import android.graphics.Rect @@ -101,7 +103,7 @@ class ComposePlaceholderManager( .zIndex(9f) .padding( top = with(density) { composeView.topMargin.toDp() }, - start = with(density) { composeView.leftMargin.toDp() }, + start = with(density) { composeView.leftMargin.toDp() } ) .width( with(density) { composeView.width.toDp() } @@ -113,7 +115,7 @@ class ComposePlaceholderManager( key(composeView.uuid, composeView.width, composeView.height) { adapters[composeView.adapterKey]?.Placeholder( composeView.uuid, - composeView.attrs, + composeView.attrs ) } } diff --git a/media-placeholders/src/main/java/org/wordpress/aztec/placeholders/ViewPlaceholderManager.kt b/media-placeholders/src/main/java/org/wordpress/aztec/placeholders/ViewPlaceholderManager.kt index 77ae017b8..75edb375f 100644 --- a/media-placeholders/src/main/java/org/wordpress/aztec/placeholders/ViewPlaceholderManager.kt +++ b/media-placeholders/src/main/java/org/wordpress/aztec/placeholders/ViewPlaceholderManager.kt @@ -96,7 +96,7 @@ class ViewPlaceholderManager( * @param type placeholder type * @param attributes other attributes passed to the view. For example a `src` for an image. */ - override suspend fun insertItem(type: String, vararg attributes: Pair) { + suspend override fun insertItem(type: String, vararg attributes: Pair) { val adapter = adapters[type] ?: throw IllegalArgumentException("Adapter for inserted type not found. Register it with `registerAdapter` method") val attrs = getAttributesForMedia(type, attributes) @@ -113,7 +113,7 @@ class ViewPlaceholderManager( * @param shouldMergeItem this method should return true when the previous type is compatible and should be updated * @param updateItem function to update current parameters with new params */ - override suspend fun insertOrUpdateItem( + suspend override fun insertOrUpdateItem( type: String, shouldMergeItem: (currentItemType: String) -> Boolean, updateItem: ( @@ -186,7 +186,7 @@ class ViewPlaceholderManager( * @param shouldUpdateItem This function should return true if the span can be updated, false if it should be removed * @param updateItem Function that updates the selected item */ - override suspend fun removeOrUpdate(uuid: String, shouldUpdateItem: (Attributes) -> Boolean, updateItem: (currentAttributes: Map) -> Map): Boolean { + suspend override fun removeOrUpdate(uuid: String, shouldUpdateItem: (Attributes) -> Boolean, updateItem: (currentAttributes: Map) -> Map): Boolean { val currentItem = aztecText.editableText.getSpans(0, aztecText.length(), AztecPlaceholderSpan::class.java).find { it.attributes.getValue(UUID_ATTRIBUTE) == uuid } ?: return false From d04a133c7bdf08014eb9245e2ac55373c63e7900 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danilo=20Dom=C3=ADnguez=20P=C3=A9rez?= Date: Thu, 23 Jan 2025 14:21:03 -0500 Subject: [PATCH 04/10] The field should be enabled to support the tap on the task list item --- aztec/src/main/kotlin/org/wordpress/aztec/AztecText.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aztec/src/main/kotlin/org/wordpress/aztec/AztecText.kt b/aztec/src/main/kotlin/org/wordpress/aztec/AztecText.kt index 5f71557b7..3b32d58e7 100644 --- a/aztec/src/main/kotlin/org/wordpress/aztec/AztecText.kt +++ b/aztec/src/main/kotlin/org/wordpress/aztec/AztecText.kt @@ -733,7 +733,7 @@ open class AztecText : AppCompatEditText, TextWatcher, UnknownHtmlSpan.OnUnknown y += scrollY // Check if we're in the task list area - if (x + totalPaddingStart <= blockFormatter.listStyleLeadingMargin()) { + if (isEnabled && x + totalPaddingStart <= blockFormatter.listStyleLeadingMargin()) { val line = layout.getLineForVertical(y) val off = layout.getOffsetForHorizontal(line, x.toFloat()) if (getTaskListHandler()?.handleTaskListClick( From 826b4296089cb11038a1c028decd26dd433f70c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danilo=20Dom=C3=ADnguez=20P=C3=A9rez?= Date: Thu, 23 Jan 2025 17:06:27 -0500 Subject: [PATCH 05/10] Increase the touching are by 10 pixels --- aztec/src/main/kotlin/org/wordpress/aztec/AztecText.kt | 2 +- .../src/main/kotlin/org/wordpress/aztec/TaskListClickHandler.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/aztec/src/main/kotlin/org/wordpress/aztec/AztecText.kt b/aztec/src/main/kotlin/org/wordpress/aztec/AztecText.kt index 3b32d58e7..a650c53c1 100644 --- a/aztec/src/main/kotlin/org/wordpress/aztec/AztecText.kt +++ b/aztec/src/main/kotlin/org/wordpress/aztec/AztecText.kt @@ -733,7 +733,7 @@ open class AztecText : AppCompatEditText, TextWatcher, UnknownHtmlSpan.OnUnknown y += scrollY // Check if we're in the task list area - if (isEnabled && x + totalPaddingStart <= blockFormatter.listStyleLeadingMargin()) { + if (isEnabled && x + totalPaddingStart <= (blockFormatter.listStyleLeadingMargin() + 10)) { val line = layout.getLineForVertical(y) val off = layout.getOffsetForHorizontal(line, x.toFloat()) if (getTaskListHandler()?.handleTaskListClick( diff --git a/aztec/src/main/kotlin/org/wordpress/aztec/TaskListClickHandler.kt b/aztec/src/main/kotlin/org/wordpress/aztec/TaskListClickHandler.kt index 2767867a2..92bec74c3 100644 --- a/aztec/src/main/kotlin/org/wordpress/aztec/TaskListClickHandler.kt +++ b/aztec/src/main/kotlin/org/wordpress/aztec/TaskListClickHandler.kt @@ -8,7 +8,7 @@ import org.wordpress.aztec.spans.AztecTaskListSpan class TaskListClickHandler(val listStyle: BlockFormatter.ListStyle) { fun handleTaskListClick(text: Spannable, off: Int, x: Int, startMargin: Int): Boolean { // We want to make sure that text click will not trigger the checked change - if (x + startMargin > listStyle.leadingMargin()) return false + if (x + startMargin > (listStyle.leadingMargin() + 10)) return false val clickedList = text.getSpans(off, off, AztecTaskListSpan::class.java).firstOrNull() val clickedLines = text.getSpans(off, off, AztecListItemSpan::class.java) val clickedLine = clickedLines.find { From 7a189f9acc10846207cac437f46251bfb241201e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danilo=20Dom=C3=ADnguez=20P=C3=A9rez?= Date: Thu, 23 Jan 2025 18:50:28 -0500 Subject: [PATCH 06/10] Add 15 pixels to the target size --- aztec/src/main/kotlin/org/wordpress/aztec/AztecText.kt | 2 +- .../main/kotlin/org/wordpress/aztec/TaskListClickHandler.kt | 2 +- .../kotlin/org/wordpress/aztec/spans/AztecTaskListSpan.kt | 4 ++++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/aztec/src/main/kotlin/org/wordpress/aztec/AztecText.kt b/aztec/src/main/kotlin/org/wordpress/aztec/AztecText.kt index a650c53c1..1d5ffbea6 100644 --- a/aztec/src/main/kotlin/org/wordpress/aztec/AztecText.kt +++ b/aztec/src/main/kotlin/org/wordpress/aztec/AztecText.kt @@ -733,7 +733,7 @@ open class AztecText : AppCompatEditText, TextWatcher, UnknownHtmlSpan.OnUnknown y += scrollY // Check if we're in the task list area - if (isEnabled && x + totalPaddingStart <= (blockFormatter.listStyleLeadingMargin() + 10)) { + if (isEnabled && x + totalPaddingStart <= (blockFormatter.listStyleLeadingMargin() + AztecTaskListSpan.PADDING_SPACE)) { val line = layout.getLineForVertical(y) val off = layout.getOffsetForHorizontal(line, x.toFloat()) if (getTaskListHandler()?.handleTaskListClick( diff --git a/aztec/src/main/kotlin/org/wordpress/aztec/TaskListClickHandler.kt b/aztec/src/main/kotlin/org/wordpress/aztec/TaskListClickHandler.kt index 92bec74c3..d0545bbff 100644 --- a/aztec/src/main/kotlin/org/wordpress/aztec/TaskListClickHandler.kt +++ b/aztec/src/main/kotlin/org/wordpress/aztec/TaskListClickHandler.kt @@ -8,7 +8,7 @@ import org.wordpress.aztec.spans.AztecTaskListSpan class TaskListClickHandler(val listStyle: BlockFormatter.ListStyle) { fun handleTaskListClick(text: Spannable, off: Int, x: Int, startMargin: Int): Boolean { // We want to make sure that text click will not trigger the checked change - if (x + startMargin > (listStyle.leadingMargin() + 10)) return false + if (x + startMargin > (listStyle.leadingMargin() + AztecTaskListSpan.PADDING_SPACE)) return false val clickedList = text.getSpans(off, off, AztecTaskListSpan::class.java).firstOrNull() val clickedLines = text.getSpans(off, off, AztecListItemSpan::class.java) val clickedLine = clickedLines.find { diff --git a/aztec/src/main/kotlin/org/wordpress/aztec/spans/AztecTaskListSpan.kt b/aztec/src/main/kotlin/org/wordpress/aztec/spans/AztecTaskListSpan.kt index 38baa6298..2f8c9d011 100644 --- a/aztec/src/main/kotlin/org/wordpress/aztec/spans/AztecTaskListSpan.kt +++ b/aztec/src/main/kotlin/org/wordpress/aztec/spans/AztecTaskListSpan.kt @@ -144,4 +144,8 @@ open class AztecTaskListSpan( } override val textFormat: ITextFormat = AztecTextFormat.FORMAT_TASK_LIST + + companion object { + const val PADDING_SPACE = 15 + } } From fa5deab4c952e8a55ed6490c4c81a9a7db6eb2b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danilo=20Dom=C3=ADnguez=20P=C3=A9rez?= Date: Fri, 24 Jan 2025 00:52:13 -0500 Subject: [PATCH 07/10] Enable back setSelection --- aztec/src/main/kotlin/org/wordpress/aztec/AztecText.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/aztec/src/main/kotlin/org/wordpress/aztec/AztecText.kt b/aztec/src/main/kotlin/org/wordpress/aztec/AztecText.kt index 1d5ffbea6..7e01154b6 100644 --- a/aztec/src/main/kotlin/org/wordpress/aztec/AztecText.kt +++ b/aztec/src/main/kotlin/org/wordpress/aztec/AztecText.kt @@ -1834,8 +1834,8 @@ open class AztecText : AppCompatEditText, TextWatcher, UnknownHtmlSpan.OnUnknown } private fun refreshTaskListSpan(taskList: AztecTaskListSpan) { -// val selStart = selectionStart -// val selEnd = selectionEnd + val selStart = selectionStart + val selEnd = selectionEnd val spanStart = this.editableText.getSpanStart(taskList) val spanEnd = this.editableText.getSpanEnd(taskList) val flags = this.editableText.getSpanFlags(taskList) @@ -1850,7 +1850,7 @@ open class AztecText : AppCompatEditText, TextWatcher, UnknownHtmlSpan.OnUnknown refreshTaskListSpan(it) } this.editableText.setSpan(newSpan, spanStart, spanEnd, flags) - //setSelection(selStart, selEnd) + setSelection(selStart, selEnd) } private fun clearTaskListRefreshListeners() { From 424c60f712cb2855bcb74ff1ca76d0f4d19ac968 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danilo=20Dom=C3=ADnguez=20P=C3=A9rez?= Date: Fri, 24 Jan 2025 01:00:32 -0500 Subject: [PATCH 08/10] Increase padding to target size to 20 and add comments --- aztec/src/main/kotlin/org/wordpress/aztec/AztecText.kt | 10 ++++++++-- .../org/wordpress/aztec/spans/AztecTaskListSpan.kt | 3 ++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/aztec/src/main/kotlin/org/wordpress/aztec/AztecText.kt b/aztec/src/main/kotlin/org/wordpress/aztec/AztecText.kt index 7e01154b6..71e28f9a0 100644 --- a/aztec/src/main/kotlin/org/wordpress/aztec/AztecText.kt +++ b/aztec/src/main/kotlin/org/wordpress/aztec/AztecText.kt @@ -732,10 +732,16 @@ open class AztecText : AppCompatEditText, TextWatcher, UnknownHtmlSpan.OnUnknown x += scrollX y += scrollY - // Check if we're in the task list area - if (isEnabled && x + totalPaddingStart <= (blockFormatter.listStyleLeadingMargin() + AztecTaskListSpan.PADDING_SPACE)) { + // We check whether the user tap on a checkbox of a task list. The aztec text field should be enabled and we + // check whether the tap event was on the leading margin which is where the checkbox is located plus a padding + // space used to increase the target size for the tap event. + if (isEnabled && + x + totalPaddingStart <= (blockFormatter.listStyleLeadingMargin() + AztecTaskListSpan.PADDING_SPACE)) { val line = layout.getLineForVertical(y) val off = layout.getOffsetForHorizontal(line, x.toFloat()) + // If the tap event was on the leading margin, we double check whether we are tapping on a task list item. + // If that is true, then we return false because we don't want to propagate the tap event to stop moving + // the cursor to the item tapped. if (getTaskListHandler()?.handleTaskListClick( text, off, diff --git a/aztec/src/main/kotlin/org/wordpress/aztec/spans/AztecTaskListSpan.kt b/aztec/src/main/kotlin/org/wordpress/aztec/spans/AztecTaskListSpan.kt index 2f8c9d011..b3e705c50 100644 --- a/aztec/src/main/kotlin/org/wordpress/aztec/spans/AztecTaskListSpan.kt +++ b/aztec/src/main/kotlin/org/wordpress/aztec/spans/AztecTaskListSpan.kt @@ -146,6 +146,7 @@ open class AztecTaskListSpan( override val textFormat: ITextFormat = AztecTextFormat.FORMAT_TASK_LIST companion object { - const val PADDING_SPACE = 15 + // Extra padding added to the target tap area for checkboxes. + const val PADDING_SPACE = 20 } } From 8d9e2f85c6c0f2f0339bb9f14b1beb72486497ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danilo=20Dom=C3=ADnguez=20P=C3=A9rez?= Date: Sat, 25 Jan 2025 01:52:33 -0500 Subject: [PATCH 09/10] Refresh text when checkbox tapped --- aztec/src/main/kotlin/org/wordpress/aztec/AztecText.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/aztec/src/main/kotlin/org/wordpress/aztec/AztecText.kt b/aztec/src/main/kotlin/org/wordpress/aztec/AztecText.kt index 71e28f9a0..b486b6a99 100644 --- a/aztec/src/main/kotlin/org/wordpress/aztec/AztecText.kt +++ b/aztec/src/main/kotlin/org/wordpress/aztec/AztecText.kt @@ -748,6 +748,7 @@ open class AztecText : AppCompatEditText, TextWatcher, UnknownHtmlSpan.OnUnknown x, totalPaddingStart ) == true) { + refreshText() return false } } From 8a6aa05b536826be1217daa043d31bcc5310c0da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danilo=20Dom=C3=ADnguez=20P=C3=A9rez?= Date: Tue, 28 Jan 2025 08:58:03 -0500 Subject: [PATCH 10/10] Don't lose focus after task list item is tapped --- aztec/src/main/kotlin/org/wordpress/aztec/AztecText.kt | 2 +- .../main/kotlin/org/wordpress/aztec/spans/AztecTaskListSpan.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/aztec/src/main/kotlin/org/wordpress/aztec/AztecText.kt b/aztec/src/main/kotlin/org/wordpress/aztec/AztecText.kt index b486b6a99..305e3dd9f 100644 --- a/aztec/src/main/kotlin/org/wordpress/aztec/AztecText.kt +++ b/aztec/src/main/kotlin/org/wordpress/aztec/AztecText.kt @@ -748,7 +748,7 @@ open class AztecText : AppCompatEditText, TextWatcher, UnknownHtmlSpan.OnUnknown x, totalPaddingStart ) == true) { - refreshText() + refreshText(stealEditorFocus = false) return false } } diff --git a/aztec/src/main/kotlin/org/wordpress/aztec/spans/AztecTaskListSpan.kt b/aztec/src/main/kotlin/org/wordpress/aztec/spans/AztecTaskListSpan.kt index b3e705c50..b359fba5c 100644 --- a/aztec/src/main/kotlin/org/wordpress/aztec/spans/AztecTaskListSpan.kt +++ b/aztec/src/main/kotlin/org/wordpress/aztec/spans/AztecTaskListSpan.kt @@ -147,6 +147,6 @@ open class AztecTaskListSpan( companion object { // Extra padding added to the target tap area for checkboxes. - const val PADDING_SPACE = 20 + const val PADDING_SPACE = 15 } }