Android Open Source - SwipeBackLayout Swipe Back Activity






From Project

Back to project page SwipeBackLayout.

License

The source code is released under:

Apache License

If you think the Android project SwipeBackLayout listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package me.imid.swipebacklayout.lib.app;
//from   w w  w  . j  a  v  a 2 s. co m
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.view.View;

import me.imid.swipebacklayout.lib.SwipeBackLayout;

public class SwipeBackActivity extends FragmentActivity implements SwipeBackActivityBase {
    private SwipeBackActivityHelper mHelper;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        mHelper = new SwipeBackActivityHelper(this);
        mHelper.onActivityCreate();
    }

    @Override
    protected void onPostCreate(Bundle savedInstanceState) {
        super.onPostCreate(savedInstanceState);
        mHelper.onPostCreate();
    }

    @Override
    public View findViewById(int id) {
        View v = super.findViewById(id);
        if (v == null && mHelper != null)
            return mHelper.findViewById(id);
        return v;
    }

    @Override
    public SwipeBackLayout getSwipeBackLayout() {
        return mHelper.getSwipeBackLayout();
    }

    @Override
    public void setSwipeBackEnable(boolean enable) {
        getSwipeBackLayout().setEnableGesture(enable);
    }

    @Override
    public void scrollToFinishActivity() {
        getSwipeBackLayout().scrollToFinishActivity();
    }
}




Java Source Code List

me.imid.swipebacklayout.demo.DemoActivity.java
me.imid.swipebacklayout.demo.PreferenceUtils.java
me.imid.swipebacklayout.lib.SwipeBackLayout.java
me.imid.swipebacklayout.lib.ViewDragHelper.java
me.imid.swipebacklayout.lib.app.SwipeBackActivityBase.java
me.imid.swipebacklayout.lib.app.SwipeBackActivityHelper.java
me.imid.swipebacklayout.lib.app.SwipeBackActivity.java
me.imid.swipebacklayout.lib.app.SwipeBackPreferenceActivity.java