Giter Club home page Giter Club logo

luseenbottomnavigation's People

Contributors

armcha avatar jonathanapppartner avatar kennyc1012 avatar tinybright avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

luseenbottomnavigation's Issues

want to set item to images but it show blank instead

Hello all,
i have a weird problem with your library which is really great one and ease my work; i would like to know if its possible to put a png with colors and preserve these color on an item of your navigation bar ? if so how to attempt it ;is there a size requirement ?
Thanks

Badge

What about add badge to navigation bottom item?

badge count

it would be great to set a badge number on each tab

Android4.2

it works well on Android 5.0 but failed on Android 4.2(un show)。i don't know why,could anyone give me a hand ,thanks very much!

Bug and Problem in Use this Library.

Hello,
tank you.
i import your lib. and gradle is ready.

but in my layout have problem

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <android.support.v7.widget.Toolbar
        android:id="@+id/toolbar"
        android:layout_width="match_parent"
        android:layout_height="58dp"
        android:background="@android:color/holo_green_dark"
        android:minHeight="?attr/actionBarSize"
        android:titleTextColor="#ffffff">

    </android.support.v7.widget.Toolbar>


    <Button
        android:id="@+id/btnPayment"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="Payment"
        android:layout_alignParentBottom="true"
        android:layout_alignParentLeft="true"
        android:layout_alignParentStart="true"/>


    <com.luseen.luseenbottomnavigation.BottomNavigation.BottomNavigationView
        android:id="@+id/bottomNavigation"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true" />

</LinearLayout>

Error show in Android Studio :

java.lang.IndexOutOfBoundsException: Position must be less or equivalent than items size, items size is -1 current is 0   at com.luseen.luseenbottomnavigation.BottomNavigation.BottomNavigationView.onSizeChanged(BottomNavigationView.java:156)   at android.view.View.sizeChange(View.java:17641)   at android.view.View.setFrame(View.java:17603)   at android.view.View.layout(View.java:17520)   at android.view.ViewGroup.layout(ViewGroup.java:5612)   at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1741)   at android.widget.LinearLayout.layoutHorizontal(LinearLayout.java:1730)   at android.widget.LinearLayout.onLayout(LinearLayout.java:1496)   at android.view.View.layout(View.java:17523)   at android.view.ViewGroup.layout(ViewGroup.java:5612)   at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)   at android.widget.FrameLayout.onLayout(FrameLayout.java:261)   at android.view.View.layout(View.java:17523)   at android.view.ViewGroup.layout(ViewGroup.java:5612)   at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1079)   at android.view.View.layout(View.java:17523)   at android.view.ViewGroup.layout(ViewGroup.java:5612) Copy stack to clipboard   Tip: Try to refresh the layout.  

Change background of selected item

How can I change background of the selected item in order to make it look like this:
screen shot 2017-03-15 at 17 55 45

I tried to do i this way:
bottomNavigation.getItem(index).setColor(ContextCompat.getColor(DashboardActivity.this, R.color.colorPurpleButtonPressed));
inside of the OnBottomNavigationItemClickListener,
but it causes StackOverFlow

Tabs being doubled on orientation change?

Is it possible for you to reproduce this issue on your side? I'm not quite sure if its an issue on my side. I tried to set the bottomNavigationView to null before creating the tabs etc. but I still get this issue.

Using it with FAB

Hi, i am using this bottom navigation at my MainActivity (with ViewPager), which has a FAB, but it stays behind the bottom navigation, and the snackbar event´s goes over the bottom navigation.

What is the best approach to resolve that?

Thanks.

Changing background color

using 'app:bnv_colored_background' changes the background color of the toolbar to white. How can I change that to the color I want? I tried with android:background but it didn't work.

thanks

setImageResourceActive problem

Hi,

When I set the drawable via setImageResourceActive() method, the initial drawable resource not shown for first time opened app. after select /unselect the drawable changing working. did i miss anything? can you help for this.

|Thanks.

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

        BottomNavigationItem homeNavigationItem = new BottomNavigationItem
                ("Feed", ContextCompat.getColor(this, R.color.colorAccent), R.drawable.ic_home_icon);
        BottomNavigationItem recentsNavigationItem = new BottomNavigationItem
                ("Recents", Color.parseColor("#553e52"), R.drawable.ic_wall_clock);
        BottomNavigationItem vaskNavigationItem = new BottomNavigationItem
                ("Vask", Color.parseColor("#7B1FA2"), R.drawable.vask_icon);
        final BottomNavigationItem favoritesNavigationItem = new BottomNavigationItem
                ("Favorites",Color.parseColor("#FF5252"), R.drawable.heart_shape);

  favoritesNavigationItem.setImageResource(R.drawable.heart_shape);
        favoritesNavigationItem.setImageResourceActive(R.drawable.vask_icon);

  BottomNavigationItem profileNavigationItem = new BottomNavigationItem
                ("Profile", Color.parseColor("#FF9800"), R.drawable.ic_user_silhouette);

        bottomNavigationView.addTab(homeNavigationItem);
        bottomNavigationView.addTab(recentsNavigationItem);
        bottomNavigationView.addTab(vaskNavigationItem);
        bottomNavigationView.addTab(favoritesNavigationItem);
        bottomNavigationView.addTab(profileNavigationItem);

item set default active image not see image when first show

onSizeChange()
if (bottomNavigationItems.get(i).getImageResourceActive() != 0) {
if (i == currentItem)
icon.setImageResource(bottomNavigationItems.get(i).getImageResourceActive());
else
bottomNavigationItems.get(i).getImageResource();
}

Set up with view pager keeps causing a Null pointer Exception

AS MENTIONED IN the title i've set up the view pager, the color resources, and the images.
The pager is assigned to an adapter, simply i keep getting a null pointer exception somehow java.lang.RuntimeException: Unable to start activity ComponentInfo{com.mcubetechnologies.landolsi.cherni.onabupourvous/com.mcubetechnologies.landolsi.cherni.onabupourvous.MainActivity}: java.lang.NullPointerException
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2389)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2441)
at android.app.ActivityThread.access$900(ActivityThread.java:151)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1354)
at android.os.Handler.dispatchMessage(Handler.java:110)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:5345)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:824)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:640)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
at com.luseen.luseenbottomnavigation.BottomNavigation.BottomNavigationView.setUpWithViewPager(BottomNavigationView.java:366)
at com.mcubetechnologies.landolsi.cherni.onabupourvous.MainActivity.onCreate(MainActivity.java:57)
at android.app.Activity.performCreate(Activity.java:5343)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1088)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2343)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2441) 
at android.app.ActivityThread.access$900(ActivityThread.java:151) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1354) 
at android.os.Handler.dispatchMessage(Handler.java:110) 
at android.os.Looper.loop(Looper.java:193) 
at android.app.ActivityThread.main(ActivityThread.java:5345) 
at java.lang.reflect.Method.invokeNative(Native Method) 
at java.lang.reflect.Method.invoke(Method.java:515) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:824) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:640) 
at dalvik.system.NativeStart.main(Native Method) `

Shadow of bottom bar covers actual content

It seems that the view you are creating with the gradient as a background it is actually cutting the content. In your examples the shadow looks good because you do not have any content and the background is white. I would expect to see something like the attached image where the shadow it is on top of the content.

screenshot_20160329-100021-2

Set Bottom Item Images sizes

Hello All,
i hope you all good; i have a question
can we set up the size of an item in the bottomnavigationview ?
if yes how can we do so please ?
Thanks

no setViewPager() method found

The library is very awesome, but you mentioned that I can use it with view pager using a method setViewPager(). and this was not found

Select none

Can i select none of items on bottom bar ? or how can i provide multiple click on same item ?

Thanks for thew library and help.

Set Typeface

@armcha
Thank for your great library and great work
Is it possible to add a method which can get or set the Typeface of Bottom Navigation Items?
It would be greater than normal Typeface
Thank you again
I'm waiting for your response

Tab divided into two parts...

According to my need ..... i want to divide bottom tab into two parts 1st contain 3 tab and 2nd also 3 and between them, i want to add Floating action button ..is it possible ?..plzz elaborate ...

How to set the font size

When I use the simplified Chinese, the text font is so big, I want to customize the size of the text, what should I do

How to set selected Tab manually?

Hi,

is it possible to select the tab manually?
(Using 5 tabs which have activities/fragments behind, I need to set the selected tab manually after I switch to an activity.)

Cheers,
Chris

Need Requested Feature

Hi Bro , great work and really like your library , only one request to you is it possible to update library for more than 5 items and if more than 5 then arrow key appear and we can press arrow key or swipe RTL to view other options

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.