android-bottomappbar

How to show/hide BottomAppBar programmatically?

岁酱吖の 提交于 2021-02-07 02:56:54
问题 I try to use an BottomAppBar and I would like to be able to hide or show it programmatically like a setExpanded in an AppBarLayout. My layout is like <androidx.coordinatorlayout.widget.CoordinatorLayout android:id="@+id/coordinator" android:layout_width="match_parent" android:layout_height="match_parent"> <com.google.android.material.appbar.AppBarLayout android:id="@+id/appbar" android:layout_width="match_parent" android:layout_height="wrap_content"> ... </com.google.android.material.appbar

How to show/hide BottomAppBar programmatically?

心不动则不痛 提交于 2021-02-07 02:56:32
问题 I try to use an BottomAppBar and I would like to be able to hide or show it programmatically like a setExpanded in an AppBarLayout. My layout is like <androidx.coordinatorlayout.widget.CoordinatorLayout android:id="@+id/coordinator" android:layout_width="match_parent" android:layout_height="match_parent"> <com.google.android.material.appbar.AppBarLayout android:id="@+id/appbar" android:layout_width="match_parent" android:layout_height="wrap_content"> ... </com.google.android.material.appbar

How to show/hide BottomAppBar programmatically?

非 Y 不嫁゛ 提交于 2021-02-07 02:56:02
问题 I try to use an BottomAppBar and I would like to be able to hide or show it programmatically like a setExpanded in an AppBarLayout. My layout is like <androidx.coordinatorlayout.widget.CoordinatorLayout android:id="@+id/coordinator" android:layout_width="match_parent" android:layout_height="match_parent"> <com.google.android.material.appbar.AppBarLayout android:id="@+id/appbar" android:layout_width="match_parent" android:layout_height="wrap_content"> ... </com.google.android.material.appbar

AndroidX BottomAppBar navigation icon color

被刻印的时光 ゝ 提交于 2021-01-27 04:41:50
问题 I've defined a bottom bar in a layout like that: <com.google.android.material.bottomappbar.BottomAppBar android:id="@+id/bottomBar" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="bottom" app:navigationIcon="@drawable/ic_menu_black_24dp" /> The navigation icon is a generic icon generated from the "new vector drawable" wizard. Is there a way to apply a tint to it? The bottom bar is not the activity action bar. What I've tried so far: applied a

Null NavHostFragment/NavController with FragmentContainerView

匆匆过客 提交于 2020-06-16 20:02:01
问题 Expected Create bottom app bar navigation using Navigation UI's BottomNavigationView and FragmentContainerView similar to the sample app NavigationAdavancedSample . Note, NavigationAndvancedSample app does not appear to use the same implementation as described in the documentation as it has a workaround implementation using the custom extension method setupWithNavController . Observed Null NavHostFragment when creating the BottomNavigationView in the MainActivity.kt with a

Null NavHostFragment/NavController with FragmentContainerView

不羁岁月 提交于 2020-06-16 19:57:09
问题 Expected Create bottom app bar navigation using Navigation UI's BottomNavigationView and FragmentContainerView similar to the sample app NavigationAdavancedSample . Note, NavigationAndvancedSample app does not appear to use the same implementation as described in the documentation as it has a workaround implementation using the custom extension method setupWithNavController . Observed Null NavHostFragment when creating the BottomNavigationView in the MainActivity.kt with a

How to put the android BottomAppBar with rounded corners

别等时光非礼了梦想. 提交于 2020-05-25 23:45:29
问题 I am using the BottomAppBar from google like this: <com.google.android.material.bottomappbar.BottomAppBar android:id="@+id/vNavigationBar" android:layout_width="match_parent" android:layout_height="wrap_content"> The custom bottom bar is flat and I need to add rounded corners on the Bottom bar(image example bellow) What should I do to make this work this way? 回答1: you can try add a shape drawable xml file and add the following code to it <corners android:topLeftRadius="16dp" android

Bottom app bar problem with placing icons

寵の児 提交于 2020-03-01 04:09:02
问题 I have a problem with bottom app bar, because I want the icons to be displayed to me in the first picture Instead I got this: 回答1: You can place a custom layout inside your BottomAppBar . The only thing is that you will need to align items in your custom layout manually. <com.google.android.material.bottomappbar.BottomAppBar xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" style="@style/Widget.MaterialComponents.BottomAppBar"

Bottom app bar problem with placing icons

安稳与你 提交于 2020-03-01 04:06:59
问题 I have a problem with bottom app bar, because I want the icons to be displayed to me in the first picture Instead I got this: 回答1: You can place a custom layout inside your BottomAppBar . The only thing is that you will need to align items in your custom layout manually. <com.google.android.material.bottomappbar.BottomAppBar xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" style="@style/Widget.MaterialComponents.BottomAppBar"

Bottom App Bar slide up/down on navigating with fragments (Navigation Architecture Components)

流过昼夜 提交于 2019-12-11 05:18:51
问题 I was having a look at the Bottom App Bar and there is a nice feature to hide it on scroll app:hideOnScroll="true" . The problem it that I cannot figure it out how to slide it up or down progmatically when the fragments are being navigated to and from . For example, overview of a setup: on MainActivity has the navigation host fragment and it is hosting a MainFragment and a DetailFragment . The MainFragment has a RecyclerView , which on scroll, will hide the Bottom App Bar . On clicking any