注意: 我可以看到该应用在后台运行
我想从设置屏幕上按回来片段
用于启动当前片段的代码是:
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();
清单
<activity
android:name="com.windhyaworks.activities.ActLogin"
android:configChanges="orientation|keyboardHidden"
android:screenOrientation="portrait"
android:theme="@style/AppTheme" />
<activity
答案 0 :(得分:0)
你试过ft.addtobackstack()吗?