I am a newbie to android programming
I have two listviews in my activity and two buttons. If I press first button one listview will be created and shown in the activity and when the second button is clicked the second listview is created and first one should be closed.
Can anyone suggest me how to do this??
Thanks in advance..
You should consider using fragments. Use a frame layout in your main activity. Then depending on the user choice load one of the fragment dynamically.
See http://developer.android.com/guide/components/fragments.html && http://android-developers.blogspot.com/2011/02/android-30-fragments-api.html