i'm using following code to set "visibility=gone" for a linear layout
//onCreate method
//setcontentview
. . . .
LinearLayout rlayout1 = (LinearLayout) findViewById(R.id.readerBottomLayout);
rlayout1.setVisibility(2);
But the controls are still visible when activity runs.why? any idea?
set rlayout1.setVisibility(View.INVISIBLE)
Yes, view.GONE and view.INVISIBLE will work. The reason it didn't work before is because two (2) is the incorrect integer value.
The correct values for set.Visibility are:
0 = visible
4 = invisible
8 = gone
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With