I am having a problem with the interaction between an Activity
and a Fragment
.
I have a main
Activity
and an into
Activity
with layout buttons and text inputs. When I open the Fragment
in the main
Activity
, I can still click on a button in the Activity
and open the Fragment
again, or enter text in the text inputs.
I've been searching for help two hours, and I haven't found the answer!
This is how I open the Fragment
from the Activity
:
FragmentManager fragmentManager = getFragmentManager();
FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
SignUp fragment = new SignUp();
fragmentTransaction.add(R.id.fragment_content, fragment);
fragmentTransaction.commit();
And this is picture: picture