Currently I have two fragments that each in their respective layouts have a floating button that redirects me to another activity. How do I get the id of those two floating buttons in a third fragment and make a switch with them?
Currently I have two fragments that each in their respective layouts have a floating button that redirects me to another activity. How do I get the id of those two floating buttons in a third fragment and make a switch with them?
You can send additional data to the activiy using the putExtra method of the intent.
For example:
Intent intent = new Intent(getBaseContext(), SignoutActivity.class);
intent.putExtra("EXTRA_SESSION_ID", sessionId);
startActivity(intent);
And in the activity you can recover the value as follows:
String sessionId= getIntent().getStringExtra("EXTRA_SESSION_ID");
I hope it's useful for you.