Git Product home page Git Product logo

easynavigation's Introduction

主要功能

  • 几行代码轻松实现底部导航栏(Tab文字图片高度随意更改);
  • 中间可添加加号按钮,也可添加文字;(足够的属性满足你需要实现的加号样式)
  • 如果还不能满足、中间可添加自定义View;
  • Tab中随意添加小红点提示、数字消息提示;
  • 点击按钮可跳转界面、也可作为Tab切换Fragment;
  • 更多使用参考简书;

简书地址:https://www.jianshu.com/p/ce8e09cda486

效果图

image

image image image

实现

  • 依赖

Step 1. Add it in your root build.gradle at the end of repositories:

	allprojects {
		repositories {
			...
			maven { url 'https://jitpack.io' }
		}
	}

Step 2. Add the dependency

	 implementation 'com.github.forvv231:EasyNavigation:1.0.3'

更新(1.0.3)

1、viewpager缓存默认值改大一些(之前一直有咨询页面销毁的问题);


更新(1.0.2)

1、修改navigition为navigation;


更新(1.0.1)

1、默认Tab点击改为无动画、或anim()中传入null设置为无动画;

2、修复部分机型addAlignBottom属性失效问题;


更新(1.0.0)

1、中间加号下可添加文字;

2、中间加号位置可添加自定义View;

3、可设置点击加号后同其他Tab一样切换Fragment;

  • 移除addIcon属性、添加中间的图片文字同Tab一样
  • 移除onAddClickListener、监听事件同Tab、实现onTabClickListener

  • 新增addAlignBottom属性(加号是否同Tab文字底部对齐 RULE_BOTTOM时有效)
  • 新增addTextTopMargin属性(加号文字距离加号图片的距离)
  • 新增addTextSize属性(加号文字大小)
  • 新增addNormalTextColor属性(加号文字未选中时字体颜色)
  • 新增addSelectTextColor属性(加号文字选中时字体颜色)

  • 更改addIconBottom方法名为addLayoutBottom
  • 更改addIconRule方法名为addLayoutRule

Demo

github:https://github.com/forvv231/EasyNavigation

apk: https://fir.im/7r4d

image.png

easynavigation's People

Contributors

vincent7wong avatar xzy031424 avatar

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.