yasszu / bottom-navigation Goto Github PK
View Code? Open in Web Editor NEWExample of Android BottomNavigationView
Example of Android BottomNavigationView
The conditionals in MainActivity.kt are not firing ever.
if (fragment.isAdded)
and
if (fragment.isDetached)
This results in the fragment always being added, even when it was previously deattached and should be re-attached.
Any idea what is causing this behavior?
I would like to understand how to remove the animations of moving between fragments. The text and icons of the bottom navigation view are enlarged when clicked. Here I would like to disable this magnification. Could you solve it?
I run the method to disable shiftMode and in the logs it shows me this:
D/TADDA: class Zx
E/BottomNavigationHelper: Unable to get shift mode field
java.lang.NoSuchFieldException: No field mShiftingMode in class LZx; (declaration of 'Zx' appears in /data/app/it.kenble.freddy-LA1SlQO9Eo5FCUafCf-YOw==/base.apk)
at java.lang.Class.getDeclaredField(Native Method)
at JG.b(:12)
at it.kenble.freddy.ui.MainActivity.onCreate(:39)
at android.app.Activity.performCreate(Activity.java:7458)
at android.app.Activity.performCreate(Activity.java:7448)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1286)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3409)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3614)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:86)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2199)
at android.os.Handler.dispatchMessage(Handler.java:112)
at android.os.Looper.loop(Looper.java:216)
at android.app.ActivityThread.main(ActivityThread.java:7625)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:524)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:987)
TADDA is a custom name of my log
at it.kenble.freddy.ui.MainActivity.onCreate(:39) --> if (Build.VERSION.SDK_INT >= 27) binding.bottomNavigation.disableShiftMode()
I also added this in the proguard-roles file:
-keepclassmembers class android.support.design.internal.BottomNavigationMenuView {
boolean mShiftingMode;
}
I'm using this as a global theme: Theme.MaterialComponents.Light.NoActionBar, I don't know if it affects anything.
Let me know if it can be fixed. Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.