• Stars
    star
    153
  • Rank 243,368 (Top 5 %)
  • Language
    Java
  • License
    MIT License
  • Created over 9 years ago
  • Updated over 8 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Done by neokree for the material tabs. This is going to be the better one in here!

Android Gems

MaterialTabsAdvanced API gitpay

Custom Tabs with Material Design animations for pre-Lollipop devices Android Arsenal [Download example apk] It requires 14+ API and android support v7 (Toolbar)

Developer notes

Dependency: Android-UI Reveal Color View
If you are using MaterialTabs in your app and would like to be listed here, please let me know via email!

Release features

v1.0.4

  • - fix some bugs OnePlusOne v1.0.1
  • - Support custom font and custom textview by external textview library
  • - Single line implementations
  • - Adaptive layout and extra frames

How to use:

define it in xml layout with custom attributes

setup your own attributes from the xml from here

<!-- for Text Tabs -->
<hkm.ui.materialtabs.MaterialTabHost
        android:id="@+id/materialTabHost"
        android:layout_width="match_parent"
        android:layout_height="48dp"
        app:advtabs_textColor="#FFFFFF"
        app:advtabs_materialTabsPrimaryColor="YOUR_PRIMARY_COLOR"
        app:advtabs_nonFixTabsCountStart="4"
        app:advtabs_accentColor="YOUR_ACCENT_COLOR" />
<!-- for icon tabs -->
<hkm.ui.materialtabs.MaterialTabHost
        android:id="@+id/materialTabHost"
        android:layout_width="match_parent"
        android:layout_height="48dp"
        app:advtabs_iconColor="#FFFFFF"
        app:advtabs_materialTabsPrimaryColor="YOUR_PRIMARY_COLOR"
        app:advtabs_accentColor="YOUR_ACCENT_COLOR"
        app:advtabs_nonFixTabsCountStart="4"
        app:advtabs_hasIcons="true"/>

( I'm working on use wrap_content instead 48dp)

Connect to java code and add to viewPager

MaterialTabHost tabHost;

@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);

		tabHost = (MaterialTabHost) this.findViewById(R.id.materialTabHost);
		pager = (ViewPager) this.findViewById(R.id.viewpager);

		// init view pager
		pagerAdapter = new ViewPagerAdapter(getSupportFragmentManager());
		pager.setAdapter(pagerAdapter);
		pager.setOnPageChangeListener(new ViewPager.SimpleOnPageChangeListener() {
            @Override
            public void onPageSelected(int position) {
            	// when user do a swipe the selected tab change
                tabHost.setSelectedNavigationItem(position);
            }
        });

		// insert all tabs from pagerAdapter data
		for (int i = 0; i < pagerAdapter.getCount(); i++) {
            tabHost.addTab(
                    tabHost.newTab()
                            .setIcon(getIcon(i))
                            .setTabListener(this)
                            );
    }
}

@Override
	public void onTabSelected(MaterialTab tab) {
		// when the tab is clicked the pager swipe content to the tab position
		pager.setCurrentItem(tab.getPosition());
	}

###add new tab

Just the text only

private MaterialTabHost tab;


tab.addTab(tab.createCustomTextTab(R.layout.item_tab, txt, false).setTabListener(this));

R.layout.item_tab

That will be consist of your own table arrangement implementations.

It is required to apply with the callback interface from using setTabListener

extends ActionBarActivity implements MaterialTabListener

Installations

Please check with supported repo mavens

###jitpack remote maven

repositories {
    maven {  url "https://jitpack.io"  }
}

dependencies {
	        compile 'com.github.jjhesk:MaterialTabsAdavanced:vX.XX'
	}

###Bintray Remote Download

repositories {
    maven {  url "http://dl.bintray.com/jjhesk/maven"  }
}

dependencies {
     compile 'com.hkm:advancedmaterialtabs:1.0.0@aar'
}

Limitations

Actually, this library have some limitations: - No selector animations

These problems are currently in development

Fixed and Scrollable tabs.

With text tabs

N default = 3 [1 - N] Fixed Tabs
[N - โˆž] Scrollable Tabs

With icon tabs

[1 - 5] Fixed Tabs
[6 - โˆž] Scrollable Tabs

screenshot

screenshot

screenshot

screenshot

###Donation Accepted wallet

More Repositories

1

LoyalNativeSlider

Possible a dynamic viewpager ever you can find.
Java
160
star
2

hkm-progress-button

Base on android-process-button this is the advanced version of the android-process-button.
Java
118
star
3

KickAssSlidingMenu

I am bringing it back from the good old project sliding menu in the Android Studio. It will be an alternative to the google promoted Drawer Layout.
Java
99
star
4

TagViewLayout

fast manage your TagViewLayouts
Java
73
star
5

ToolBarLib

The total redesigned action bar of your choices ๐Ÿ”ฅ๐Ÿ”ฅ
Java
64
star
6

unity-interview

sample game for interview
C#
31
star
7

DisqusSDK-Android

This is the simple library for https://disqus.com/ developed on Android.
Java
28
star
8

LongMenu

Easy Setup the dynamic long menu in JAVA Android
Java
12
star
9

slideSelectionList

The viewpager based animated pushed level by level list menu support both multiple and single selection.
Java
11
star
10

DropDownBoxUi

A custom made drop down box Ui for handy use.
Java
2
star
11

LLicenseChecker

The server side license checker developed Lofy
PHP
2
star
12

LicenseModuleChecker-Client-Android

Android client side SDK for software verifications
Java
2
star
13

FacebookSupport

Facebook Scan and Support
PHP
1
star
14

TaxiOneCall

Call Taxi with one check
HTML
1
star
15

SlidrSwipe

An easy Swappable slider activity
Java
1
star
16

mymachineroom

The foundation of the machine room
Python
1
star
17

LayerZeroUsdt

layer zero ready USDT
Python
1
star
18

BaibuMapGradle

Try to make the baidu map on grade
Java
1
star
19

URVSugarOverlay

This is the library to extend and support fast integration and development from the UltimateRecyclerView library
Java
1
star
20

heskCounter

This is the JQ numeric counter for display a list of digits
JavaScript
1
star
21

shoppingcart

the online store on android
Java
1
star
22

parallaxmotion

Its a motion sensor parrallex view
Java
1
star
23

incomplete-game-engine-ship

unity program library and controllers
C#
1
star
24

hkm-meta-box

meta-box-request
PHP
1
star
25

AndroidSlidingPanelAdvanced

Done by umano/AndroidSlidingUpPanel, this is going to be super awesome dancing advance panel that will be so easy to use.
Java
1
star