I am trying to create a "hot spot" on my tablet that acts like a button but users can not see the button. When I try the following I have a button but when visibility is set to "4" the user cannot interact or see it:
Button b=(Button)findViewById(R.id.b);
b.setOnClickListener(listener);
b.setVisibility(4);
public OnClickListener listener=new OnClickListener(){
public void onClick(View arg0) {
Intent myIntent = new Intent(MeetingManager.this,GetRoom.class);
startActivityForResult(myIntent, 0);
}
};
Any ideas how I can achieve the above request?
If it is going to be invisible, why does it have to be a button?
You can add an OnClickListener to any view.
Why not use an ImageView with a transparent background and just add the OnClickListener to that?
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