[android-developers] how to deflate/hide(invisible) ViewStub from Menu (onOptionsItemSelected)?

2011-11-04 Thread Abhi
I keep getting NullPointerException trying to deflate or make invisible the ViewStub from my UI. I just wanted to be sure I am doing it right. I am inflating my ViewStub in onItemLongClick method of GalleryView by doing the following: @Override public boolean

Re: [android-developers] how to deflate/hide(invisible) ViewStub from Menu (onOptionsItemSelected)?

2011-11-04 Thread Kostya Vasilyev
Inflating a view stub has two important properties: 1) It's irreversible: once inflated, the stub's content is always there 2) The stub's content replaces the stub. Sounds like you need to replace the stub with include and toggle its contents' visibility as needed. -- Kostya 05.11.2011