Questions tagged [material-components]

Modular and customizable Material Design UI components. For platform-specific questions, add [ios], [web], or [android].

Material Components help developers implement the Material Design guidelines across Android, iOS, and the web. Developed by a core team of Google engineers and UX designers, these components support the reliable development of beautiful and functional apps.

Material Components for the web is the successor to Material Design Lite, and has 3 high-level goals:

  • Production-ready components consumable in an a-la-carte fashion
  • Best-in-class performance and adherence to the Material Design guidelines
  • Seamless integration with other JS frameworks and libraries

Resources :

538 questions
152
votes
20 answers

Round corner for BottomSheetDialogFragment

I have a custom BttomSheetDialogFragment and I want to have round corners in top of Bottom View This is my Custom class that inflates my layout that I want to appear from bottom View mView; @Override public View onCreateView(LayoutInflater…
75
votes
5 answers

Material Components for the Web vs Angular Material 2

Recently, the successor to MDL (Material Design Lite) project was launched as Material Components for the Web. One of its goals is "Seamless integration with other JS frameworks and libraries". There is another project Angular Material2 which…
DeepakV
  • 2,280
  • 1
  • 15
  • 20
64
votes
10 answers

java.lang.IllegalArgumentException: This component requires that you specify a valid android:textAppearance attribute

I have a com.google.android.material.button.MaterialButton component in one of my layout file and I get this error when I am using the latest version of the Material Components library…
47
votes
4 answers

Android material chip component crashing app. Unable to inflate xml

Tried Chip component from both support library com.google.android.support:design:28.0.0-rc01 and material com.google.android.material:material:1.0.0-rc01 StackTrace android.view.InflateException: Binary XML file line #72: Binary XML file …
41
votes
2 answers

What is AppBar vs ToolBar?

All the material-ui examples show Toolbar inside Appbar. Why not just Appbar? What's the difference between the two? https://material.io/design/components/ does not have Toolbar component, only "App bars:…
Melissa
  • 542
  • 1
  • 5
  • 11
36
votes
4 answers

How to center icon in a MaterialButton which has no text?

I'm using the latest version of the com.google.android.material:material library (i.e. 1.1.0-alpha03) and I have a MaterialButton defined with an icon and no text as follows: I was hoping the MaterialButton would be rendered as a square with the…
Adil Hussain
  • 24,783
  • 20
  • 95
  • 134
35
votes
7 answers

ChipGroup single selection

How can I force a ChipGroup to act like a RadioGroup as in having at least one selected item always? Setting setSingleSelection(true) also adds the possibility to have nothing selected if you click twice on a Chip.
34
votes
5 answers

bottomSheetDialogFragment full screen

What I'm trying to achieve is something like Instagram in-app web browser, used when you click an ad: what I did, is I used a WebView bottomSheetDialogFragment, and I override onCreateDialog to get the full screen like this : @Override public…
33
votes
3 answers

What's the difference between the CardView from com.google.android.material and android.support.v7.widget

I'd like to know the difference between both widgets android.support.v7.widget.CardView which is added using Android Studio IDE components palette and com.google.android.material.card.MaterialCardView which is used on Material Design…
32
votes
5 answers

Style SnackBar in theme app

I need help. How can I change the design of the text in snackbar in styles app? The change in the code does not interest me. I found the following code. But it is not working for me. Why is that? My theme is derived from…
32
votes
12 answers

Change font of the floating label EditText and TextInputLayout

Someone tried to change the font of the floating label? I changed the source of EditText but the font of the floating label did not change, I am very grateful to those who help me Code:
30
votes
11 answers

Android Chip Custom Height Or Padding - Chipgroup spacing

Is there a way to change default material Chip vertical padding or height? From the docs I see there surely is a way to set the minimal height, but I would like to make chips "thinner", like in this design:
28
votes
6 answers

How to change android button text color globally in theme

How can I change all my buttons text color? I know I can set the background color like follows :