relateiq/ahbottomnavigation

Name: ahbottomnavigation

Owner: SalesforceIQ

Description: A library to reproduce the behavior of the Bottom Navigation guidelines from Material Design.

Created: 2016-03-19 04:13:30.0

Updated: 2016-03-19 04:13:31.0

Pushed: 2016-03-19 01:48:00.0

Homepage: null

Size: 1217

Language: Java

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

AHBottomNavigation

Library to implement the Bottom Navigation component from Material Design guidelines (minSdkVersion=16).

Demo

Features

How to?

Gradle
ndencies {
compile 'com.aurelhubert:ahbottomnavigation:0.1.1'

XML
.aurelhubert.ahbottomnavigation.AHBottomNavigation
    android:id="@+id/bottom_navigation"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"/>
Activity/Fragment
ttomNavigation bottomNavigation = (AHBottomNavigation) findViewById(R.id.bottom_navigation);

reate items
ttomNavigationItem item1 = new AHBottomNavigationItem("Label One", R.drawable.ic_maps_place, Color.parseColor("#455C65"));
ttomNavigationItem item2 = new AHBottomNavigationItem("Label Two", R.drawable.ic_maps_local_bar, Color.parseColor("#00886A"));
ttomNavigationItem item3 = new AHBottomNavigationItem("Label Three", R.drawable.ic_maps_local_restaurant, Color.parseColor("#8B6B62"));

dd items
omNavigation.addItem(item1);
omNavigation.addItem(item2);
omNavigation.addItem(item3);

et background color
omNavigation.setDefaultBackgroundColor(Color.parseColor("#FEFEFE"));

hange colors
omNavigation.setAccentColor(Color.parseColor("#F63D2B"));
omNavigation.setInactiveColor(Color.parseColor("#747474"));

se colored navigation with circle reveal effect
omNavigation.setColored(true);

et listener
omNavigation.setAHBottomNavigationListener(new AHBottomNavigation.AHBottomNavigationListener() {
@Override
public void onTabSelected(int position) {
    // Do something cool here...
}

Contributions

Feel free to create issues / pull requests.

License
ttomNavigation library for Android
right (c) 2016 Aurelien Hubert (http://github.com/aurelhubert).

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

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

ss required by applicable law or agreed to in writing, software
ributed under the License is distributed on an "AS IS" BASIS,
OUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
the License for the specific language governing permissions and
tations under the License.

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.