From 5bf5685a12dca2358573fbad08ee064ecfcec057 Mon Sep 17 00:00:00 2001 From: J-Jamet Date: Thu, 13 Aug 2020 17:43:40 +0200 Subject: [PATCH] Refactor extra field --- .../kunzisoft/keepass/view/EntryEditExtraField.kt | 2 -- .../main/res/layout/fragment_entry_new_field.xml | 8 ++------ .../res/layout/view_entry_edit_extra_field.xml | 15 +-------------- 3 files changed, 3 insertions(+), 22 deletions(-) diff --git a/app/src/main/java/com/kunzisoft/keepass/view/EntryEditExtraField.kt b/app/src/main/java/com/kunzisoft/keepass/view/EntryEditExtraField.kt index 4aa4747e5..e0cfb46dd 100644 --- a/app/src/main/java/com/kunzisoft/keepass/view/EntryEditExtraField.kt +++ b/app/src/main/java/com/kunzisoft/keepass/view/EntryEditExtraField.kt @@ -40,7 +40,6 @@ class EntryEditExtraField @JvmOverloads constructor(context: Context, private val valueLayoutView: TextInputLayout private val valueView: EditText - private val editButton: View private val deleteButton: View private var mApplyFontVisibility = false @@ -70,7 +69,6 @@ class EntryEditExtraField @JvmOverloads constructor(context: Context, valueLayoutView = findViewById(R.id.entry_extra_field_value_container) valueView = findViewById(R.id.entry_extra_field_value) - editButton = findViewById(R.id.entry_extra_field_edit) deleteButton = findViewById(R.id.entry_extra_field_delete) mValueViewInputType = valueView.inputType diff --git a/app/src/main/res/layout/fragment_entry_new_field.xml b/app/src/main/res/layout/fragment_entry_new_field.xml index fb134446e..08418355e 100644 --- a/app/src/main/res/layout/fragment_entry_new_field.xml +++ b/app/src/main/res/layout/fragment_entry_new_field.xml @@ -54,15 +54,11 @@ style="@style/KeepassDXStyle.TextAppearance.Small" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:minHeight="24dp" - android:layout_marginStart="@dimen/default_margin" - android:layout_marginLeft="@dimen/default_margin" - android:layout_marginEnd="@dimen/default_margin" - android:layout_marginRight="@dimen/default_margin" - android:paddingBottom="@dimen/default_margin" + android:minHeight="48dp" app:layout_constraintTop_toBottomOf="@+id/entry_custom_field_label_container" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" android:text="@string/protection" /> \ No newline at end of file diff --git a/app/src/main/res/layout/view_entry_edit_extra_field.xml b/app/src/main/res/layout/view_entry_edit_extra_field.xml index 27bd686c1..9bef9e9c9 100644 --- a/app/src/main/res/layout/view_entry_edit_extra_field.xml +++ b/app/src/main/res/layout/view_entry_edit_extra_field.xml @@ -30,7 +30,7 @@ android:id="@+id/entry_extra_field_value_container" android:layout_width="0dp" android:layout_height="wrap_content" - android:layout_marginTop="@dimen/default_margin" + android:layout_marginTop="12dp" app:layout_constraintTop_toTopOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintEnd_toStartOf="@+id/entry_extra_field_delete" @@ -60,17 +60,4 @@ android:contentDescription="@string/content_description_remove_field" android:tint="?attr/colorAccent" /> - - - \ No newline at end of file