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

Questions tagged [material-components-android]

Material Components for Android (MDC-Android) help developers execute Material Design. Developed by a core team of engineers and UX designers at Google, these components enable a reliable development workflow to build beautiful and functional Android apps.

material-components-android
24 votes
6 answers
9k views

Android button background is taking the primary color

I've this issue, I don't know where it come from, I've created this buttons with custom background, but the background color talking the primary color and cannot change it unless change the primary ...
Fath.Saif's user avatar
  • 241
88 votes
18 answers
90k views

Put constant text inside EditText which should be non-editable - Android

I want to have constant text inside editText like: http://<here_user_can_write> User should not be able to delete any chars from "http://", I searched about this and found this: editText....
Shrikant Ballal's user avatar
12 votes
6 answers
10k views

How to set a gradient background in a Material Button from Material Components?

I've been trying to set a gradient background in a Material Button from Material Components for Android, but it's not working. So, how to set a gradient background in a Material Button?
GianMS's user avatar
  • 963
225 votes
29 answers
169k views

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 ...
Russell Ghana's user avatar
187 votes
10 answers
130k views

Toolbar overlapping below status bar

I want to have appcompat v21 toolbar in my activity. But the toolbar I'm implementing is overlapping below status bar. How can I fix it? Here is the activity layout xml: <LinearLayout xmlns:...
emen's user avatar
  • 6,210
165 votes
8 answers
106k views

Material Design not styling alert dialogs

I've added the appCompat material design to my app and it seems that the alert dialogs are not using my primary, primaryDark, or accent colors. Here is my base style: <style name="...
Matthew's user avatar
  • 3,421
48 votes
4 answers
62k views

Android Circular Determinate ProgressBar

I want to create a Circluar Determinate ProgressBar, the kind which shows the Progress in the center of the Bar. Is there any default way to create this, or will i have to create my own custom one.
AndroidDev's user avatar
  • 16.3k
36 votes
6 answers
25k views

Change Chip Widget style programmatically not working - Android

I'm doing a list with Chips. I want this chips can be selected, so, taking a look to https://material.io/develop/android/components/chip/ I see I can have a "Choice Chip". As I need to create and add ...
Shudy's user avatar
  • 7,886
97 votes
8 answers
53k views

MaterialComponents theme alert dialog buttons

Recently I switched from support library to com.google.android.material:material:1.0.0 But now I have a problem, in this pages there's a note https://github.com/material-components/material-...
antanas_sepikas's user avatar
58 votes
5 answers
26k views

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....
Sourin Ghosh's user avatar
219 votes
14 answers
249k views

Adjust icon size of Floating action button (fab)

The new floating action button should be 56dp x 56dp and the icon inside it should be 24dp x 24dp. So the space between icon and button should be 16dp. <ImageButton android:id="@+id/fab_add" ...
vovahost's user avatar
  • 35.6k
13 votes
8 answers
23k views

MaterialDatePicker get selected dates

I'm calling a MaterialDatePicker like this in Android: MaterialDatePicker.Builder<Pair<Long, Long>> builder = MaterialDatePicker.Builder.dateRangePicker(); CalendarConstraints.Builder ...
Erjon's user avatar
  • 930
86 votes
11 answers
167k views

Android Button background color not changing

In this android project im creating a default button style. my styles.xml <!-- Base application theme. --> <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar"> <item ...
Sven van den Boogaart's user avatar
73 votes
16 answers
107k views

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 ...
Abdel's user avatar
  • 1,085
53 votes
8 answers
31k views

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 ...
adriennoir's user avatar
  • 1,259

15 30 50 per page
1
2 3 4 5
13