All Projects → NAXAM → bottomnavigationviewex-android-binding

NAXAM / bottomnavigationviewex-android-binding

Licence: MIT license
Xamarin.Android Binding Library for Ittianyu BottomNavigationViewEx

Programming Languages

C#
18002 projects
powershell
5483 projects
shell
77523 projects

Projects that are alternatives of or similar to bottomnavigationviewex-android-binding

Android-AltBeacon-Library
Proximity beacon ranging and monitoring library for Xamarin.Android apps
Stars: ✭ 38 (+52%)
Mutual labels:  xamarin, xamarin-android, xamarin-android-binding
Xamarin-Android
PSPDFKit for Android wrapper for the Xamarin platform.
Stars: ✭ 18 (-28%)
Mutual labels:  xamarin, bindings, xamarin-android
Xamarin-iOS
PSPDFKit for iOS wrapper for the Xamarin platform.
Stars: ✭ 14 (-44%)
Mutual labels:  xamarin, bindings
WheelPicker-Samples
WheelPicker samples for the WheelPicker Xamarin Component
Stars: ✭ 18 (-28%)
Mutual labels:  xamarin, xamarin-android
Xamarin.Plugin.ImageEdit
Image Edit Plugin for Xamarin
Stars: ✭ 52 (+108%)
Mutual labels:  xamarin, xamarin-android
Xamarin.BlurView
Dynamic iOS-like blur of underlying Views for Android.
Stars: ✭ 26 (+4%)
Mutual labels:  xamarin-android, xamarin-android-binding
XamarinHOL
Xamarin ハンズオン用のレポジトリ&ドキュメントです。
Stars: ✭ 52 (+108%)
Mutual labels:  xamarin, xamarin-android
UITestSampleApp
A sample app to demonstrate how to create Xamarin UITests using the Page Object architecture, Backdoor Methods and App Links (aka Deep Linking)
Stars: ✭ 38 (+52%)
Mutual labels:  xamarin, xamarin-android
Prototype.Forms.Controls
This sample app contains a random mixture of Xamarin/Xamarin.Forms controls, views, and functionality snippets that I've created.
Stars: ✭ 21 (-16%)
Mutual labels:  xamarin, xamarin-android
vs-material-icons-generator
This plugin will help you to set material design icons to your Xamarin projects In Visual Studio.
Stars: ✭ 50 (+100%)
Mutual labels:  xamarin, xamarin-android
XamarinIoTWorkshop
A workshop that demonstrates how to collect IoT data from a mobile device using a Xamarin app, aggregating the data to the cloud using Azure IoT Hub
Stars: ✭ 13 (-48%)
Mutual labels:  xamarin, xamarin-android
Xamarin.MediaGallery
This plugin is designed to picking and save images and video files from native gallery of Android and iOS devices and capture photos
Stars: ✭ 106 (+324%)
Mutual labels:  xamarin, xamarin-android
Wires
Light binding library for Xamarin
Stars: ✭ 34 (+36%)
Mutual labels:  xamarin, xamarin-android
SKOR.UI
UI Controls for Xamarin.Forms
Stars: ✭ 56 (+124%)
Mutual labels:  xamarin, xamarin-android
ideabag2
Idea Bag 2 provides programmers of all proficiency levels ideas for pet projects to work on when they are looking to increase their proficiency in a particular programming language.
Stars: ✭ 51 (+104%)
Mutual labels:  xamarin, xamarin-android
XamSvg-Samples
Samples for Xamarin Svg enterprise cross platform and full featured Svg image control
Stars: ✭ 25 (+0%)
Mutual labels:  xamarin, xamarin-android
VersionTrackingPlugin
Version Tracking Plugin for Xamarin and Windows
Stars: ✭ 62 (+148%)
Mutual labels:  xamarin, xamarin-android
Xamarin.Components-Architecture
A humble attempt to make Xamarin follows the components architecture
Stars: ✭ 20 (-20%)
Mutual labels:  xamarin, xamarin-android
LaunchMapsPlugin
Launch External Maps Plugin for Xamarin and Windows
Stars: ✭ 49 (+96%)
Mutual labels:  xamarin, xamarin-android
XamUI
Xamarin UI Challenges 🏆
Stars: ✭ 57 (+128%)
Mutual labels:  xamarin, xamarin-android

Xamarin Android Binding Library

Xamarin.Android Binding Library for Ittianyu BottomNavigationViewEx

Install-Package Naxam.Ittianyu.BottomNavExtension

Features

Method Description
enableAnimation Enable or disable click item animation(text scale and icon move animation in no item shifting mode). Default true.
enableItemShiftingMode Enable the shifting mode for each item. It will has a shift animation for item if true. Otherwise the item text always be shown. Default true when item count > 3.
enableShiftingMode Enable the shifting mode for navigation. It will has a shift animation if true. Otherwise all items are the same width. Default true when item count > 3.
getBottomNavigationItemView Get private mButton in mMenuView at position
getBottomNavigationItemViews Get private mButtons in mMenuView
getCurrentItem Get the current checked item position.
getIconAt Get icon at position.
getItemCount Get item count.
getItemHeight Get item height.
getLargeLabelAt Get large label at position. Each item has tow label, one is large, another is small.
getSmallLabelAt Get small label at position. Each item has tow label, one is large, another is small.
getMenuItemPosition Get menu item position in menu. Return position if success, -1 otherwise.
getOnNavigationItemSelectedListener Get OnNavigationItemSelectedListener.
setCurrentItem Set the current checked item.
setIconSize Set all item ImageView size.
setIconSizeAt Set all item ImageView size which at position.
setIconVisibility Change the visibility of icon.
setItemHeight Set menu item height.
setLargeTextSize Set all item large TextView size. Each item has tow label, one is large, another is small. Small one will be shown when item state is normal. Large one will be shown when item checked.
setSmallTextSize Set all item small TextView size. Each item has tow label, one is large, another is small. Small one will be shown when item state is normal. Large one will be shown when item checked.
setTextSize Set all item large and small TextView size.
setTextVisibility Change the visibility of text.
setTypeface set Typeface for all item TextView.
setupWithViewPager This method will link the given ViewPager and this BottomNavigationViewEx together so that changes in one are automatically reflected in the other. This includes scroll state changes and clicks.

Example

Style

With ViewPager

Add ViewBadger

Adding to project

Sdk Version

compileSdkVersion >= 25

Getting started

Adding a custom widget in xml :

<com.ittianyu.bottomnavigationviewex.BottomNavigationViewEx
    android:id="@+id/bnve"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_alignParentBottom="true"
    android:background="@color/colorPrimary"
    app:itemIconTint="@color/selector_item_color"
    app:itemTextColor="@color/selector_item_color"
    app:menu="@menu/menu_navigation_with_view_pager" />

Binding view in Activity:

BottomNavigationViewEx bnve = FindViewById<BottomNavigationViewEx>(Resource.Id.bnve);

Disable all animations

bnve.enableAnimation(false);
bnve.enableShiftingMode(false);
bnve.enableItemShiftingMode(false);

Custom text and icon size

bnve.setIconSize(widthDp, heightDp);
bnve.setTextSize(sp);

Binding with ViewPager

// set adapter
adapter = new VpAdapter(getSupportFragmentManager(), fragments);
bind.vp.setAdapter(adapter);

// binding with ViewPager
bind.bnve.setupWithViewPager(bind.vp);

Other usage in BottomNavigationViewEx

You can see the demo.

Usage in BottomNavigationView

Other usage is the same as official BottomNavigationView. You can click here for detail.

ProGuard

If you are using ProGuard you might need to add the following option:

-keep public class android.support.design.widget.BottomNavigationView { *; }
-keep public class android.support.design.internal.BottomNavigationMenuView { *; }
-keep public class android.support.design.internal.BottomNavigationPresenter { *; }
-keep public class android.support.design.internal.BottomNavigationItemView { *; }

References

The lib is based on BottomNavigationView in Support Library 25 design.

I found it was inflexible when I try in demo. For example, I can't change the current checked item by code. So I write a class extends it to provide some useful method.

You no need to worry about stability. Because I minimise modifying by reflecting.

Thanks

License

MIT License

Copyright (c) 2019 NAXAM

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
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].