Design suggestion: How to add programmatically add multiple (but indeterminate) 'Views' of the same class in an Android Activity -
i have problem not able solve.
an activity in android app needs build object has:
- a name
- a description
- zero or more items, described name, price, , other info
i have tried implement functionalities related 'items' in fragment
. using fragment
made sense me because have been able add logic (various checks on values) in fragment , have lighter activity. built activity
- edittext name
- edittext description
- an imageview '+' adding fragments
- a
linearlayout
hosting added fragments
i cannot use fragments
because not kept during device rotation (i tried restore same views in linearlayout, same ids, not work).
how implement such functionality? not find example.
Comments
Post a Comment