How To Use Syntethic Properties When You Have The Same Layout Included Twice
Normally, when I need to include the same layout in one screen, I would wrap this layout in two different containers with a different id and call findViewById on those two parents
Solution 1:
You need import:
import kotlinx.android.synthetic.main.fragment_xyz.*
Then get the title and description from framelayout
include1
and include2
like below:
val title1 by lazy {
include1.title
}
val description1 by lazy {
include1.description
}
val title2 by lazy {
include2.title
}
val description2 by lazy {
include2.description
}
Post a Comment for "How To Use Syntethic Properties When You Have The Same Layout Included Twice"