Coder Social home page Coder Social logo

navigationbar's Introduction

NavigationBar

####标题导航栏,两三句代码即可实现 ####博客地址:http://blog.csdn.net/ywl5320/article/details/51866799 XML布局:

    <com.ywl5320.navigationbar.bar.NavitationLayout
        android:id="@+id/bar"
        android:layout_width="match_parent"
        android:layout_height="50dp"
        android:background="#ffffff"/>

实例图片:
image

更多实例图片:
####1、 image
代码如下:

    /**
     *
     * @param context 上下文
     * @param titles 标题栏
     * @param viewPager
     * @param unselectedcolor 未选中字体颜色
     * @param setectedcolor 选中字体颜色
     * @param txtUnselectedSize 未选中字体大小
     * @param txtSelectedSize 选中字体大小
     * @param currentPosition 当前viewpager的位置
     * @param widOffset 导航条的边距
     * @param smoothScroll 滑动类型
     */
    navitationLayout.setViewPager(this, titles, viewPager, R.color.color_333333, R.color.color_2581ff, 16, 16, 0, 0, true);
    navitationLayout.setNavLine(this, 3, R.color.colorPrimary, 0);

####2、 image
代码如下:

    navitationLayout.setViewPager(this, titles, viewPager, R.color.color_333333, R.color.color_2581ff, 16, 16, 0, 0, true);
    navitationLayout.setBgLine(this, 1, R.color.colorAccent);
    navitationLayout.setNavLine(this, 3, R.color.colorPrimary, 0);

####3、 image
代码如下:

    navitationLayout.setViewPager(this, titles, viewPager, R.color.color_333333, R.color.color_2581ff, 16, 16, 0, 12, true);
    navitationLayout.setBgLine(this, 1, R.color.colorAccent);
    navitationLayout.setNavLine(this, 3, R.color.colorPrimary, 0);

####4、 image
代码如下:

    navitationLayout.setViewPager(this, titles, viewPager, R.color.color_333333, R.color.color_2581ff, 14, 18, 0, 12, true);
    navitationLayout.setBgLine(this, 1, R.color.colorAccent);
    navitationLayout.setNavLine(this, 3, R.color.colorPrimary, 0);<br/>

####5、 image 代码如下:

    navitationLayout.setViewPager(this, titles, viewPager, R.color.color_333333, R.color.color_2581ff, 16, 16, 0, 12, true, R.color.color_333333, 1f, 15f, 15f);
    navitationLayout.setBgLine(this, 1, R.color.colorAccent);
    navitationLayout.setNavLine(this, 3, R.color.colorPrimary, 0);

create by ywl5320

navigationbar's People

Contributors

wanliyang1990 avatar

Watchers

 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.