Fix title

This commit is contained in:
J-Jamet
2021-06-14 22:56:59 +02:00
parent e3cbefc5b6
commit a2a26cd058

View File

@@ -98,9 +98,15 @@ class TemplateView @JvmOverloads constructor(context: Context,
customFieldsContainerView.removeAllViews()
mCustomFieldIds.clear()
findViewById<View?>(R.id.entry_edit_title)?.tag = FIELD_TITLE_TAG
mTemplate?.let { template ->
mTemplate?.sections?.forEach { templateSection ->
findViewById<EntryEditFieldView?>(R.id.entry_edit_title)?.apply {
tag = FIELD_TITLE_TAG
id = TemplateField.LABEL_TITLE.hashCode()
label = TemplateField.getLocalizedName(context, TemplateField.LABEL_TITLE)
}
template.sections.forEach { templateSection ->
val sectionView = SectionView(context, null, R.attr.cardViewStyle)
// Add build view to parent
@@ -149,6 +155,7 @@ class TemplateView @JvmOverloads constructor(context: Context,
}
}
}
}
private fun buildViewForCustomField(field: Field): View? {
val customFieldTemplateAttribute = TemplateAttribute(