asked    May     2018-07-25       android       125 view        1 Answer

[SOLVED] Cannot resolve method 'setShiftingMode(Boolean)' in BottomNavigationView

After upgrading to latest support library '28.0.0-alpha1' I cannot disable shifting mode in my BottomNavigationView i.e. the BottomNavigationItemView.setShiftingMode() method is no longer available.

java.lang.NoSuchFieldException: No field mShiftingMode in class Landroid/support/design/internal/BottomNavigationMenuView; 
    W/System.err:     at java.lang.Class.getDeclaredField(Native Method)
    at com.avocure.avocurehealth.utils.ViewUtils.removeNavigationShiftMode(
    at com.avocure.avocurehealth.ui.main.MainActivity.init(
    at com.avocure.avocurehealth.ui.main.MainActivity.onCreate(
    at android.os.Handler.dispatchMessage(
    at android.os.Looper.loop(
    at java.lang.reflect.Method.invoke(Native Method)

I use this method to disable shifting mode.

It would be very much appreciated if anyone could shed some light on whether something has changed in the latest version or is this a bug or something.

  1 Answer  

        answered    Jay     2018-07-25      

Found the answer. In support library 28.0.0-alpha1 we can now add labels (remove shifting mode) using any of the following methods:


        app:labelVisibilityMode="labeled" />




public static void removeNavigationShiftMode(BottomNavigationView view) {
    BottomNavigationMenuView menuView = (BottomNavigationMenuView) view.getChildAt(0);

Your Answer

 2018-07-25         Lucy

How do i open a sample Android SDK app in Eclipse

I have created a basic program in Eclipse for Android 2.1. then I wanted to look at some of the samples, and import sample projects which are in the SDK directory. I have tried opening a new project and 'create project from existing source', I browse and can select a project, all the details come up and I can click finish, but I receive an error message saying 'could not write file', and if I click on details, it says "access is denied" I have tried copying a project folder into my own workspace but it still does the same thing. Right click in the package explorer window...
 android                     6 answers                     104 view
 2018-07-25         Augus

'required items could not be found' error when installing ADT plugin

Cannot complete the install because one or more required items could not be found. Software being installed: Android Development Tools 12.0.0.v201106281929-138431 ( 12.0.0.v201106281929-138431) Missing requirement: Android Development Tools 12.0.0.v201106281929-138431 ( 12.0.0.v201106281929-138431) requires 'org.eclipse.gef 0.0.0' but it could not be foundSome info:Eclipse SDK Version: 3.6.2jdk-6u26-windows-i586Windows 7Any suggestions on how to solve this 'required items could not be fo...
 android                     2 answers                     4 view
 2018-07-25         Harold

Where can I download an older version of the Android SDK?

I want to download an older version of the Android SDK: 21.0.0, Where can I do this?I currently have the latest version of the android SDK, downloaded from HERE. However I want an older version, can the Full older version of the SDK be downloaded from anywhere?I am trying to get the older version using SDK manager, but It is not working. I.e. it is only giving me build tools etc. Have you tried the links at: -First check this link to find out what revision number you need. Then use one of these links:http://dl-s...
 android                     3 answers                     6 view