Fragment setCustomAnimations() R.animator.slide_up 123456789cs R.animator.slide_up 123456789cs 애니메이션 적용 1234567getFragmentManager().beginTransaction() .setCustomAnimations(R.animator.slide_up, R.animator.slide_down, R.animator.slide_up, R.animator.slide_down) .add(R.id.list_fragment_container, Fragment) .addToBackStack(null).commit();cs 메서드를 호출하는 순서가 중요하다고 한다 실제로 내 경우 setCustomanimations() 를 add..
Fragment add(), replace(), BackStack 기본적으로 Fragment가 Activity의 View에 올라가면, onAttach -> onCreate -> onCreateView -> onCreateanimator -> onViewCreated -> onActivityCreated ->onStart -> onResume -> 의 흐름이고 Activity에서 제거가 된다면 onPause -> onStop -> onDestroyView -> onCreateAnimator -> onDestroy -> onDetach 의 순으로 호출이 된다. attach/detach는 Activity에 '포함' 되는 과정을 일컫는다. add() 기존 Fragment를 그대로 둔 채 (onStop 호출하지 ..
Hide FAB on scroll(Recyclerview에서 스크롤시 FloatingActionButton 숨기기) fdRecyclerview.addOnScrollListener(new RecyclerView.OnScrollListener() { @Override public void onScrolled(RecyclerView recyclerView, int dx, int dy) { if (dy 0) { fdFab.hide(); } } });