I have one linearlayout and have also a few button inside it.I want make it visible when touch and invisible when touch it again.
How can i make it??
LinearLayout one = (LinearLayout) findViewById(R.id.one);
one.setVisibility(View.GONE);
I suggest that you use GONE insteady of INVISIBLE in the onclick event because with
View.GONE
the place for the layout will not be visible and the application will not appear to have unused space in it unlike the View.INVISIBLE
that will leave the gap that is intended for the the layout
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