LuseenBottomNavigation


Source link: https://github.com/armcha/LuseenBottomNavigation

Material Bottom Navigation

BottomNavigationView

Designed according Google [guideLine][1] [1]: https://www.google.com/design/spec/components/bottom-navigation.html#bottom-navigation-usage [2]: http://luseen.com/ [3]: http://fir.im/luseen?release_id=56feaea800fc741d61000000 By [Luseen][2] Technologies

[Download simple apk][3]

Download

Gradle:

compile 'com.github.armcha:LuseenBottomNavigation:1.8.2'

Maven:

<dependency>
<groupId>com.github.armcha</groupId>
<artifactId>LuseenBottomNavigation</artifactId>
<version>1.8.2</version>
<type>pom</type> </dependency>

Usage

Add the BottomNavigationView to your layout

 <com.luseen.luseenbottomnavigation.BottomNavigation.BottomNavigationView

android:id="@+id/bottomNavigation"

android:layout_width="match_parent"

android:layout_height="wrap_content"

android:layout_alignParentBottom="true" />

Add BottomNavigation items

  BottomNavigationView bottomNavigationView = (BottomNavigationView) findViewById(R.id.bottomNavigation);

 BottomNavigationItem bottomNavigationItem = new BottomNavigationItem

  ("Record", ContextCompat.getColor(this, R.color.firstColor), R.drawable.ic_mic_black_24dp);

 BottomNavigationItem bottomNavigationItem1 = new BottomNavigationItem

  ("Like", ContextCompat.getColor(this, R.color.secondColor), R.drawable.ic_favorite_black_24dp);

bottomNavigationView.addTab(bottomNavigationItem);

bottomNavigationView.addTab(bottomNavigationItem1);

Then set your OnBottomNavigationItemClickListener

  bottomNavigationView.setOnBottomNavigationItemClickListener(new OnBottomNavigationItemClickListener() {

 @Override

 public void onNavigationItemClick(int index) {

Toast.makeText(MainActivity.this, "Item " +index +" clicked", Toast.LENGTH_SHORT).show();

 
}

}
);

If you are using a ViewPager , you can connect to the BottomNavigationView, Set color in this way, when using view pager:

 ContextCompat.getColor(context, R.color.firstColor)  bottomNavigationView.setUpWithViewPager(yourPager , colorResources , imageResources);

You can disable slide animation when using viewPager

bottomNavigationView.disableViewPagerSlide();

If your activity/fragment will not recreate and bottom navigation items doubled on orientation change, just can call this method

bottomNavigationView.willNotRecreate(true);

Customize

Customize with xml

  <com.luseen.luseenbottomnavigation.BottomNavigation.BottomNavigationView

 android:id="@+id/bottomNavigation"

 android:layout_width="match_parent"

 android:layout_height="wrap_content"

 android:layout_alignParentBottom="true"

 app:bnv_colored_background="true"

 app:bnv_with_text="false"

 app:bnv_shadow="true"

 app:bnv_tablet="false"

 app:bnv_viewpager_slide="true"

 app:bnv_active_color="@color/colorPrimary"

 app:bnv_active_text_size="@dimen/bottom_navigation_text_size_active"

 app:bnv_inactive_text_size="@dimen/bottom_navigation_text_size_inactive"/>

or programmatically

You can activate tablet mode

 bottomNavigationView.activateTabletMode();

 bottomNavigationView.isWithText(true);

 bottomNavigationView.isColoredBackground(false);
  bottomNavigationView.setItemActiveColorWithoutColoredBackground(yourColor);

Change text active or inactive size

  bottomNavigationView.setTextActiveSize(float yoursize);

bottomNavigationView.setTextInactiveSize(float yoursize);

Change tab programmatically

bottomNavigationView.selectTab(int position);

You can just disable BottomNavigationView shadow by calling

 bottomNavigationView.disableShadow();

You can set your custom font for item text. assets/fonts/your_font.ttf

 bottomNavigationView.setFont(Typeface.createFromAsset(getApplicationContext().getAssets(), "fonts/your_font.ttf"));

Contact

Pull requests are more than welcome.

Please fell free to contact me if there is any problem when using the library.

License



Copyright 2016 Arman Chatikyan
 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. 

Resources

An Android library project providing Activity with explanation about views in your app.

The TutorialActivitycan be used as a walk through for the entire screen that is currently visible, Or just for one view on the screen.

To get the intent to start the TutorialActivity you need to use the TutorialIntentBuilder, The builder will help you build the intent to start the activity, You would have to pass a Tutorial object to the intent builder.

pns

Distributed Push Notification Service for GCM and APNS. Built on REST API.

This is a fork of Google's chips library.

Plaxien is a small library we use at EverythingMe, that allows us to create "Explains" - easy to read representations of in-app data and logic.

Basically it can represent hierarchical data composed of "nodes" and "key/value" pairs in a nice collapsible tree view. It looks something like this:

Simple and easy dialog for Android. Instead of using dialog/fragments, normal view will be shown as dialog. It's customizable component and have 3 different content holder.

This is a very simple library for Android that allows you to stick an header to a ListView and easily apply animation to it.

The StikkyHeader supports:

  • ListView
  • RecyclerView
  • ScrollView

Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes