UI buttons


#1

I would really like to know how to save the View states of Stop and Play buttons. What Iā€™m doing right now is when I press Play I enable the Stop button and vice-versa via setEnabled() function. When the screen is re-oriented these views are re-created. What would be the easiest way to achieve this?

PS: setRetain keeps the media file playing at re-orientation.

This book is addictive, lots of valuable information that makes sense :slight_smile:. Thank you.


#2

Call updateButtons() at the end of onCreateView(). Make sure that any setEnabled() calls are inside updateButtons(), and your view should reflect the right state on rotation.


#3

(oh - and thank you! :slight_smile: )