Fragment
FragmentTransaction - setCustomAnimations()
fragment κ° add νΉμ replace λ λ animation μ μ€μ ν μ μμ.
transaction νλ¦ λ΄μμ setCustomAnimations νΈμΆμ add, replace λ³΄λ€ λ€μμ ν κ²½μ° animation μ΄ μ μ©λμ§ μμ
addToBackStack() μΌλ‘ fragment λ₯Ό backStack μ λ£λ κ²½μ°μ λ£μ§ μλ κ²½μ° μ¬μ©λλ λ©μκ° λ€λ¦
FragmentTransaction - commitAllowingStateLoss()
commitAllowingStateLoss()
μΌλ°μ μΌλ‘ activity μ onSaveInstance() κ° νΈμΆλ μ΄ν commit μ νΈμΆ ν κ²½μ° exception λ°μν¨.
ν΄λΉ λ©μλλ₯Ό μ°λ©΄ activity μ onSaveInstance νΈμΆ μ΄ν ν΄λΉ λ©μλκ° λΆλ €λ, exception μ΄ throw λμ§ μκ³ transaction λ΄μ©μ΄ commit λ¨. λ€λ§, saveInstance μ μ μ₯λμ§ μμ μ μλ μ μ μΈμ§νκ³ μ¬μ© ν κ²
ref : https://medium.com/inloopx/demystifying-androids-commitallowingstateloss-cb9011a544cc
Last updated