STAR-ZERO / navigation-keep-fragment-sample

392 stars 63 forks source link

findNavController().popBackStack() is not working #24

Open gkaradagan opened 4 years ago

gkaradagan commented 4 years ago

Hi, When i try to pop back, it is not working on keep_state_working

ShiremanSun commented 4 years ago

static { try { sStack = FragmentNavigator.class.getDeclaredField("mBackStack"); sStack.setAccessible(true); } catch (NoSuchFieldException e) { e.printStackTrace(); } } if (sStack != null) { try { mBackStack = (ArrayDeque) sStack.get(this); } catch (IllegalAccessException e) { e.printStackTrace(); } }

it works