Faster template creation

This commit is contained in:
J-Jamet committed 2021-06-17 13:16:57 +02:00
1 parent 0f041da548
commit 5a11882d1b
1 file changed
+2 -2
@@ -91,8 +91,6 @@ abstract class TemplateAbstractView @JvmOverloads constructor(context: Context,
template.sections.forEach { templateSection ->
val sectionView = SectionView(context, null, R.attr.cardViewStyle)
// Add build view to parent
templateContainerView.addView(sectionView)
// Build each attribute
templateSection.attributes.forEach { templateAttribute ->
@@ -135,6 +133,8 @@ abstract class TemplateAbstractView @JvmOverloads constructor(context: Context,
// Add created view to this parent
sectionView.addView(attributeView)
}
// Add build view to parent
templateContainerView.addView(sectionView)
}
}
}