Jak rozpocząć aktywność od fragmentu w środku?
Intent intent = new Intent(getActivity(), NewActivity.class);
startActivity(intent);
21BMA029 Mohan prasath.S
Intent intent = new Intent(getActivity(), NewActivity.class);
startActivity(intent);
FragmentManager manager = getFragmentManager();
FragmentTransaction transaction = manager.beginTransaction();
transaction.add(R.id.container,YOUR_FRAGMENT_NAME,YOUR_FRAGMENT_STRING_TAG);
transaction.addToBackStack(null);
transaction.commit();
// put the following code in onClickListner
// public void onClickListner(View view){
Navigation.findNavController(view).navigate(R.id.action_fromFragment_toFragment);
// action_fromFragment_toFragment is the id of transformatino, look in fragment map.
// }