mirror of
https://github.com/Kunzisoft/KeePassDX.git
synced 2025-12-04 15:49:33 +01:00
Title text view as other views
This commit is contained in:
@@ -39,7 +39,6 @@ class TemplateView @JvmOverloads constructor(context: Context,
|
|||||||
private var mFontInVisibility: Boolean = false
|
private var mFontInVisibility: Boolean = false
|
||||||
|
|
||||||
private var entryIconView: ImageView
|
private var entryIconView: ImageView
|
||||||
private var entryTitleView: EntryEditFieldView
|
|
||||||
private var templateContainerView: ViewGroup
|
private var templateContainerView: ViewGroup
|
||||||
private var customFieldsContainerView: SectionView
|
private var customFieldsContainerView: SectionView
|
||||||
|
|
||||||
@@ -52,7 +51,6 @@ class TemplateView @JvmOverloads constructor(context: Context,
|
|||||||
inflater?.inflate(R.layout.view_template, this)
|
inflater?.inflate(R.layout.view_template, this)
|
||||||
|
|
||||||
entryIconView = findViewById(R.id.entry_edit_icon_button)
|
entryIconView = findViewById(R.id.entry_edit_icon_button)
|
||||||
entryTitleView = findViewById(R.id.entry_edit_title)
|
|
||||||
templateContainerView = findViewById(R.id.template_fields_container)
|
templateContainerView = findViewById(R.id.template_fields_container)
|
||||||
// To fix card view margin in KitKat-
|
// To fix card view margin in KitKat-
|
||||||
val paddingVertical = resources.getDimensionPixelSize(R.dimen.card_view_margin_vertical)
|
val paddingVertical = resources.getDimensionPixelSize(R.dimen.card_view_margin_vertical)
|
||||||
@@ -306,7 +304,9 @@ class TemplateView @JvmOverloads constructor(context: Context,
|
|||||||
mEntryInfo?.let { entryInfo ->
|
mEntryInfo?.let { entryInfo ->
|
||||||
setIcon(entryInfo.icon)
|
setIcon(entryInfo.icon)
|
||||||
|
|
||||||
entryTitleView.value = entryInfo.title
|
val titleView: EntryEditFieldView? =
|
||||||
|
findViewById(R.id.entry_edit_title)
|
||||||
|
titleView?.value = entryInfo.title
|
||||||
|
|
||||||
val userNameView: EntryEditFieldView? =
|
val userNameView: EntryEditFieldView? =
|
||||||
templateContainerView.findViewWithTag(FIELD_USERNAME_TAG)
|
templateContainerView.findViewWithTag(FIELD_USERNAME_TAG)
|
||||||
@@ -365,7 +365,11 @@ class TemplateView @JvmOverloads constructor(context: Context,
|
|||||||
mEntryInfo = EntryInfo()
|
mEntryInfo = EntryInfo()
|
||||||
|
|
||||||
// Icon already populate
|
// Icon already populate
|
||||||
mEntryInfo?.title = entryTitleView.value
|
|
||||||
|
val titleView: EntryEditFieldView? = findViewById(R.id.entry_edit_title)
|
||||||
|
titleView?.value?.let {
|
||||||
|
mEntryInfo?.title = it
|
||||||
|
}
|
||||||
|
|
||||||
val userNameView: EntryEditFieldView? = templateContainerView.findViewWithTag(FIELD_USERNAME_TAG)
|
val userNameView: EntryEditFieldView? = templateContainerView.findViewWithTag(FIELD_USERNAME_TAG)
|
||||||
userNameView?.value?.let {
|
userNameView?.value?.let {
|
||||||
|
|||||||
Reference in New Issue
Block a user