android material design button bug - android

Like the picture, I set a dark green color, but the light green background appears.
This is the only thing I've set up.
Button's background was set to the colorPrimary of the theme.
So when I changed Button to Image Button, it came out right.
As a result of the test, it seems that the problem is occurring in material design 1.2.1 or higher.
I have to use Theme.MaterialComponents.Light.NoActionBar, so I can't change Theme.

This is a known issue in material design, and found solution adding app:backgroundTint.

Related

How to change the EditText background Tint color in Android?

I am developing an app using Material theme. In my app, I'm having multiple edit texts to get the input from user.
I've divided the screen into two portions:
top portion background color is white background so it showing the default material theme style but
bottom portion I'm using the blue color,
If I'm using the same style in the bottom portion, EditText background tint not visible clearly. So I'm planning to change the background tint color.It supports the lollipop version. I want to show style for below versions also.
How can I do this?
Take a look at this. android.support.v4.graphics.drawable.DrawableCompat#setTint
With this you can set the tint to your EditText.
DrawableCompat

Copy-Paste options in ActionBar appear totally white

Maybe this is not quite an ActionBar problem but the problem is as follows;
I have an EditText and when you long click on the EditText, text selection options appear on ActionBar's position by default. My problem is that, both the texts and background are white, so they cannot be read. Here is the screenshot:
I tried some possible causes of the problem but nothing helped. For example, I tried to change the theme
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
However, any theme with the AppCompat results totally white.
Also I changed the project theme in Android Studio's interface as follows:
However it's still white.
The copy-paste options are there and you can click on them, but how can I make them appear? Another solution on SA suggested manually replacing gray icons. But I believe this is not the usual case in Android and there should be another way. Any ideas?

Android ActionBar on Lollipop not styling correctly

I am designing an app with Material Design, but I am having trouble styling the ActionBar.
First of all, I can not get the ActionBar to render a shadow. I have tried setting the elevation in multiple ways:
In the styles.xml (v21):
<item name="android:elevation">4dp</item>
<item name="elevation">4dp</item>
In the onCreate() method
getActionBar().setElevation(4);
However, none of these result in the ActionBar rendering a shadow. Not sure if this is important, but I am running Android 5.0.1 Lollipop. What am I missing in trying to render a shadow? I don't really want to make a drawable shadow and set it as the window background.
Secondly, my ActionBar buttons are square, and when I click on them, the ripple is cut off in a square, while in other apps I have used the mask for the ripples has been circular, and my app had been using round buttons, but recently it changed and I don't know why. Could I have accidentaly changed something making them square?
Thank you
The issue is that u use ActionBar while the other apps use ToolBar. Read about and change your code, everything should work after that.

android lollipop notification background colour

Is it possible to change the background colour of notifications in android lollipop.
I noticed that some notifications are white, some light grey and some are dark grey.
(source: gottabemobile.com)
(source: sftcdn.net)
You can see the music player notification has a dark grey background. and in the second screenshot some are light grey.
How do I set this colour? And is it possible to completely change the colour e.g. any hex code. Or can you select them from a template such as material dark material light.
Thanks for taking the time to answer
That background is set by the material design itself, it is supposed to be white, for design matters.
Take a look here!
Or you could make a custom layout.

Material Ripple Effect: Dark Theme vs. Light Theme

My view consists of a RecyclerView with CardView rows. The ripple effect when clicking on it, is only working when I use the Theme.Material.Light as AppTheme.
As soon as I switch to the dark version (Theme.Material) its not working anymore.
Any ideas whats the problem here? Thanks
Stupid me. The ripple effect for the dark themes is white, of course. Therefore I was not seeing it on the white CardView.

Categories

Resources