Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

io.github.clistery:bottomnavigationex-base

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

io.github.clistery:bottomnavigationex-base

Bottom Navigation Extend

  • 2.2.0
  • Source
  • Maven
  • Socket score

Version published
Maintainers
1
Source

BottomNavigationEx

中文文档

version MIT License api 14+

An android library that enhances BottomNavigationView. (Continuation of BottomNavigationViewEx(obsolete))

APIs

Example

Dependencies

Gradle

  1. Ex library

    implementation 'io.github.clistery:bottomnavigationex-ex:x.x.x'
    
  2. Version base on material

    • material1.10.x

      implementation 'io.github.clistery:bottomnavigationex-110x:x.x.x'
      
    • material1.9.x

      implementation 'io.github.clistery:bottomnavigationex-19x:x.x.x'
      
    • material1.8.x

      implementation 'io.github.clistery:bottomnavigationex-18x:x.x.x'
      
    • material1.7.x

      implementation 'io.github.clistery:bottomnavigationex-17x:x.x.x'
      
    • material1.6.x

      implementation 'io.github.clistery:bottomnavigationex-16x:x.x.x'
      
    • material1.5.x

      implementation 'io.github.clistery:bottomnavigationex-15x:x.x.x'
      
    • material1.4.x

      implementation 'io.github.clistery:bottomnavigationex-14x:x.x.x'
      
    • material1.3.x

      implementation 'io.github.clistery:bottomnavigationex-13x:x.x.x'
      
  3. Add the following configuration in gradle.properties

    android.useAndroidX=true
    android.enableJetifier=true
    

USE

  • Adding a custom widget in xml

    <com.yh.bottomnavigationex.BottomNavigationViewEx
        android:id="@+id/bnve"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:background="@color/colorPrimary"
        app:itemIconTint="@color/selector_item_color"
        app:itemTextColor="@color/selector_item_color"
        app:menu="@menu/menu_navigation_with_view_pager" />
    
  • Binding view in Activity

    BottomNavigationViewEx bnve = (BottomNavigationViewEx) findViewById(R.id.bnve);
    
  • Disable all animations

    bnve.enableAnimation(false);
    bnve.enableLabelVisibility(false);
    bnve.enableItemHorizontalTranslation(false);
    
  • Custom text and icon size

    bnve.setIconSize(widthDp, heightDp);
    bnve.setTextSize(sp);
    
  • Binding with ViewPager

    // set adapter
    adapter = new VpAdapter(getSupportFragmentManager(), fragments);
    bind.vp.setAdapter(adapter);
    
    // binding with ViewPager
    bind.bnve.setupWithViewPager(bind.vp);
    
  • Binding with ViewPager2

    // set adapter
    adapter = new Vp2Adapter(getSupportFragmentManager());
    bind.vp.setAdapter(adapter);
    
    // binding with ViewPager
    bind.bnve.setupWithViewPager2(bind.vp);
    
  • Add badge view

    BadgeDrawable bd = bind.bnve.getRealView().getOrCreateBadge(R.id.i_friends);
    bd.setNumber(1);
    bd.setHorizontalOffset(12);
    bd.setVerticalOffset(2);
    
  • Dynamic Menu Item

    val menuCount: Int = max((Math.random() * 30).toInt(), 1)
    
    bnve.configDynamic(menuCount) { menu, index ->
        menu.add(0, index, index, "menu${index}")
            .setIcon(R.drawable.ic_favorite_black_24dp)
    }
    
  • For the usage of the original BottomNavigationView obtained through getRealView, please refer to Official Documentation

  • For more usage, please refer to demo.

License

MIT License

Copyright (c) 2022 clistery

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Star History Chart

FAQs

Package last updated on 14 Aug 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc