Answer the question
In order to leave comments, you need to log in
Why doesn't the active Fragment override button presses on the activity?
Good afternoon !
There is an activity, it displays several buttons (Buttons are displayed programmatically in RecyclerView), if you click on a certain button, you will be transferred to another activity (the location of the elements is in FrameLayout).
There is also a button that launches a new fragment in this activity (the location of the elements is in FrameLayout > RelativeLayout, height and width match_parent ).
Correspondingly, when the fragment is launched, the window completely overlaps the activity (visually overlaps), but if you click in the free space of the fragment, and there is a button on the activity in this zone, the button will work, although it is visually overlapped by the fragment.
How to make the buttons not work when the fragment is running?
Please poke your nose into the necessary documentation, for how long I'm only studying android and java, or suggest what the problem might be.
Answer the question
In order to leave comments, you need to log in
Set the fragment view to clickable=true. It will stop skipping clicks. Profit.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question