note: I can see the app running in the background
I want to go to by fragment on press of back from settings screen
Code i use to start the current fragment was:
ft = getActivity().getSupportFragmentManager().beginTransaction();
FrgOtp fragment2 = FrgOtp.newInstance(phoneNumber);
ft.hide(FrgLogin.this);
ft.replace(R.id.container, fragment2, FrgOtp.class.getSimpleName()).addToBackStack(FrgOtp.class.getSimpleName()).commit();
manifest
<activity
android:name="com.windhyaworks.activities.ActLogin"
android:configChanges="orientation|keyboardHidden"
android:screenOrientation="portrait"
android:theme="@style/AppTheme" />
<activity
您是否尝试过ft.addtobackstack()?
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.