BubbleTab

项目地址:florent37/BubbleTab
简介:Put some bubble in your tabs and give your apps a supa fresh style !
更多:作者   提 Bug   
标签:

Put some bubble in your tabs and give your apps a supa fresh style !

Sponsor

screen

Usage

screen

Add a BubbleTab with your icons on the layout.xml

Customisable parameters :

  • circleColor
  • circleRatio
  • image(0-10)
<com.github.florent37.bubbletab.BubbleTab
        android:id="@+id/bubbleTab"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:clipToPadding="false"
        android:background="@android:color/white"
        android:elevation="10dp"

        app:bubbleTab_circleColor="@color/colorAccent"
        app:bubbleTab_circleRatio="1.25"
        app:bubbleTab_image0="@drawable/ic_home"
        app:bubbleTab_image1="@drawable/ic_account"
        app:bubbleTab_image2="@drawable/ic_event"
        app:bubbleTab_image3="@drawable/ic_search"
        app:bubbleTab_image4="@drawable/ic_query"
        />

    <android.support.v4.view.ViewPager
        android:id="@+id/viewPager"
        android:layout_width="match_parent"
        android:layout_height="match_parent"/>

Then bound it with your viewPager

bubbleTab.setupWithViewPager(viewPager);

Customisation

To display your home icon with a different color / content if selected / unselected

Add a different drawable into bubbleTab_image0Colored

screen

<com.github.florent37.bubbletab.BubbleTab

        app:bubbleTab_image0="@drawable/ìc_normal"
        app:bubbleTab_image0Colored="@drawable/ic_selected"

Download

In your module Download

compile 'com.github.florent37:bubbletab:1.0.0'

Credits

Author: Florent Champigny http://www.florentchampigny.com/

Android app on Google Play Follow me on Google+ Follow me on Twitter Follow me on LinkedIn

License

Copyright 2016 florent37, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
随手点击下面广告,支持我维护本站吧
随手点击下面广告支持我免费维护吧
Android 开发经验分享
随手点击下面广告支持本站吧
 
Android 开发经验分享