Questions tagged [mdc-components]

Questions about Material Design Components (MDC) by Google, including MDC-Web, MDC-Android, MDC-IOS, and MDC-Flutter.

Material Components provide a reliable development environment for apps and websites across Android, iOS, and the web. Components are updated as the Material Design system evolves, ensuring consistent pixel-perfect implementation and adherence to Google’s front-end development standards, such as internationalization and accessibility support.

162 questions
0
votes
1 answer

MDC Menu - select event listener working randomly

I have a MDC Menu component, where I would like to setup a click or select event listener for list items. I have tried with various events like 'click', 'select', 'selectionchange', 'selectstart', but none of them worked. In documentation it says…
Leff
  • 1,968
  • 24
  • 97
  • 201
0
votes
0 answers

App Bar not following Headline 6 text appearance in dark theme (Material Design Components)

Project with MDC doesn't follow the fontFamily I set in Headline 6 in my theme when on dark theme. I used metropolis_500 as my fontFamily in my Headline 6 style. It shows up normally on Light Theme but not on Dark Theme. implementation…
0
votes
1 answer

mdc-select renders on top of everything

I am working on a project were we are using mdc-select for dropdowns and now we have a bug that makes the selectboxes render on top of everything. Which is quite problematic because we need to have a popup render on top of it. I suspected it might…
Maria
  • 81
  • 8
0
votes
1 answer

Using the Material Drawer component in an Angular app

How do I integrate the Material Drawer component in an Angular app? I cannot get it to render properly using the instructions in https://material.io/develop/web/components/drawers/ Can some one provide step-by-step instructions to make mdc-drawer…
TrustyCoder
  • 4,749
  • 10
  • 66
  • 119
0
votes
1 answer

In Android, AutoCompleteTextView is not centered while using Exposed Dropdown Menus in Material Design Component

In newly published Material Design Component, there is no Spinner component. That's why I want to use Exposed Dropdown Menus to implement something similar like Spinner. The Problem I am facing is AutoCompleteTextView is not aligned in center…
0
votes
0 answers

AutoCompleteTextView set width to longest adapter item

I have an AutoCompleteTextView (as part of an Exposed Dropdownmenu). I don't want to set a fixed width to it, instead the width shall be determined by the widest item from the adapter. So I've set the width to wrap_content, but this changes every…
stefan.at.kotlin
  • 15,347
  • 38
  • 147
  • 270
0
votes
2 answers

AutoCompleteTextView: provide values in XML?

Is it possible to provide values to the AutoCompleteTextView in XML / via resources, therefore without setting an adapter in code? I want to use the AutoCompleteTextView as part of an exposed dropdown menu, so all values shall be shown at once and…
stefan.at.kotlin
  • 15,347
  • 38
  • 147
  • 270
0
votes
1 answer

MDC - Text Input can't be initialized

I'm setting up a text input with MDC but when I'm initializing with JS it comes out this error: This is my code: // MDC const mdc = window.mdc; // Auto init mdc.autoInit(); $('.mdc-text-fields').each((index, element) => { const…
0
votes
1 answer

What to download to use MDC Web offline in a PWA?

I want to use MDC Web (https://material-components.github.io/material-components-web-catalog/#/) in a PWA offline. What am I supposed to download? Where is the official documentation for that?
0
votes
1 answer

How to display nested JSON object in the next row of mdc-layout-grid in Ember?

I want to display a nested JSON object in the next row of the grid. I am using Ember and mdc-layout-grid. My JSON data is as follows: data = [{ "amzOrderId": "403-8957866-2673902", "financialEventType": "SHIPMENT", "timestamp":…
Katya047
  • 43
  • 1
  • 8
0
votes
2 answers

Opening MDCMenu from Button

I want to open a MDCMenu with a button from the MDCTopAppBar. The documentation lacks sample code how to do this. So I'm trying to do this via EventListener. Please let me know if there are smoother ways to do so. The EvenListener complains MDCMenu…
MPW
  • 161
  • 1
  • 3
  • 16
0
votes
1 answer

Material Icons doesn't seem to work inside Template (Web Components)

I was trying to use the Material Components for Web in my page(LINK). Able to create a FAB using MDC and you can find them in here [CODE-PEN][2] But when I try to do the same inside the Template and Custom Elements(Web Component), it doesn't seem to…
Perseus
  • 1,546
  • 4
  • 30
  • 55
0
votes
1 answer

The updated material design (mdc - 2018) vs. angular (dart) components

I'm new to Angular and I'm a bit confused whether the implementation of the angular components reflects the recent (2018) material design system changes or they are just updating the old version of the system? the Angular components version is been…
Mina Atef
  • 3
  • 1
  • 3
0
votes
1 answer

MDC Grid Layout Does Not Change according to device

On trying to implement the Grid Layout, when i provide cell span values specific to device such as "mdc-layout-grid__cell--span-4-phone mdc-layout-grid__cell--span-6-desktop". The layout remains the same across desktop as well as mobile device.…
Ruhban Shah
  • 71
  • 1
  • 6
0
votes
1 answer

MDC: How to center a cell?

It is written in document that "The grid is by default center aligned.". However, the following code does not center the cell:
user4550164