M
M
MVBWAW212021-07-02 10:54:01
Java
MVBWAW21, 2021-07-02 10:54:01

Fragment and main activity touch issue?

I have a main activity which has a recycler view list which opens a fragment. When the fragment is open, I try to tap on it to perform some actions, but this click interacts with the main activivty and not with the fragment. How can I make the clicks work only in the fragment without affecting the main activity.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
MVBWAW21, 2021-07-02
@MVBWAW21

Found a solution. In the root xml of the fragment, add so that fragment clicks do not interact with the activity itself. android:clickable="true"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question