• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Aucun tag

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Simple Notepad Application for Android OS


Commit MetaInfo

Révisiond95ca329cd14a843322f4102946da3283dd40b62 (tree)
l'heure2017-08-19 13:11:20
AuteurMasahiko, SAWAI <say@user...>
CommiterMasahiko, SAWAI

Message de Log

Fixed a bug that IllegalStatuException occur

Change transaction commit method.
* old - FragmentTransaction#commit()
* new - FragmentTransaction#commitAllowingStateLoss()

Change Summary

Modification

--- a/notepad-app-level-11/src/main/java/org/routine_work/notepad/NoteDetailActivity.java
+++ b/notepad-app-level-11/src/main/java/org/routine_work/notepad/NoteDetailActivity.java
@@ -241,7 +241,7 @@ public class NoteDetailActivity extends Activity
241241 editNoteFragment = new EditNoteFragment();
242242 FragmentTransaction ft = fm.beginTransaction();
243243 ft.replace(R.id.note_detail_container, editNoteFragment, FT_NOTE_EDIT);
244- ft.commit();
244+ ft.commitAllowingStateLoss();
245245 }
246246 Log.d(LOG_TAG, "editNoteFragment => " + editNoteFragment);
247247 Log.d(LOG_TAG, "editNoteFragment.noteUri => " + editNoteFragment.getNoteUri());
@@ -322,7 +322,7 @@ public class NoteDetailActivity extends Activity
322322 deleteNoteFragment = new DeleteNoteFragment();
323323 FragmentTransaction ft = fm.beginTransaction();
324324 ft.replace(R.id.note_detail_container, deleteNoteFragment, FT_NOTE_DELETE);
325- ft.commit();
325+ ft.commitAllowingStateLoss();
326326 }
327327
328328 Log.d(LOG_TAG, "Delete newNoteUri => " + newNoteUri);
--- a/notepad-app-level-11/src/main/java/org/routine_work/notepad/NotepadActivity.java
+++ b/notepad-app-level-11/src/main/java/org/routine_work/notepad/NotepadActivity.java
@@ -648,7 +648,7 @@ public class NotepadActivity extends Activity implements NotepadConstants,
648648 FragmentTransaction ft = fm.beginTransaction();
649649 ft.add(R.id.note_detail_container, viewNoteFragment, FT_NOTE_DETAIL);
650650 ft.addToBackStack(null);
651- ft.commit();
651+ ft.commitAllowingStateLoss();
652652
653653 viewNoteFragment.setNoteUri(noteUri);
654654 }