https://kotlinlang.org logo
p

Pablo

10/21/2020, 5:25 PM
Hello, I have a question, what is the best clean way to for instance: List - Detail List may have like 5 different types Detail I want to be just one, but perhaps is a bit complicated because each item needs different 
EditText
 . Example: ListItem1 needs Name, Surname, Age so on DetailFragment I should only show these 
EditText
ListItem2 needs Url so on DetailFragment I should only show one 
EditText
ListItem3 needs 8 fields so on DetailFragment I should show 8 
EditText
And so on ... So, I thought to have a DetailListItemXFragment and on each Fragment have the stuff that the item needs, but if it grows I'll end up with N DetailFragment, but otherwise the logic for DetailFragment if I have only one will be huge. So I want to know a proposal of a clean arch like creating a FactoryDetailFragment or something to make it scalable, any idea?
c

Casey Brooks

10/21/2020, 5:37 PM
This is not a general-purpose Android Slack channel, it’s specifically for support related to Kotlin as used in an Android app. There are other resources, such as StackOverflow or http://android-united.community/ which will better serve you for general Android help.
3 Views