GithubHelp home page GithubHelp logo

Comments (20)

AriesHoo avatar AriesHoo commented on June 5, 2024

参看AppImpl设置导航栏代码
/**
* {@link FastLifecycleCallbacks#onActivityStarted(Activity)}
*
* @param activity
* @param helper
*/
@OverRide
public boolean setNavigationBar(Activity activity, NavigationViewHelper helper, View bottomView) {
//其它默认属性请参考FastLifecycleCallbacks
return false;
}

return false则是不处理导航栏。则成了默认的黑色导航栏

from fastlib.

chenchali avatar chenchali commented on June 5, 2024

如果改成false导航栏会将项目底部bottomBar覆盖,创建的项目默认导航栏是白底黑色按钮,现在集成你这个依赖后导航栏是activity的背景色,按钮是透明带边框的样式,我是想改成默认创建项目时的白底黑色按钮(小米mix2s,小米6x,小米8,这几个都是这样的问题)

from fastlib.

chenchali avatar chenchali commented on June 5, 2024

下载了你的这个项目 ,运行在这几款全面屏手机上时也是同样的问题,导航栏三个按钮都是透明带边框的样式,不知道怎么修改一下

from fastlib.

AriesHoo avatar AriesHoo commented on June 5, 2024

截图给我看看,运行出来啥效果

from fastlib.

AriesHoo avatar AriesHoo commented on June 5, 2024

boolean isInit = mActivityFragmentControl != null ? mActivityFragmentControl.setNavigationBar(activity, navigationViewHelper, bottomView) : true;
if (isInit) {
activity.getWindow().getDecorView().setTag(R.id.navigation_view_helper, true);
navigationViewHelper.init();
}

按道理return true;我的库才会执行操作导航栏相关操作否则是不会操作的

from fastlib.

AriesHoo avatar AriesHoo commented on June 5, 2024

@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(false);
}
通步将setIsNavigationBarOverlap设置成false即可

from fastlib.

chenchali avatar chenchali commented on June 5, 2024

image

from fastlib.

chenchali avatar chenchali commented on June 5, 2024

image
其他应用都是正常的

from fastlib.

AriesHoo avatar AriesHoo commented on June 5, 2024

@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(false);
}

通步将setIsNavigationBarOverlap设置成false;同时设置
@OverRide
public boolean setNavigationBar(Activity activity, NavigationViewHelper helper, View bottomView) {
//其它默认属性请参考FastLifecycleCallbacks
return false;
}

from fastlib.

chenchali avatar chenchali commented on June 5, 2024

十分感谢

from fastlib.

chenchali avatar chenchali commented on June 5, 2024

如果按照你那样设置又会出现另一个问题,就是把导航栏三个按钮隐藏,用全面屏手势操作,导航栏应该隐藏才对

wechatimg46
wechatimg47

from fastlib.

chenchali avatar chenchali commented on June 5, 2024

你说的两个地方都设置成true全面屏现不现实三个按钮都没有问题,只是三个按钮是透明带边框的,如果能改一下这个三个按钮的颜色就没有问题了

from fastlib.

AriesHoo avatar AriesHoo commented on June 5, 2024

这个问题后续处理下,猜测是滑动返回库处理问题 setSwipeBackEnable(false) 设置false试一试
activity.getWindow().setBackgroundDrawableResource(android.R.color.transparent);
swipeBackHelper.setSwipeBackEnable(false)
.setShadowResId(R.color.colorSwipeBackBackground)
//底部导航条是否悬浮在内容上设置过NavigationViewHelper可以不用设置该属性
.setIsNavigationBarOverlap(false);

from fastlib.

chenchali avatar chenchali commented on June 5, 2024

都试过了,那好的

from fastlib.

AriesHoo avatar AriesHoo commented on June 5, 2024

https://blog.csdn.net/adarcy/article/details/82461633

from fastlib.

chenchali avatar chenchali commented on June 5, 2024

这个试了不好用

from fastlib.

AriesHoo avatar AriesHoo commented on June 5, 2024

确实是滑动返回库造成的 https://www.jianshu.com/p/09a3c6098cf5

from fastlib.

chenchali avatar chenchali commented on June 5, 2024

这个滑动返回能禁掉吗?按照网上的那个方法写了之后还是有那个问题

from fastlib.

AriesHoo avatar AriesHoo commented on June 5, 2024

public void setSwipeBack(Activity activity, BGASwipeBackHelper swipeBackHelper) {
swipeBackHelper.setSwipeBackEnable(false);
}
设置成false试一试

from fastlib.

AriesHoo avatar AriesHoo commented on June 5, 2024

如果不可以的话就是使用 implementation 'com.github.AriesHoo:FastLib:2.2.10-beta6_16' 这个版本
新增了一个回调
@OverRide
public boolean isSwipeBackEnable(Activity activity) {
return false;
}
返回false则不进行滑动返回操作,可参看Demo AppImpl 对应方法

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.