I am working on a messenger type application,when a user click on a user from chat window I show a blank Layout with a send button and EditText at bottom,now when user type text in Edit Field and click on send I create a dynamic Layout hol
开发者_如何学Goding some dynamically created other UI component like Label and ImageView etc.now I want to save this UI state when user press back button or home button.I know there is a method for activity like SaveInstance etc it save only data object but here I want to save GUI with data for all chat windows,anyone can guide how I can handle this ?I will be very thankful for guidance. .
You're doing it wrong.
You should be storing your data in some place (in memory, like in a static array somewhere, or in sql if you need to keep it across sessions), and displaying a listView with an adapter on this data. then, when adding data, you only need to notify your adapter to refresh the view.
继续阅读:android
精彩评论