Git Product home page Git Product logo

onestravel / onebottomnavigationbar Goto Github PK

View Code? Open in Web Editor NEW
171.0 171.0 35.0 712 KB

OneBottomNavigationBar 是自定义的一个实现App应用底部导航栏功能的View,可以实现底部 2-5 个导航菜单(一般不会有更多),可以实现某一个菜单凸起的效果,如,有5个菜单,可以选择让第三个菜单凸起(floating),这是很多App都有的功能; 可以根据编写的颜色变化的资源文件来更改图标和文字选中时和未选中时的颜色,可以自由控制是否需要选中(checkable),选择开启时,可变换为选中颜色,选择关闭时,不能更改为选择颜色;可以控制默认选中哪一项;可以设置某一个导航菜单的未读消息数(数字或者小红点)

Kotlin 100.00%
android bottomnavigationbar

onebottomnavigationbar's People

Contributors

onestravel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

onebottomnavigationbar's Issues

属性丢失

找不到属性app:floatingEnable="true",app:floatingUp="25dp"

AAPT: error: duplicate value for resource 'attr/itemIconTint' with config ''.

AAPT: error: duplicate value for resource 'attr/itemIconTint' with config ''.
AAPT: error: resource previously defined here.
AAPT: error: duplicate value for resource 'attr/itemTextColor' with config ''.

/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml: AAPT: error: file failed to compile.

使用android studio 运行后的结果

小窗应用模式触摸失效

手机系统版本:小米11 miui12.5 21.3.19
使用版本:1.2.4-beta2

在上述环境中使用小窗模式打开应用后,触摸会失效,点击无法切换item。

有机会适配下androidX的Fragment切换

androidX的fragment已经不需要用setUserHint方法了

On the new version of androidx.fragment (from 1.1.0+), Fragment.setUserVisibleHint will still get called if your FragmentStatePagerAdapter is using the old behavior, specified by BEHAVIOR_SET_USER_VISIBLE_HINT.

If you have constructed your FragmentStatePagerAdapter and passed BEHAVIOR_RESUME_ONLY_CURRENT_FRAGMENT, then Fragment.setUserVisibleHint will no longer be called inside FragmentStatePagerAdapter.instantiateItem.

NOTE: you can still call the deprecated Fragment.getUserVisibleHint if you have specified BEHAVIOR_RESUME_ONLY_CURRENT_FRAGMENT in your FragmentStatePagerAdapter, but be advised that it will return true even though Fragment.isResumed() will return false.

新版本的fragment切换可以直接采用onResume来判断是否显示,但是需要在切换fragment时 加入以下代码

setMaxLifecycle(fragment, Lifecycle.State.RESUMED);

If you are manually calling this method, use FragmentTransaction.setMaxLifecycle(Fragment, Lifecycle.State) instead. If overriding this method, behavior implemented when passing in true should be moved to onResume(), and behavior implemented when passing in false should be moved to onPause().

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.