Answer the question
In order to leave comments, you need to log in
How to close a view by clicking on an empty space?
There is a Floating Button, when clicked, the cardview appears, and the fab disappears.
fab = (FloatingActionButton) view.findViewById(R.id.fab);
cardView = (CardView) view.findViewById(R.id.map_cardview);
fab.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
fab.hide();
cardView.setVisibility(View.VISIBLE);
}
});
Answer the question
In order to leave comments, you need to log in
The easiest option is to make a FrameLayout for the entire area that you want to click on, and catch clicks on it.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question