aurelhubert / ahbottomnavigation

A library to reproduce the behavior of the Bottom Navigation guidelines from Material Design.
3.83k stars 682 forks source link

[Notification size] Size modification of notification #348

Open the-maux opened 6 years ago

the-maux commented 6 years ago

Hello great work 👍 !!

I was wondering if it was possible to modifify the size of the notification ? Maybe if i play with the margin ? But only the left is allowed if i'm not wrong.

Thanks !

faridyagubbayli commented 6 years ago

Hello, unless the library supports better customization of notifications, a workaround could be accessing the actual TextView by,

View itemView = bottomNavigation.getViewAtPosition(tabPosition); AppCompatTextView notificationText = itemView.findViewById(R.id.bottom_navigation_notification);

I know it is not a proper way but it can be used as just a workaround.

Note that the notificationText will be null unless you have called bottomNavigation.setNotification(notificationCount, tabPosition) with non-empty notificationCount

the-maux commented 6 years ago

Ok thank you !! I used it has a workaround