Search in sources :

Example 1 with SwipeBackLayout

use of me.yokeyword.fragmentation.SwipeBackLayout in project Fragmentation by YoKeyword.

the class SwipeBackActivity method onActivityCreate.

void onActivityCreate() {
    getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
    getWindow().getDecorView().setBackgroundDrawable(null);
    mSwipeBackLayout = new SwipeBackLayout(this);
    ViewGroup.LayoutParams params = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
    mSwipeBackLayout.setLayoutParams(params);
}
Also used : SwipeBackLayout(me.yokeyword.fragmentation.SwipeBackLayout) ColorDrawable(android.graphics.drawable.ColorDrawable) ViewGroup(android.view.ViewGroup)

Example 2 with SwipeBackLayout

use of me.yokeyword.fragmentation.SwipeBackLayout in project Fragmentation by YoKeyword.

the class SwipeBackFragment method onFragmentCreate.

private void onFragmentCreate() {
    mSwipeBackLayout = new SwipeBackLayout(_mActivity);
    ViewGroup.LayoutParams params = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
    mSwipeBackLayout.setLayoutParams(params);
    mSwipeBackLayout.setBackgroundColor(Color.TRANSPARENT);
}
Also used : SwipeBackLayout(me.yokeyword.fragmentation.SwipeBackLayout) ViewGroup(android.view.ViewGroup)

Example 3 with SwipeBackLayout

use of me.yokeyword.fragmentation.SwipeBackLayout in project Fragmentation by YoKeyword.

the class SwipeBackFragment method initFragmentBackground.

@Override
protected void initFragmentBackground(View view) {
    if (view instanceof SwipeBackLayout) {
        View childView = ((SwipeBackLayout) view).getChildAt(0);
        setBackground(childView);
    } else {
        setBackground(view);
    }
}
Also used : SwipeBackLayout(me.yokeyword.fragmentation.SwipeBackLayout) View(android.view.View)

Aggregations

SwipeBackLayout (me.yokeyword.fragmentation.SwipeBackLayout)3 ViewGroup (android.view.ViewGroup)2 ColorDrawable (android.graphics.drawable.ColorDrawable)1 View (android.view.View)1