SHARE
TWEET

Untitled

a guest Apr 25th, 2019 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. onSaveInstanceState -> hold view states after rotation or other stuff (that destroys activicy)
  2.  
  3. pro : inflating and findViewById both take a lot of resouces so it doesn't make sense to use
  4. them again in onSaveInstanceState, so we save the views inflated in onCreate as class fields
  5.  
  6. * Android stores some of the views' states by default. but we have to save some of them manually
  7.  
  8. We can also save previous states for an activity. Like going back to the countries fragment. reloading the data, and automatically scrolling to where we left.
  9.  
  10. Review files.
  11.  
  12. Viewing files -> Device File Explorer
  13.  
  14. Saving files -> in storage vs cache vs ext storage. filesDir, cacheDir, getExternalFilesDir()
  15.  
  16. don't store sensitive data on cache, other apps can delete it
  17.  
  18. * TIP : do file stuff in a seperate thread. especially when working with heavy files
  19.  
  20. Really important stuff -> Difference between different file methods/directories and their permissions
  21.  
  22. Styles, Style inheritance, android styles, extending android framework styles (using parent)
  23.  
  24. Themes -> ColorPrimary
  25.  
  26. Different activities -> FragmentActivity, AppCompatActivity
  27.  
  28. Changing theme -> AndroidManifest.xml
  29.  
  30. changing theme in code -> setTheme()
  31.  
  32. Material design -> material.io Google's standard design guideline.
  33.  
  34. Material design library components -> add dependency to manifest -> user Theme.MaterialComponents.*
  35.  
  36. Really important stuff -> Different Entities in recyclerview adapter. And keeping their correct order. notifyItemChanged and stuff
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top