mirror of
https://github.com/Kunzisoft/KeePassDX.git
synced 2025-12-04 15:49:33 +01:00
Fix extra card view
This commit is contained in:
@@ -54,6 +54,7 @@ class EntryContentsView @JvmOverloads constructor(context: Context, attrs: Attri
|
|||||||
private val commentContainerView: View
|
private val commentContainerView: View
|
||||||
private val commentView: TextView
|
private val commentView: TextView
|
||||||
|
|
||||||
|
private val extrasContainerView: View
|
||||||
private val extrasView: ViewGroup
|
private val extrasView: ViewGroup
|
||||||
|
|
||||||
private val dateFormat: DateFormat = android.text.format.DateFormat.getDateFormat(context)
|
private val dateFormat: DateFormat = android.text.format.DateFormat.getDateFormat(context)
|
||||||
@@ -88,6 +89,7 @@ class EntryContentsView @JvmOverloads constructor(context: Context, attrs: Attri
|
|||||||
commentContainerView = findViewById(R.id.entry_notes_container)
|
commentContainerView = findViewById(R.id.entry_notes_container)
|
||||||
commentView = findViewById(R.id.entry_notes)
|
commentView = findViewById(R.id.entry_notes)
|
||||||
|
|
||||||
|
extrasContainerView = findViewById(R.id.extra_strings_container)
|
||||||
extrasView = findViewById(R.id.extra_strings)
|
extrasView = findViewById(R.id.extra_strings)
|
||||||
|
|
||||||
creationDateView = findViewById(R.id.entry_created)
|
creationDateView = findViewById(R.id.entry_created)
|
||||||
@@ -204,10 +206,12 @@ class EntryContentsView @JvmOverloads constructor(context: Context, attrs: Attri
|
|||||||
entryCustomField = EntryCustomField(context, null, title, value, showAction, onActionClickListener)
|
entryCustomField = EntryCustomField(context, null, title, value, showAction, onActionClickListener)
|
||||||
entryCustomField.applyFontVisibility(fontInVisibility)
|
entryCustomField.applyFontVisibility(fontInVisibility)
|
||||||
extrasView.addView(entryCustomField)
|
extrasView.addView(entryCustomField)
|
||||||
|
extrasContainerView.visibility = View.VISIBLE
|
||||||
}
|
}
|
||||||
|
|
||||||
fun clearExtraFields() {
|
fun clearExtraFields() {
|
||||||
extrasView.removeAllViews()
|
extrasView.removeAllViews()
|
||||||
|
extrasContainerView.visibility = View.GONE
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun getDateTime(date: Date): String {
|
private fun getDateTime(date: Date): String {
|
||||||
|
|||||||
@@ -154,8 +154,10 @@
|
|||||||
|
|
||||||
<!-- Extras -->
|
<!-- Extras -->
|
||||||
<android.support.v7.widget.CardView
|
<android.support.v7.widget.CardView
|
||||||
|
android:id="@+id/extra_strings_container"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:visibility="gone"
|
||||||
android:layout_marginStart="@dimen/default_margin"
|
android:layout_marginStart="@dimen/default_margin"
|
||||||
android:layout_marginEnd="@dimen/default_margin"
|
android:layout_marginEnd="@dimen/default_margin"
|
||||||
android:layout_marginBottom="@dimen/default_margin">
|
android:layout_marginBottom="@dimen/default_margin">
|
||||||
|
|||||||
Reference in New Issue
Block a user