Mohit Lakhanpal:
私が活動に意図クラスフラグメントを移動するトラブルを抱えています。私は別のアクティビティに一つの断片から意図送信しようとしています。ここでは、コードは次のようになります。
Intent intent = new Intent(getActivity(), MainActivity.class);
getActivity().startActivity(intent);
ここに私のマニフェストファイルがあります
<activity android:name=".activities.MainActivity"
android:supportsPictureInPicture="true"
android:resizeableActivity="true"
android:launchMode="singleTask"
android:windowSoftInputMode="adjustNothing"
android:configChanges="screenSize|smallestScreenSize|screenLayout|orientation"/>
それは私のために働いていないと、別の側に、私はいくつかのRNDを行っているが、すべては私のために同じです。どのように私は、事前に問題のおかげで解決することができます。
クイック学習者:
これを削除しandroid:launchMode="singleTask"
、次のようになりました
<activity android:name=".activities.MainActivity"
android:supportsPictureInPicture="true"
android:resizeableActivity="true"
android:windowSoftInputMode="adjustNothing"
android:configChanges="screenSize|smallestScreenSize|screenLayout|orientation"/>
現在は次の場合activity
ですmainactivity
と、あなたは再びそれを起動しているlaunchmodeがマニフェストに単一のタスクに設定されているため、それが動作しません。
ソリューション: -このタグを削除
アンドロイド:launchMode = "singleTask"