I have one problem:
I need to write fragment with settings for user, but when user is TYPE_USER
he has some other behaviour and other layout than when he is TYPE_PREMIUM
.
I wrote interface SettingsAction
and two implementations:
SettingsActionForNormal
and SettingsActionForPremium
, but I dont know, is it correctly ?
Common things for both types should be placed in fragment or in based class for SettingsActionForNormal
and.. which implements SettingsAction
?
How should be code architecture when there are many types of user and they have different behaviours and layouts in many fragments ?
I cant find a good open source project with thats problem.
Aucun commentaire:
Enregistrer un commentaire