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

All Questions

0 votes
0 answers
276 views

Range Slider Multiple Color Track

I'm using a range slider (com.google.android.material.slider.RangeSlider) with three thumb sliders. As such the bar is broken up into 4 segments. The first with values below any of the thumbs, 2 ...
denver's user avatar
  • 3,025
5 votes
1 answer
7k views

Kotlin issue when trying to cast "attachBadgeDrawable": This declaration is opt-in

I would use the BadgeDrawable in my Android app on a Button, the issue is that when i'm trying to set to the button layout the badgeDrawable via attachBadgeDrawable i get an error on it which says: ...
NiceToMytyuk's user avatar
  • 4,073
3 votes
3 answers
2k views

How can I set a custom error background for TextInputLayout

I want to display a custom error background for my email input field whenever I have an invalid email. So far all I could find was how to set and customise the error text, which also gave it a reddish ...
Oniyide Blessing Olaoluwa's user avatar
1 vote
1 answer
558 views

Androidx problem with 'com.android.support:design:28.0.0

How can I make the last line to work with androidx` implementation 'androidx.appcompat:appcompat:1.2.0' implementation 'com.google.android.material:material:1.3.0' implementation 'com.android....
Isaac Kim's user avatar
3 votes
3 answers
3k views

Android Dark theme inverts colours of vector drawables

I'm using user profile avatars imported as vector drawables from an SVG file. I also extend my theme to the material theme Theme.MaterialComponents.DayNight.NoActionBar. However, when I switch to dark ...
Siddharth Kamaria's user avatar
3 votes
2 answers
4k views

Widget.AppCompat.TextView not found after Migrate to material design

I've just migrated to material design 1.2.1 but i have some issues when building the application. I've replaced all <TextView objects with <androidx.appcompat.widget.AppCompatTextView> and ...
Kostadin Georgiev's user avatar
1 vote
2 answers
1k views

Closed :Android: App keeps crashing when using com.google.android.material below android 9 (sdk 29)

My app keeps crashing when running material.io components below sdk 29. Im using app theme as "Theme.MaterialComponents.Light.NoActionBar" also Build.gradle android { compileSdkVersion ...
Chirag Bargoojar's user avatar
5 votes
1 answer
1k views

Render Problem "Path.op() not supported" in latest material design version [duplicate]

I'm using below with androidx in Android studio 3.5.3: androidx.recyclerview.widget.RecyclerView com.google.android.material.floatingactionbutton.FloatingActionButton My gradle is as below: ...
MilkBottle's user avatar
  • 4,312
1 vote
1 answer
409 views

error while adding a menu bar (missing classes with com.android.support:appcompat-v7:30 )

So, i try to add a menu in my activity, i did everything i read in a book, but i always get this error : The following classes could not be found: - android.support.design.widget.AppBarLayout (Fix ...
Khalil Ktiri's user avatar
12 votes
2 answers
8k views

How to change toolbar back button icon in android material components

I would like to change the default navigate up icon (back button icon) to my custom icon. I not using a drawer, just a simple toolbar and material components Is this possible?
Jama Mohamed's user avatar
  • 3,325
0 votes
1 answer
1k views

How should i convert my AppTheme style to Material component

//This is my current AppTheme of my application. How should I migrate my AppTheme to Material Components?. I have Migrated my code to AndroidX. <style name="AppBaseTheme" parent="@android:style/...
Pranav Kapadne's user avatar
7 votes
2 answers
9k views

strokeColor and strokeWidth not working in androidx.cardview.widget.CardView android

Trying to make some border around cardView (androidx.cardview.widget.CardView) Here's the code: <androidx.cardview.widget.CardView android:id="@+id/cardView" android:layout_width="273dp" ...
some user's user avatar
  • 1,765
4 votes
1 answer
1k views

AppBarLayout with a Toolbar has no shadow/ elevation

I am trying to add a toolbar to my activity using a AppBarLayout but i am unable to get any elevation or shadow on it. I am using the following layout and styles; <!-- activity --> <...
Amando Vledder's user avatar
3 votes
2 answers
5k views

material checkbox style after customize

My customized checkbox (MyCheckbox) has extended from androidx.appcompat.widget.AppCompatCheckBox, but the default styles don't apply to it. <style name="AppTheme" parent="Theme.MaterialComponents....
beigirad's user avatar
  • 5,574
12 votes
2 answers
8k views

When to use MaterialToolbar and androidx Toolbar and the difference between both?

When i switched to AndroidX i found that the Toolbar has moved to androidx.appcompat.widget.Toolbar also there is a new MaterialToolbar introduced as com.google.android.material.appbar.MaterialToolbar ...
Manoj Perumarath's user avatar

15 30 50 per page