Search in sources :

Example 1 with ClipboardFragment

use of se.alexanderblom.delicious.fragments.ClipboardFragment in project android-delicious by lexs.

the class ContainerActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(getContentResource());
    getActionBar().setHomeButtonEnabled(true);
    if (savedInstanceState == null) {
        ClipboardFragment clipboard = new ClipboardFragment();
        getFragmentManager().beginTransaction().add(R.id.content, createFragment(savedInstanceState)).add(R.id.clipboard_display, clipboard).hide(clipboard).commit();
    }
    ViewGroup container = (ViewGroup) findViewById(R.id.container);
    LayoutTransition transition = new LayoutTransition();
    transition.setStartDelay(LayoutTransition.APPEARING, 0);
    transition.setStartDelay(LayoutTransition.CHANGE_APPEARING, 0);
    transition.setStartDelay(LayoutTransition.CHANGE_DISAPPEARING, 0);
    transition.setStartDelay(LayoutTransition.DISAPPEARING, 0);
    ObjectAnimator animator = ObjectAnimator.ofFloat(null, View.ALPHA, 1f, 0f);
    transition.setAnimator(LayoutTransition.DISAPPEARING, animator);
    container.setLayoutTransition(transition);
}
Also used : ViewGroup(android.view.ViewGroup) ObjectAnimator(android.animation.ObjectAnimator) LayoutTransition(android.animation.LayoutTransition) ClipboardFragment(se.alexanderblom.delicious.fragments.ClipboardFragment)

Aggregations

LayoutTransition (android.animation.LayoutTransition)1 ObjectAnimator (android.animation.ObjectAnimator)1 ViewGroup (android.view.ViewGroup)1 ClipboardFragment (se.alexanderblom.delicious.fragments.ClipboardFragment)1