Skip to content
Projets

tosslife/FoldingTabBar.Android

Voir sur GitHub

À propos

[OBSOLÈTE] Bibliothèque de menu à barre d’onglets repliable pour Android. Elle permet d’ajouter facilement à votre application un menu d’onglets animé et élégant.

Outils de développement

Comment ces chiffres sont mesurés

Progression mesurée des étoiles

in 24h
0
in 7 days
0
in 15 days
0
in 1 month
Historique en cours

Variations nettes sur des périodes qui se chevauchent, pas des totaux quotidiens. Les mesures absentes restent vides. Les étoiles indiquent l’intérêt, pas la qualité.

README.md

Original

FoldingTabBar.Android

folding tabbar menu for Android. This is a menu library.You can easily add a nice animated tab menu to your app.

Inspired by this project on Dribbble

Simple Apk

Apk Download

Screenshot

screenshot

How to use (参考MainActivity)

Maven

        <dependency>
            <groupId>com.github.tosslife</groupId>
            <artifactId>foldingtabbar</artifactId>
            <version>1.0.0</version>
            <type>aar</type>
        </dependency>

Gradle

add in build.gradle:

        //Wait bintray audit ...
        compile 'com.github.tosslife:foldingtabbar:1.0.0'

Xml

After adding the gradle dependencies from above you can go to your xml layout and add the following code for a TabBarView:

         <com.srx.widget.TabBarView
            android:id="@+id/tabBarView"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_alignParentBottom="true" />

Java

To set some basic settings use the following java-code:

       //获取TabBarView
       TabBarView tabBarView = (TabBarView) findViewById(R.id.tabBarView);

       //设置主按钮图标
       tabBarView.setMainBitmap(R.drawable.icon_main);

       //设置菜单对应位置按钮图标及两侧图标
       tabBarView.bindBtnsForPage(0, R.drawable.icon_menu, R.drawable.icon_left, R.drawable.icon_right);

       //设置初始默认选中
       tabBarView.initializePage(0);

       //添加监听
        tabBarView.setOnTabBarClickListener(onTabBarClickListener);

       //监听回调
       private OnTabBarClickListener onTabBarClickListener = new OnTabBarClickListener() {

               @Override
               public void onMainBtnsClick(int position, int[] clickLocation) {
                    //点击菜单
               }

               @Override
               public void onMainBtnsClick(int position) {
                    //点击菜单
               }

               @Override
               public void onLeftBtnClick(int page) {
                    //点击对应菜单的左侧按钮
               }

               @Override
               public void onRightBtnClick(int page) {
                    //点击对应菜单的右侧按钮
               }

           };


       //

Explorer des projets similaires

Chargement…