How do you hide multiple views at once?
Try to set all three views to View.INVISIBLE
or to View.GONE
.
OR
You can try
public void onClick(View v) {
//Toggle viewing of options, using "if" in case it is set to View.GONE
RelativeLayout view = (RelativeLayout) findViewById(R.id.optionsform);
if (view.getVisibility() == View.VISIBLE)
view.setVisibility(View.INVISIBLE);
else
view.setVisibility(View.VISIBLE);
}
You must set to the View.GONE
state.