Giter VIP home page Giter VIP logo

Comments (4)

AriesHoo avatar AriesHoo commented on August 17, 2024

参看Demo AppImpl类

/**
* 设置当前Activity是否支持滑动返回(用于控制是否添加一层{@link BGASwipeBackLayout})
* 返回为true {@link #setSwipeBack(Activity, BGASwipeBackHelper)}才有设置的意义
*
* @param activity
* @return
*/
@OverRide
public boolean isSwipeBackEnable(Activity activity) {
return true;
}

/**
 * 设置Activity 全局滑动属性--包括三方库
 *
 * @param activity
 * @param swipeBackHelper BGASwipeBackHelper 控制详见{@link com.aries.library.fast.FastManager}
 */
@Override
public void setSwipeBack(Activity activity, BGASwipeBackHelper swipeBackHelper) {
    //以下为默认设置
    //需设置activity window背景为透明避免滑动过程中漏出背景也可减少背景层级降低过度绘制
    activity.getWindow().setBackgroundDrawableResource(android.R.color.transparent);
    swipeBackHelper.setSwipeBackEnable(true)
            .setShadowResId(R.color.colorSwipeBackBackground)
            //底部导航条是否悬浮在内容上设置过NavigationViewHelper可以不用设置该属性
            .setIsNavigationBarOverlap(isControlNavigation());
}

from fastlib.

D-zy avatar D-zy commented on August 17, 2024

在继承FastTitleActivity的子类中,没有这个方法的重写
@OverRide
public boolean isSwipeBackEnable(Activity activity) {
return true;
}

from fastlib.

AriesHoo avatar AriesHoo commented on August 17, 2024

全局的,没有单独的控制的。全局有回调参数Activity 可以根据需要单独设置某些Activity不使用滑动返回

from fastlib.

D-zy avatar D-zy commented on August 17, 2024

谢谢 ,这下理解了

from fastlib.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.