Noodlecode parody of spaghetti code

Month: September 2015

Activity & fragment lifecycle events

1. Start new activity

Activity, onCreate
Fragment, onAttach
Fragment, onAttach
Fragment, onCreateView
Fragment, onActivityCreated
Fragment, onStart
Activity, onStart
Activity, onResume
Fragment, onResume

2. Close activity (tap back button)

Fragment, onPause
Activity, onPause
Activity, onStop
Fragment, onDestroyView
Fragment, onDestroy
Fragment, onDetach
Activity, onDestroy

3. Hide activity (tap home button)

Fragment, onPause
Activity, onPause
Activity, onStop

4. Resume activity (from home screen)

Activity, onRestart
Fragment, onStart
Activity, onStart
Activity, onResume
Fragment, onResume

5. Go to other activity

Fragment, onPause
Activity, onPause
Activity, onStop

6. Resume from other activity (return back)

Activity, onRestart
Fragment, onStart
Activity, onStart
Activity, onResume
Fragment, onResume

Compress / Decompress files using XZ

Compress

xz -zk myfile.txt

will produce myfile.txt.xz in the same directory

Decompress

xz -dkc myfile.txt.xz > myfile.txt

Copyright © 2017 Noodlecode