All Projects → Moosphan → Material-BottomBarLayout

Moosphan / Material-BottomBarLayout

Licence: Apache-2.0 license
🎉A material navigation bar library which has pretty animations and different ways of arrangement.

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Material-BottomBarLayout

PagerSlidingTabStrip
An interactive indicator to navigate between the different pages of a ViewPager
Stars: ✭ 2,194 (+3817.86%)
Mutual labels:  tabs, viewpager, tablayout
IndicatorView
IndicatorView Library For Android
Stars: ✭ 41 (-26.79%)
Mutual labels:  tabs, viewpager
Magicindicator
A powerful, customizable and extensible ViewPager indicator framework. As the best alternative of ViewPagerIndicator, TabLayout and PagerSlidingTabStrip —— 强大、可定制、易扩展的 ViewPager 指示器框架。是ViewPagerIndicator、TabLayout、PagerSlidingTabStrip的最佳替代品。支持角标,更支持在非ViewPager场景下使用(使用hide()、show()切换Fragment或使用setVisibility切换FrameLayout里的View等),http://www.jianshu…
Stars: ✭ 8,969 (+15916.07%)
Mutual labels:  viewpager, tablayout
ViewWorld
自定义View合集,展示各种自定义View/控件。项目包含了自定义Banner轮播图控件,自定义验证码输入框,自定义TabLayout等控件,持续更新中😉😉😉
Stars: ✭ 94 (+67.86%)
Mutual labels:  viewpager, tablayout
Funtablayout
An efficient tablayout for Android with added FUN!
Stars: ✭ 20 (-64.29%)
Mutual labels:  viewpager, tablayout
Viewpagerhelper
这个一个 viewpager/viewpager2工具类,能够帮你快速实现导航栏轮播图,app引导页,viewpager/viewpager2 + fragment;内置多种tab指示器,让你告别 viewpager 的繁琐操作,专注逻辑功能
Stars: ✭ 957 (+1608.93%)
Mutual labels:  viewpager, tablayout
Whatsappviewpager
Swipeable tabs like WhatsApp in Android
Stars: ✭ 115 (+105.36%)
Mutual labels:  viewpager, tablayout
UltimateTabLayout
A library for tab layout use with viewpager. Very useful, small
Stars: ✭ 33 (-41.07%)
Mutual labels:  viewpager, tablayout
un-material-tab
(deprecated) Custom tab layout which can be used as a material TabLayout alternative and contains basic functionality which Google's TabLayout has.
Stars: ✭ 83 (+48.21%)
Mutual labels:  tabs, tablayout
react-native-paper-tabs
Smooth and fast cross platform Material Design Tabs for React Native Paper
Stars: ✭ 112 (+100%)
Mutual labels:  tabs, viewpager
Animatedbottombar
A customizable and easy to use BottomBar navigation view with sleek animations, with support for ViewPager, ViewPager2, NavController, and badges.
Stars: ✭ 797 (+1323.21%)
Mutual labels:  viewpager, animations
Tabman
™️ A powerful paging view controller with interactive indicator bars
Stars: ✭ 2,235 (+3891.07%)
Mutual labels:  tabs, viewpager
Snaptablayout
Android library for fluid tablayout animation as seen on Snapchat.
Stars: ✭ 547 (+876.79%)
Mutual labels:  viewpager, tablayout
Android Tab Animation
Easily create TabLayout.Tab animations that sync with the scrolling progress of ViewPager
Stars: ✭ 68 (+21.43%)
Mutual labels:  viewpager, tablayout
Dsltablayout
♥️ Android界最万能的TabLayout(不仅仅是TabLayout), 支持任意类型的item, 支持Drawable类型的指示器,智能开启滚动,支持横竖向布局等
Stars: ✭ 489 (+773.21%)
Mutual labels:  viewpager, tablayout
Changetablayout
[停止维护]一款炫酷的TabLayout
Stars: ✭ 345 (+516.07%)
Mutual labels:  viewpager, tablayout
ArcPageIndicator
Android Page Indicator for ViewPager with original animations. It uses an ellipse to dispose indication spots, and can draw a hand, like in old elevators.
Stars: ✭ 73 (+30.36%)
Mutual labels:  viewpager, animations
Flowhelper
帮助您迅速构建顶部Tab,比如今日头条效果,热搜、搜索记录、与ViewPager/ViewPager2搭配的工具类;
Stars: ✭ 295 (+426.79%)
Mutual labels:  viewpager, tablayout
react-native-viewpager-carousel
a flexible viewpager library with carousel functionality
Stars: ✭ 39 (-30.36%)
Mutual labels:  tabs, viewpager
Animatedtablayout
Yet another android tab layout
Stars: ✭ 572 (+921.43%)
Mutual labels:  tabs, tablayout

Material-BottomBarLayout

A material navigation bar library which has pretty animations and different ways of arrangement.

preview

Usage

Download

In gradle:

compile 'com.moos:Material-BottomBarLayout:1.0.5'

In xml:

<com.moos.library.BottomBarLayout
    android:id="@+id/bottom_bar"
    android:layout_width="match_parent"
    android:layout_height="56dp"
    app:tabs_arrange_way="horizontal"
    android:elevation="2dp"
    android:layout_alignParentBottom="true">

</com.moos.library.BottomBarLayout>

In java:

private BottomTabView tab_home, tab_look, tab_mine;
......

@Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        BottomBarLayout bottomBarLayout = findViewById(R.id.bottom_bar);
       
        tab_home = new BottomTabView(this);
        tab_home.setTabIcon(R.drawable.home);
        tab_home.setTabTitle("Home");

        tab_look = new BottomTabView(this);
        tab_look.setTabIcon(R.drawable.activity);
        tab_look.setTabTitle("Discover");

        tab_mine = new BottomTabView(this);
        tab_mine.setTabIcon(R.drawable.user);
        tab_mine.setTabTitle("Mine");
        tab_mine.setUnreadCount(100);


        bottomBarLayout
                .addTab(tab_home)
                .addTab(tab_look)
                .addTab(tab_mine)
                .create(new BottomBarLayout.OnTabSelectedListener() {
                    @Override
                    public void onTabSelected(BottomTabView tab) {
                        //you can switch the fragment here
                        Log.e(TAG, "onTabSelected: ====="+tab.getTabPosition() );
                    }

                    @Override
                    public void onTabUnselected(BottomTabView tab) {

                    }

                    @Override
                    public void onTabReselected(BottomTabView tab) {

                    }
                });
    }

More usage

1. Bind with ViewPager:

        ViewPager viewPager = findViewById(R.id.viewPager);
        viewPager.setAdapter(new CardViewPagerAdapter(data));
        bottomBarLayout.bindViewPager(viewPager);

2. Customize different states of icons

As we all known, the common libraries of tab we used can only change the color of different states of tabs. However, sometimes designers want we use different icon resource , like and . I provide setTabIcon and setSelectedTabIcon to set different states of icon resource for tabs.

API Details

  • BottomTabView

    Description:the tab item of bottom bar, like TabItem.

    The methods document:

    Method Usage
    getTabPosition get the position of current tab
    setTabIcon set the icon res for tab
    setTabTitle set the title for tab
    setTabIconSize set the icon size for tab
    setTabTitleSize set title text size for tab
    setTabPadding set padding for each tab
    setSelectedColor set selected color for tab
    setUnselectedColor set unselected color for tab
    setTabIconOnly weather show the tab title
    setTabTitleOnly weather show the tab icon
    setBubbleBackground set bg for unread bubble view
    setBubbleSize set size for bubble, only update the 'vertical size'
    setUnreadTextSize set size for unread text
    setUnreadTextColor set color for unread text
    setUnreadTextPadding set padding of unread text, only for padding left and right
    setUnreadTextMarginTop set margin top to unreadText
    setUnreadTextMarginRight set margin right to unreadText
    getTabIconView get the tab icon's imageView
    getTabTextView get the tab title view
    getTabContainer get the container of tab(LinearLayout)
    setSelectedTabIcon set the selected state icon for tab
  • BottomBarLayout

    Description:the tabs' container, like TabLayout.

    The methods document:

    Method Usage
    addTab(BottomTabView tab) add the tab for container
    getCurrentTabPosition get current selected tab's position
    getTabCount get the count of tabs in container
    bindViewPager(ViewPager viewPager) bind the viewPager and scroll with it
    create set call back of tab's selected operation
    setArrangeType the way of tabs arranges

ChangeLogs

  • V1.0.1

    Add the vertical style to show the tabs and you can customize your own icon res for selected state of tabs.

  • V1.0.2

    Change the minSdkVersion down to 16, avoid of the multiple errors.

  • V1.0.3

    Solve the problem that setUnselectColor method not works in initialization.

  • V1.0.5

    1. You can disable animations of tabs.
    2. When we customize our selectedIcon , we should disable the icon color setting.
  • V1.0.7

    Fix the problem that unselected icons still have color filter effect.

To-do

  • support horizontal and vertical style.
  • more animations for tabs.
  • bind with viewpager or other slide views.
  • change bottomBarLayout background when selected.
  • support different states of tab icons
  • Not limit default icon size any more, change it's size to wrap_content.

About me

Welcome to improve it with me and give me some issues.

E-mail:[email protected]

License

Copyright 2018 moosphon

   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.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].