How to change shape of bottom-appbar and floating action button - android

How can I change the shape of the android material design bottom app bar and the corresponding floating action button?
I want the floating action button to be insetted into the app bar. This is possible using the material bottom app bar. But I want the floating action button to be a rectangle instead of beeing a circle. Material design shows an example of this on their website but just as an image without explanation how to do this.
EDIT: I want to change shape not just color

Related

I need to make the color of bottom navigation bar same as my bottom sheet dialog in dark mode. Is there a way to do it programatically?

There is a requirement to have bottom sheet dialog and bottom navigation bar as same color with buttons (e.g. back) should not get dim. I tried ways but not working correctly. Is there a way to extract the color from bottom sheet dialog and apply to navigation bar programatically?

Transparent ActionBar: dynamically change color of back button to make it contrast to background

I have an application with trasparent Action Bar. Action Bar has one button - grey back arrow.
Under Action Bar there is big ImageView that shows the picture downloaded from web. And in case of this downloaded image is also grey, it is very hard to see grey arrow on transparent action bar.
Is it some way to pick the color from downloaded image and dynamically change back button color to contrast one?

Action bar icon showing solid gray square in android

This type of square is showing
You need to design a specific icon for the Action Bar, with solid color and transparency. You can create your notifications icons with this. https://romannurik.github.io/AndroidAssetStudio/icons-notification.html#source.space.trim=1&source.space.pad=0&name=ic_stat_example

Material: Navigation bar elevation or shadow

Setting the navigation bar color to something other than black only plays well with material design if you set it to transparent (or the same color as the window background) and the content is not scrollable.
<item name="android:navigationBarColor">#android:color/transparent</item>
If the navigation bar has another color or if the content is scrollable, the ink just gets cut off when reaching the bar like in the picture:
I would like to set an elevation on the navigation bar so that it casts a shadow and it becomes clear that it's another layer. Is this possible?
According to Google I/O Android talks, all shadows are generated by some light source, which provides shadows under elements, not above them. Then, Navigation Bar should have no visible shadow.
Maybe, the only solution of your problem is to use additional drawable to imitate shadow.

add tooltip for android action bar

i have a action bar, for the system default action "button", when i use s-pen hovered on it. it will give a "More options" tooltip and the s-pen icon change to solid circle.
how can i add the same behavior to other button on actionbar?
i tried add the hover action, but i need to implement the popup window to show the tooltip and the s-pen icon do not change from hollow circle to solid circle.
dose there exist some api to implement this feature?
see the picture.

Categories

Resources