Problems creating bottom Navbar Android StudioIs there a way to run Python on Android?How to save an Android Activity state using save instance state?Create ArrayList from arrayClose/hide the Android Soft KeyboardWhy is the Android emulator so slow? How can we speed up the Android emulator?Is there a unique Android device ID?What is 'Context' on Android?Creating a memory leak with JavaProper use cases for Android UserManager.isUserAGoat()?Android Studio: Add jar as library?

How do you say "half the time …, the other half …" in German?

Line Feed in monospace font - Macro

Fantasy Macro Economics: What would Merfolk trade for?

In Endgame, wouldn't Stark have remembered Hulk busting out of the stairwell?

Is there a way to tell what frequency I need a PWM to be?

Necessity of tenure for lifetime academic research

Is there an in-universe explanation given to the senior Imperial Navy Officers as to why Darth Vader serves Emperor Palpatine?

Under GDPR, can I give permission once to allow everyone to store and process my data?

Is "survival" paracord with fire starter strand dangerous

What's the difference between a variable and a memory location?

Did ancient peoples ever hide their treasure behind puzzles?

Why can't I identify major and minor chords?

Create a list of snaking numbers under 50,000

Is it unusual for a math department not to have a mail/web server?

Why is "I let him to sleep" incorrect (or is it)?

Principal payments

Does throwing a non-weapon item take an action?

Do application leftovers have any impact on performance?

Answer with an image of my favorite musician

Why is there not a willingness from the world to step in between Pakistan and India?

Defending Castle from Zombies

How do Barton (Hawkeye/Ronin) and Romanov (Black Widow) end up on the Benatar on Morag in 2014?

How to handle inventory and story of a player leaving

Why haven't the British protested Brexit as ardently like Hong Kongers protest?



Problems creating bottom Navbar Android Studio


Is there a way to run Python on Android?How to save an Android Activity state using save instance state?Create ArrayList from arrayClose/hide the Android Soft KeyboardWhy is the Android emulator so slow? How can we speed up the Android emulator?Is there a unique Android device ID?What is 'Context' on Android?Creating a memory leak with JavaProper use cases for Android UserManager.isUserAGoat()?Android Studio: Add jar as library?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















I've been trying for a few days to create a bottom navbar for my app but for some reason its just not showing up in the design view. Doesn't really help the fact that not alot of tutorials that use AndroidX library



(Excuse me if i'm not using the right words to describe things)



Tried changing the size on the design, tweaking the dependencies and retrying numerous times.



/// build.gradle file


buildscript
repositories
google()
jcenter()


dependencies
classpath 'com.android.tools.build:gradle:3.3.1'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files



allprojects
repositories
google()
jcenter()
maven url "https://jitpack.io"





task clean(type: Delete)
delete rootProject.buildDir



/// Build.gradle(Module:app)


apply plugin: 'com.android.application'

android
compileSdkVersion 28
defaultConfig
applicationId "com.example.runwithmeapp"
minSdkVersion 26
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

buildTypes
release
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'




dependencies
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.0.0-beta01'
implementation 'androidx.constraintlayout:constraintlayout:1.1.2'
implementation 'com.google.android.material:material:1.0.0-rc01'
implementation 'com.google.android.gms:play-services-maps:16.1.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.0-alpha4'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0-alpha4'
implementation 'com.github.parse-community.Parse-SDK-Android:fcm:1.19.0'
implementation 'de.hdodenhof:circleimageview:3.0.0'
implementation 'com.android.support:design:28.0.0'





/// XML for activity


<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/holo_blue_light"
tools:context=".BottomNav">


<com.google.android.material.bottomnavigation.BottomNavigationView
android:layout_width="match_parent"
android:layout_height="78dp"
android:layout_alignParentBottom="true"
android:layout_marginBottom="0dp"

app:menu="@menu/bottom_navigation" />


</RelativeLayout>


/// XML for my menu

<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">

<item
android:id="@+id/nav_home"
android:icon="@drawable/ic_home_black_24dp"
android:title="Home"/>

<item
android:id="@+id/nav_Map"
android:icon="@drawable/ic_map_black_24dp"
android:title="Map"/>

<item
android:id="@+id/nav_profile"
android:icon="@drawable/ic_person_black_24dp"
android:title="Profile"/>


</menu>


Right now what i want to happen is that i can just see the design properly at the bottom of the activity but it just isn't showing up.










share|improve this question
































    0















    I've been trying for a few days to create a bottom navbar for my app but for some reason its just not showing up in the design view. Doesn't really help the fact that not alot of tutorials that use AndroidX library



    (Excuse me if i'm not using the right words to describe things)



    Tried changing the size on the design, tweaking the dependencies and retrying numerous times.



    /// build.gradle file


    buildscript
    repositories
    google()
    jcenter()


    dependencies
    classpath 'com.android.tools.build:gradle:3.3.1'

    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files



    allprojects
    repositories
    google()
    jcenter()
    maven url "https://jitpack.io"





    task clean(type: Delete)
    delete rootProject.buildDir



    /// Build.gradle(Module:app)


    apply plugin: 'com.android.application'

    android
    compileSdkVersion 28
    defaultConfig
    applicationId "com.example.runwithmeapp"
    minSdkVersion 26
    targetSdkVersion 28
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

    buildTypes
    release
    minifyEnabled false
    proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'




    dependencies
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'androidx.appcompat:appcompat:1.0.0-beta01'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.2'
    implementation 'com.google.android.material:material:1.0.0-rc01'
    implementation 'com.google.android.gms:play-services-maps:16.1.0'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test:runner:1.1.0-alpha4'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0-alpha4'
    implementation 'com.github.parse-community.Parse-SDK-Android:fcm:1.19.0'
    implementation 'de.hdodenhof:circleimageview:3.0.0'
    implementation 'com.android.support:design:28.0.0'





    /// XML for activity


    <?xml version="1.0" encoding="utf-8"?>
    <RelativeLayout xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/container"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@android:color/holo_blue_light"
    tools:context=".BottomNav">


    <com.google.android.material.bottomnavigation.BottomNavigationView
    android:layout_width="match_parent"
    android:layout_height="78dp"
    android:layout_alignParentBottom="true"
    android:layout_marginBottom="0dp"

    app:menu="@menu/bottom_navigation" />


    </RelativeLayout>


    /// XML for my menu

    <?xml version="1.0" encoding="utf-8"?>
    <menu xmlns:android="http://schemas.android.com/apk/res/android">

    <item
    android:id="@+id/nav_home"
    android:icon="@drawable/ic_home_black_24dp"
    android:title="Home"/>

    <item
    android:id="@+id/nav_Map"
    android:icon="@drawable/ic_map_black_24dp"
    android:title="Map"/>

    <item
    android:id="@+id/nav_profile"
    android:icon="@drawable/ic_person_black_24dp"
    android:title="Profile"/>


    </menu>


    Right now what i want to happen is that i can just see the design properly at the bottom of the activity but it just isn't showing up.










    share|improve this question




























      0












      0








      0








      I've been trying for a few days to create a bottom navbar for my app but for some reason its just not showing up in the design view. Doesn't really help the fact that not alot of tutorials that use AndroidX library



      (Excuse me if i'm not using the right words to describe things)



      Tried changing the size on the design, tweaking the dependencies and retrying numerous times.



      /// build.gradle file


      buildscript
      repositories
      google()
      jcenter()


      dependencies
      classpath 'com.android.tools.build:gradle:3.3.1'

      // NOTE: Do not place your application dependencies here; they belong
      // in the individual module build.gradle files



      allprojects
      repositories
      google()
      jcenter()
      maven url "https://jitpack.io"





      task clean(type: Delete)
      delete rootProject.buildDir



      /// Build.gradle(Module:app)


      apply plugin: 'com.android.application'

      android
      compileSdkVersion 28
      defaultConfig
      applicationId "com.example.runwithmeapp"
      minSdkVersion 26
      targetSdkVersion 28
      versionCode 1
      versionName "1.0"
      testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

      buildTypes
      release
      minifyEnabled false
      proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'




      dependencies
      implementation fileTree(dir: 'libs', include: ['*.jar'])
      implementation 'androidx.appcompat:appcompat:1.0.0-beta01'
      implementation 'androidx.constraintlayout:constraintlayout:1.1.2'
      implementation 'com.google.android.material:material:1.0.0-rc01'
      implementation 'com.google.android.gms:play-services-maps:16.1.0'
      testImplementation 'junit:junit:4.12'
      androidTestImplementation 'androidx.test:runner:1.1.0-alpha4'
      androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0-alpha4'
      implementation 'com.github.parse-community.Parse-SDK-Android:fcm:1.19.0'
      implementation 'de.hdodenhof:circleimageview:3.0.0'
      implementation 'com.android.support:design:28.0.0'





      /// XML for activity


      <?xml version="1.0" encoding="utf-8"?>
      <RelativeLayout xmlns:app="http://schemas.android.com/apk/res-auto"
      xmlns:tools="http://schemas.android.com/tools"
      xmlns:android="http://schemas.android.com/apk/res/android"
      android:id="@+id/container"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:background="@android:color/holo_blue_light"
      tools:context=".BottomNav">


      <com.google.android.material.bottomnavigation.BottomNavigationView
      android:layout_width="match_parent"
      android:layout_height="78dp"
      android:layout_alignParentBottom="true"
      android:layout_marginBottom="0dp"

      app:menu="@menu/bottom_navigation" />


      </RelativeLayout>


      /// XML for my menu

      <?xml version="1.0" encoding="utf-8"?>
      <menu xmlns:android="http://schemas.android.com/apk/res/android">

      <item
      android:id="@+id/nav_home"
      android:icon="@drawable/ic_home_black_24dp"
      android:title="Home"/>

      <item
      android:id="@+id/nav_Map"
      android:icon="@drawable/ic_map_black_24dp"
      android:title="Map"/>

      <item
      android:id="@+id/nav_profile"
      android:icon="@drawable/ic_person_black_24dp"
      android:title="Profile"/>


      </menu>


      Right now what i want to happen is that i can just see the design properly at the bottom of the activity but it just isn't showing up.










      share|improve this question
















      I've been trying for a few days to create a bottom navbar for my app but for some reason its just not showing up in the design view. Doesn't really help the fact that not alot of tutorials that use AndroidX library



      (Excuse me if i'm not using the right words to describe things)



      Tried changing the size on the design, tweaking the dependencies and retrying numerous times.



      /// build.gradle file


      buildscript
      repositories
      google()
      jcenter()


      dependencies
      classpath 'com.android.tools.build:gradle:3.3.1'

      // NOTE: Do not place your application dependencies here; they belong
      // in the individual module build.gradle files



      allprojects
      repositories
      google()
      jcenter()
      maven url "https://jitpack.io"





      task clean(type: Delete)
      delete rootProject.buildDir



      /// Build.gradle(Module:app)


      apply plugin: 'com.android.application'

      android
      compileSdkVersion 28
      defaultConfig
      applicationId "com.example.runwithmeapp"
      minSdkVersion 26
      targetSdkVersion 28
      versionCode 1
      versionName "1.0"
      testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

      buildTypes
      release
      minifyEnabled false
      proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'




      dependencies
      implementation fileTree(dir: 'libs', include: ['*.jar'])
      implementation 'androidx.appcompat:appcompat:1.0.0-beta01'
      implementation 'androidx.constraintlayout:constraintlayout:1.1.2'
      implementation 'com.google.android.material:material:1.0.0-rc01'
      implementation 'com.google.android.gms:play-services-maps:16.1.0'
      testImplementation 'junit:junit:4.12'
      androidTestImplementation 'androidx.test:runner:1.1.0-alpha4'
      androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0-alpha4'
      implementation 'com.github.parse-community.Parse-SDK-Android:fcm:1.19.0'
      implementation 'de.hdodenhof:circleimageview:3.0.0'
      implementation 'com.android.support:design:28.0.0'





      /// XML for activity


      <?xml version="1.0" encoding="utf-8"?>
      <RelativeLayout xmlns:app="http://schemas.android.com/apk/res-auto"
      xmlns:tools="http://schemas.android.com/tools"
      xmlns:android="http://schemas.android.com/apk/res/android"
      android:id="@+id/container"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:background="@android:color/holo_blue_light"
      tools:context=".BottomNav">


      <com.google.android.material.bottomnavigation.BottomNavigationView
      android:layout_width="match_parent"
      android:layout_height="78dp"
      android:layout_alignParentBottom="true"
      android:layout_marginBottom="0dp"

      app:menu="@menu/bottom_navigation" />


      </RelativeLayout>


      /// XML for my menu

      <?xml version="1.0" encoding="utf-8"?>
      <menu xmlns:android="http://schemas.android.com/apk/res/android">

      <item
      android:id="@+id/nav_home"
      android:icon="@drawable/ic_home_black_24dp"
      android:title="Home"/>

      <item
      android:id="@+id/nav_Map"
      android:icon="@drawable/ic_map_black_24dp"
      android:title="Map"/>

      <item
      android:id="@+id/nav_profile"
      android:icon="@drawable/ic_person_black_24dp"
      android:title="Profile"/>


      </menu>


      Right now what i want to happen is that i can just see the design properly at the bottom of the activity but it just isn't showing up.







      java android navigationbar androidx






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 28 at 9:23









      Zoe

      15.6k12 gold badges65 silver badges96 bronze badges




      15.6k12 gold badges65 silver badges96 bronze badges










      asked Mar 27 at 22:02









      Chris AngbaluChris Angbalu

      1




      1

























          2 Answers
          2






          active

          oldest

          votes


















          0















          I've created something very similar. In the Design, for me it doesn't show up at the bottom. Instead, it's showing up at the top (Action Bar). But when I compile and build the project and run it on the emulator or device, it's showing up as a bottom navigation bar.



          In my MainActivity.java, I'm loading it with this piece of code:



          //show bottom navigation bar
          BottomNavigationView navigation = (BottomNavigationView) findViewById(R.id.navigation);
          BottomNavigationViewHelper.disableShiftMode(navigation);
          navigation.setOnNavigationItemSelectedListener(mOnNavigationItemSelectedListener);





          share|improve this answer


































            0















            Try not specifying a fixed height instead use wrap_content in BottomNavigationView. Also Relativelayout is deprecated use Constraintlayout instead.



             <androidx.constraintlayout.widget.ConstraintLayout
            android:id="@+id/main_content"
            android:layout_width="match_parent"
            android:layout_height="match_parent">



            <com.google.android.material.bottomnavigation.BottomNavigationView
            android:id="@+id/bottomNavigationView"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            app:itemBackground="@color/item_background"
            app:itemIconTint="@color/item_tint"
            app:itemTextColor="@color/item_text_color"
            app:labelVisibilityMode="labeled"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:menu="@menu/menu_bottom_nav" />

            </androidx.constraintlayout.widget.ConstraintLayout>





            share|improve this answer



























              Your Answer






              StackExchange.ifUsing("editor", function ()
              StackExchange.using("externalEditor", function ()
              StackExchange.using("snippets", function ()
              StackExchange.snippets.init();
              );
              );
              , "code-snippets");

              StackExchange.ready(function()
              var channelOptions =
              tags: "".split(" "),
              id: "1"
              ;
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function()
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled)
              StackExchange.using("snippets", function()
              createEditor();
              );

              else
              createEditor();

              );

              function createEditor()
              StackExchange.prepareEditor(
              heartbeatType: 'answer',
              autoActivateHeartbeat: false,
              convertImagesToLinks: true,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: 10,
              bindNavPrevention: true,
              postfix: "",
              imageUploader:
              brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
              contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
              allowUrls: true
              ,
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              );



              );













              draft saved

              draft discarded


















              StackExchange.ready(
              function ()
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55387153%2fproblems-creating-bottom-navbar-android-studio%23new-answer', 'question_page');

              );

              Post as a guest















              Required, but never shown

























              2 Answers
              2






              active

              oldest

              votes








              2 Answers
              2






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              0















              I've created something very similar. In the Design, for me it doesn't show up at the bottom. Instead, it's showing up at the top (Action Bar). But when I compile and build the project and run it on the emulator or device, it's showing up as a bottom navigation bar.



              In my MainActivity.java, I'm loading it with this piece of code:



              //show bottom navigation bar
              BottomNavigationView navigation = (BottomNavigationView) findViewById(R.id.navigation);
              BottomNavigationViewHelper.disableShiftMode(navigation);
              navigation.setOnNavigationItemSelectedListener(mOnNavigationItemSelectedListener);





              share|improve this answer































                0















                I've created something very similar. In the Design, for me it doesn't show up at the bottom. Instead, it's showing up at the top (Action Bar). But when I compile and build the project and run it on the emulator or device, it's showing up as a bottom navigation bar.



                In my MainActivity.java, I'm loading it with this piece of code:



                //show bottom navigation bar
                BottomNavigationView navigation = (BottomNavigationView) findViewById(R.id.navigation);
                BottomNavigationViewHelper.disableShiftMode(navigation);
                navigation.setOnNavigationItemSelectedListener(mOnNavigationItemSelectedListener);





                share|improve this answer





























                  0














                  0










                  0









                  I've created something very similar. In the Design, for me it doesn't show up at the bottom. Instead, it's showing up at the top (Action Bar). But when I compile and build the project and run it on the emulator or device, it's showing up as a bottom navigation bar.



                  In my MainActivity.java, I'm loading it with this piece of code:



                  //show bottom navigation bar
                  BottomNavigationView navigation = (BottomNavigationView) findViewById(R.id.navigation);
                  BottomNavigationViewHelper.disableShiftMode(navigation);
                  navigation.setOnNavigationItemSelectedListener(mOnNavigationItemSelectedListener);





                  share|improve this answer















                  I've created something very similar. In the Design, for me it doesn't show up at the bottom. Instead, it's showing up at the top (Action Bar). But when I compile and build the project and run it on the emulator or device, it's showing up as a bottom navigation bar.



                  In my MainActivity.java, I'm loading it with this piece of code:



                  //show bottom navigation bar
                  BottomNavigationView navigation = (BottomNavigationView) findViewById(R.id.navigation);
                  BottomNavigationViewHelper.disableShiftMode(navigation);
                  navigation.setOnNavigationItemSelectedListener(mOnNavigationItemSelectedListener);






                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Mar 28 at 5:37









                  Kishan Viramgama

                  5411 gold badge5 silver badges14 bronze badges




                  5411 gold badge5 silver badges14 bronze badges










                  answered Mar 27 at 22:29









                  KennyKenny

                  12 bronze badges




                  12 bronze badges


























                      0















                      Try not specifying a fixed height instead use wrap_content in BottomNavigationView. Also Relativelayout is deprecated use Constraintlayout instead.



                       <androidx.constraintlayout.widget.ConstraintLayout
                      android:id="@+id/main_content"
                      android:layout_width="match_parent"
                      android:layout_height="match_parent">



                      <com.google.android.material.bottomnavigation.BottomNavigationView
                      android:id="@+id/bottomNavigationView"
                      android:layout_width="match_parent"
                      android:layout_height="wrap_content"
                      app:itemBackground="@color/item_background"
                      app:itemIconTint="@color/item_tint"
                      app:itemTextColor="@color/item_text_color"
                      app:labelVisibilityMode="labeled"
                      app:layout_constraintBottom_toBottomOf="parent"
                      app:layout_constraintEnd_toEndOf="parent"
                      app:layout_constraintStart_toStartOf="parent"
                      app:menu="@menu/menu_bottom_nav" />

                      </androidx.constraintlayout.widget.ConstraintLayout>





                      share|improve this answer





























                        0















                        Try not specifying a fixed height instead use wrap_content in BottomNavigationView. Also Relativelayout is deprecated use Constraintlayout instead.



                         <androidx.constraintlayout.widget.ConstraintLayout
                        android:id="@+id/main_content"
                        android:layout_width="match_parent"
                        android:layout_height="match_parent">



                        <com.google.android.material.bottomnavigation.BottomNavigationView
                        android:id="@+id/bottomNavigationView"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        app:itemBackground="@color/item_background"
                        app:itemIconTint="@color/item_tint"
                        app:itemTextColor="@color/item_text_color"
                        app:labelVisibilityMode="labeled"
                        app:layout_constraintBottom_toBottomOf="parent"
                        app:layout_constraintEnd_toEndOf="parent"
                        app:layout_constraintStart_toStartOf="parent"
                        app:menu="@menu/menu_bottom_nav" />

                        </androidx.constraintlayout.widget.ConstraintLayout>





                        share|improve this answer



























                          0














                          0










                          0









                          Try not specifying a fixed height instead use wrap_content in BottomNavigationView. Also Relativelayout is deprecated use Constraintlayout instead.



                           <androidx.constraintlayout.widget.ConstraintLayout
                          android:id="@+id/main_content"
                          android:layout_width="match_parent"
                          android:layout_height="match_parent">



                          <com.google.android.material.bottomnavigation.BottomNavigationView
                          android:id="@+id/bottomNavigationView"
                          android:layout_width="match_parent"
                          android:layout_height="wrap_content"
                          app:itemBackground="@color/item_background"
                          app:itemIconTint="@color/item_tint"
                          app:itemTextColor="@color/item_text_color"
                          app:labelVisibilityMode="labeled"
                          app:layout_constraintBottom_toBottomOf="parent"
                          app:layout_constraintEnd_toEndOf="parent"
                          app:layout_constraintStart_toStartOf="parent"
                          app:menu="@menu/menu_bottom_nav" />

                          </androidx.constraintlayout.widget.ConstraintLayout>





                          share|improve this answer













                          Try not specifying a fixed height instead use wrap_content in BottomNavigationView. Also Relativelayout is deprecated use Constraintlayout instead.



                           <androidx.constraintlayout.widget.ConstraintLayout
                          android:id="@+id/main_content"
                          android:layout_width="match_parent"
                          android:layout_height="match_parent">



                          <com.google.android.material.bottomnavigation.BottomNavigationView
                          android:id="@+id/bottomNavigationView"
                          android:layout_width="match_parent"
                          android:layout_height="wrap_content"
                          app:itemBackground="@color/item_background"
                          app:itemIconTint="@color/item_tint"
                          app:itemTextColor="@color/item_text_color"
                          app:labelVisibilityMode="labeled"
                          app:layout_constraintBottom_toBottomOf="parent"
                          app:layout_constraintEnd_toEndOf="parent"
                          app:layout_constraintStart_toStartOf="parent"
                          app:menu="@menu/menu_bottom_nav" />

                          </androidx.constraintlayout.widget.ConstraintLayout>






                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Mar 28 at 9:37









                          Oshan MadusankaOshan Madusanka

                          1015 bronze badges




                          1015 bronze badges






























                              draft saved

                              draft discarded
















































                              Thanks for contributing an answer to Stack Overflow!


                              • Please be sure to answer the question. Provide details and share your research!

                              But avoid


                              • Asking for help, clarification, or responding to other answers.

                              • Making statements based on opinion; back them up with references or personal experience.

                              To learn more, see our tips on writing great answers.




                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function ()
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55387153%2fproblems-creating-bottom-navbar-android-studio%23new-answer', 'question_page');

                              );

                              Post as a guest















                              Required, but never shown





















































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown

































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown







                              Popular posts from this blog

                              SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

                              용인 삼성생명 블루밍스 목차 통계 역대 감독 선수단 응원단 경기장 같이 보기 외부 링크 둘러보기 메뉴samsungblueminx.comeh선수 명단용인 삼성생명 블루밍스용인 삼성생명 블루밍스ehsamsungblueminx.comeheheheh

                              155 수학 과학 기타 둘러보기 메뉴eh추가해eh문서를 완성해