I have a relativelayout within a scrollview with 12 buttons. On each button clicked an image displays all works well, however i can see the image in the background but still have all the button on top of the image. Is there a way of hiding these buttons? I don’t really want to use a sliding drawer but if i have to i will. Thanks in advance
Okay so this is my class:
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.campfacilities);
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
final ImageView imageView = (ImageView) findViewById(R.id.img1);
Button next = (Button) findViewById(R.id.aimage);
next.setOnClickListener(new View.OnClickListener() {
public void onClick(View view) {
imageView.setImageDrawable(getResources().getDrawable(R.drawable.image1));
}
});
How would i then implement the
button.setVisibility(View.GONE);
You can simply set the buttons visibility gone like this
and to show that button again
Thanks