Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

0 votes
0 answers
34 views

The default top app bar color changes after updating material version to 1.11.0

I designed my app to look like this: But after updating the material library version from com.google.android.material:material:1.10.0 to com.google.android.material:material:1.11.0 the top app bar ...
ganjaam's user avatar
  • 1,256
1 vote
1 answer
1k views

Edge to Edge Theme for Background of Android Activity to Hide Status Bar Scrim During Fragment Transitions

I have 1 activity that hosts multiple fragments in a navHostFragment. To switch between them I use androids Navigation Component (i.e. navGraph). Now I want to enable edge-to-edge. I already have it ...
citizen_code's user avatar
2 votes
1 answer
599 views

Chip: The style on this component requires your app theme to be Theme.MaterialComponents (or a descendant)

I want to add a Chip view to ChipGroup in my project but always I get below error My code in Activity for (int i = 0; i < names.size(); i++) { Chip chip = new Chip(getApplicationContext()); ...
abolfazl bazghandi's user avatar
2 votes
0 answers
107 views

How to change Android DatePicker month navigation chevron/arrow color

I am using the DateTimePicker component of the Material Dialog library. I want to change the color of the left arrow "<" and also the text color of the future day number (Marked in red ...
Bipin Vayalu's user avatar
  • 3,125
2 votes
1 answer
357 views

How can I change the TabLyout Text Color in Material3

in Material3 TabLayout Text color is not Changing. TabLayout Background color changes by using surface color but the text color is not changing with ColorOnSurface! also custom TabStyle not working in ...
Abu Nayem's user avatar
  • 111
1 vote
1 answer
648 views

android status bar font color is always white

I have the following theme for light mode in themes.xml: <style name="Theme.MainTheme" parent="Theme.MaterialComponents.DayNight.NoActionBar"> <item name="...
krltos's user avatar
  • 335
5 votes
1 answer
2k views

Material 3 materialThemeOverlay produces bright pink button with no theme

I am migrating from M2 to M3 and my basic materialThemeOverlay no longer works. I follow the code at the bottom of the doc closely, it matched pretty much what I had for M2: styles.xml <style name=&...
Daniel Wilson's user avatar
2 votes
1 answer
1k views

MaterialButton style being overridden, how do I keep it?

I'm trying to use a MaterialButtonToggleGroup inside my BottomSheetDialog. However the style for the button is being overriden by the current theme I'm using for the BottomSheet In a regular fragment: ...
DIRTY DAVE's user avatar
  • 2,641
0 votes
1 answer
39 views

Are there any difference between `Widget.MaterialComponents.LinearProgressIndicator.MyStyleName` and `MyStyleName`?

Are there any difference between Widget.MaterialComponents.LinearProgressIndicator.MyStyleName and MyStyleName? <style name="Widget.MaterialComponents.LinearProgressIndicator.MyStyleName" ...
Taha Sami's user avatar
  • 1,649
1 vote
1 answer
555 views

MaterialComponents CheckBox, how to keep the icon's original colors

I've recently changed my app's theme from Theme.AppCompat to Theme.MaterialComponents, and need to stop my CheckBox views from painting over the icon drawable colors. MaterialComponents views normally ...
PM4's user avatar
  • 664
2 votes
1 answer
2k views

Change Theme Dynamically from User Input in Android

I'm building a material design playground that can switch between the available pre-defined themes that can apply the color, typography and shapes to all the material design components throughout the ...
ciscocode's user avatar
2 votes
0 answers
612 views

Why do I need to add the line "android:theme="@style/Theme.MaterialComponents" in order for my FloatingActionButton to work?

I'm inflating a layout using layout Inflater My theme is already MaterialComponents <style name="AppTheme" parent="Theme.MaterialComponents.Light.NoActionBar"> <!--...
DIRTY DAVE's user avatar
  • 2,641
2 votes
1 answer
1k views

How to change colorPrimary programmatically with a color given from an API?

I need to change the colorPrimary and colorAccent programmatically. The color values are fetched from a web service once we login to the application. These values will be any, because it is setting ...
KIRAN K J's user avatar
  • 712
1 vote
1 answer
2k views

Why is everything purple when I use Theme.MaterialComponents? [closed]

The status bar, app bar icons, and alert dialog's positive and negative buttons all of these went from their default colors to purple after going into styles.xml and doing the following: <style ...
Tom Darious's user avatar
0 votes
2 answers
907 views

How to apply Material Theme to all buttons in application (activity)?

I'm trying to customize my Android theme, but nothing seems to work. Activity: public class MainActivity extends AppCompatActivity { ... } themes.xml <resources xmlns:tools="http://schemas....
Andrei Manolache's user avatar

15 30 50 per page
1
2 3 4 5