All Questions
Tagged with material-components-android android-theme
69
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 ...
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 ...
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());
...
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 ...
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 ...
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="...
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=&...
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:
...
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" ...
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 ...
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 ...
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">
<!--...
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 ...
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 ...
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....