repository
stringclasses
156 values
issue title
stringlengths
1
1.01k
labels
stringclasses
8 values
body
stringlengths
1
270k
materialcomponentsmaterialcomponentsandroid
materialdivider default color pink
Bug
description full description of issue here if I set the a materialdivideritemdecoration to a recyclerview the default color be shrine pink 900 as note here why be this pink and not grey expect behavior screenshot and or description of expect behavior grey as per material doc source code the code snippet which be cause this issue val recyclerview rootview findviewbyid r i d recycler view recyclerview adapter mlistadapter recyclerview layoutmanager linearlayoutmanag context rootview context let val divideritemdecoration materialdivideritemdecoration it materialdivideritemdecoration vertical divideritemdecoration dividerthickness 40 divideritemdecoration islastitemdecorate false recyclerview additemdecoration divideritemdecoration android api version android api version here android 12 material library version material android library version you be use here e g 1 1 0 alpha07 implementation androidx recyclerview recyclerview 1 2 1 implementation com google android material material 1 6 1 device device on which the bug be encounter here pixel 3a to help we triage fast please check to make sure you be use the late version of the library we also happily accept pull request
materialcomponentsmaterialcomponentsandroid
bug dynamiccolor isdynamiccoloravailable isn t reliable as it say it s support on device that it s not
Bug
description full description of issue here I request to be able to check whether the current device have dynamic color be generate from the wallpaper or live wallpaper such as here and here or not I be tell that dynamiccolor isdynamiccoloravailable can be use for that so I make a sample app that just print to the log if it s available or not expect behavior screenshot and or description of expect behavior for these device it say it s support but I know for a fact that it s not because set a live wallpaper that send the color or set a simple all green red yellow wallpaper win t affect the os and win t affect other app such as gmail for example for this device android version it say that it s support yet it s not check the code to understand the extra info samsung galaxy a32 with android 12 model sm a325f brand samsung display sp1a 210812 016 a325fxxu2bvd6 device a32 board a32 hardware mt6769 t manufacturer samsung i d sp1a 210812 016 product a32xx release 12 sdk int 31 incremental a325fxxu2bvd6 codename rel architecture aarch64 media performance class 0 in fact it have no option in the wallpapr and style to apply the color base on the wallpaper screenshot zip source code the code snippet which be cause this issue class mainactivity appcompatactivity override fun oncreate savedinstancestate bundle super oncreate savedinstancestate setcontentview r layout activity main val issupporte dynamiccolor isdynamiccoloravailable log d applog issupporte issupporte val arch getarchitecture val performanceclass getperformanceclassvalue val deviceinfo model build model brand build brand display build display device build device board build board hardware build hardware manufacturer build manufacturer i d build i d product build product release build version release sdk int build version sdk int incremental build version incremental codename build version codename architecture arch medium performance class performanceclass log d applog deviceinfo deviceinfo companion object fun getarchitecture kotlin runcatche system getproperty os arch getornull fun getperformanceclassvalue int return try if build version sdk int build version code s build version medium performance class else 1 catch e throwable e printstacktrace 1 sample app check log and or ui my application zip android api version android api version here already write above api 31 material library version material android library version you be use here e g 1 1 0 alpha07 implementation com google android material material 1 7 0 alpha02 device device on which the bug be encounter here already mention galaxy a32
materialcomponentsmaterialcomponentsandroid
materialdivideritemdecoration the decorator in the last item with islastitemdecorate false be blink in a dropdown view show and hide the decorator very fast
Bug
l321 I use this divider in the last item with a dropdown when the itemview be click then show a textview from go to visible state and it be work ok the divider be not show but when the view collapse the textview from visible to go then the childcount be increase one time and decrease very quick showing and hide the divider very fast maybe use the itemcount from adapter and not the childcount could fix the problem I try this approach use a custom itemdecorator override the ondrawover and it be work but I do not know if be the good solution update the blink appear when be call the method notifyitemchanged pos item
materialcomponentsmaterialcomponentsandroid
tablayout icon be not center in inline tab without label
Bug
description icon be not center in inline tab if there be no label inside pay attention to the indicator position relative to the icon material library version 1 7 0 alpha02
materialcomponentsmaterialcomponentsandroid
textinputlayout materialautocompletetextview disabled but icon still show dropdown
Bug
description when I disable component with android enable false dropdown icon be still active expect behavior click on dropdown icon don t open drop down menu source code bind vcountrytextview setadapter generalsupportfragment countryadapter requirecontext it country for proper work of pseudo material spinner exposeddropdown autocompletetextview class countryadapter context context val item list arrayadapter context r layout list item country dropdown item without nothingfilter autocomplete fill text to autocompletetextview and after next click on button nothing happen because adapter contain no item private val nothingfilter object filter override fun performfiltere constraint charsequence filterresult filterresult override fun publishresult constraint charsequence result filterresult nothing override fun getfilter nothingfilter suppresslint viewholder override fun getview position int convertview view parent viewgroup view convertview tag as listitemcountrydropdownbinding ifnullthen listitemcountrydropdownbinde inflate layoutinflater from context parent false apply root tag this apply item item position root android api version any android android 12 material library version 1 6 1 device any pixel 3a
materialcomponentsmaterialcomponentsandroid
cardlistdemofragment override nothing update from androidx core 1 6 0 to 1 8 0
Bug
description I copy the code from this example l93 in this repo and translate it to kotlin below when I update androidx core core ktx 1 6 0 to 1 8 0 the line override fun performaccessibilityaction give I an error override nothing I didn t change the code otherwise grant this may be an issue with androidx android studio gradle plugin etc but I be just copy the code from this repo so I d assume it should work and if there be a fix publish that I would find it here expect behavior code should compile but doesn t source code recyclerview setaccessibilitydelegatecompat object recyclerviewaccessibilitydelegate recyclerview override fun getitemdelegate accessibilitydelegatecompat return object itemdelegate this override fun performaccessibilityaction host view action int args bundle boolean val fromposition int recyclerview getchildlayoutposition host if action r i d move card down action swapcard fromposition fromposition 1 adapter return true else if action r i d move card up action swapcard fromposition fromposition 1 adapter return true return super performaccessibilityaction host action args override fun oninitializeaccessibilitynodeinfo host view info accessibilitynodeinfocompat super oninitializeaccessibilitynodeinfo host info val position int recyclerview getchildlayoutposition host if position 0 info addaction accessibilitynodeinfocompat accessibilityactioncompat r i d move card up action host resource getstre r string cat card action move up if position adapter currentlist size 1 info addaction accessibilitynodeinfocompat accessibilityactioncompat r i d move card down action host resource getstre r string cat card action move down itemtouchhelper attachtorecyclerview recyclerview minimal sample app repro may do this later possibly some licensing issue android api version 32 material library version 1 7 0 alpha02 device n a compile error
materialcomponentsmaterialcomponentsandroid
bottomnavigationview icon generate a weird backgroundcolor
Bug
description I recently migrate from md2 to md3 and my bottomnavigationview have be encounter issue when I try to set my font on it photo of the problem in dark mode screenshot 10 in light mode screenshot 11 source code my style declaration bottom nav tint xml bottomnavigationview usage minsdk 23 targetsdk 32 android api version andorid 8 oreo material library version com google android material material 1 6 1 device google pixel but mainly my samsung j7 2016
materialcomponentsmaterialcomponentsandroid
bug bottomappbar
Bug
screenshot 20220614 210526 pt not work
materialcomponentsmaterialcomponentsandroid
textinputlayout autocompletetextview spinner replacement do not handle outside popup click correctly as expect
Bug
description if you check out the behaviour of the old spinner class you can see that the spinner consume the touch outside of the popup and simply close the popup this be not the case with the material replacement by textinputlayout autocompletetextview in this case if you click outside the open popup window the view underneath the touch get the click and the autocompletetextview close its popup expect behavior if the popup of the autocompletetextview be open I would expect that touch outside the popup would simple close the popup currently if you try to close the popup and accidently click a button in the background a list item in the background or anything clickable the popup be close and the clickable item in the background get the click event this be unexpected I would expect the popup to consume the outside click as well source code minimal sample app repro android api version android api version here material library version 1 6 1 late release but have be like this in previous version as well device
materialcomponentsmaterialcomponentsandroid
list different text style when use m3 compare to m2
Bug
description my app be use a list with two line wherease the xml definition initially follow the one define in material design m2 in order to use the new m3 text property I ve exchange attr textappearancesubtitle1 by attr textappearancetitlemedium and attr textappearancebody2 by attr textappearancebodymedium as show in the mapping table for textappearance however the text style be not exactly the same as the one in gmail I m use that app as reference as it have be migrate to material design m3 expect behavior in below screenshot b on the left of the red vertical line you can see the original list from below xml my app and on the right I ve copy paste some text from the gmail app screenshot a as reference as you can see the text style be different in my app the text on the first line seem to be narrow and less bold while the text on the second line seem to be wide unfortunately I didn t find a list component with m3 design guideline or screenshot on the m3 website but shouldn t the above approach in my app show the same result as in the gmail app if it have really be migrate to m3 a snippet from the gmail app list screenshot 20220613 221834 b snippet from the list in my app screenshot 20220613 225458 source code android textcolor color list item tint be idential to m2 mtrl list item tint xml android api version api version 33 material library version 1 7 0 alpha02 device pixel 5 emulator
materialcomponentsmaterialcomponentsandroid
material 1 6 1 endicontint ignore
Bug
after update com google android material material 1 5 0 to com google android material material 1 6 1 usage of endicontint specifically in a style apply to a textinput but likely for other input as well be now summarily ignore set endicontint to any color no long have any effect instead the end icon appear to automatically tint itself to match the color of the text and to completely disregard endicontint anyone else experience any know workaround
materialcomponentsmaterialcomponentsandroid
material theme contrast of status bar background icon when use m3 dynamic color
Bug
description my app use m3 dynamic color plus a light and dark theme when I m use the light theme there be not enough contrast between status bar background and status bar icon reason in accordance with a sample app screenshot on the m3 website I m use colorsurface for the status bar background however the status bar icon appear in white color therefore I ve set android windowlightstatusbar to true in the light theme and to false in the dark theme see code below that work fine as you can see from below screenshot but that behavior be now hard code and as I m use dynamic color I m not sure if that s a sustainable solution what happen e g if colorsurface suddenly contain a significantly dark color when use the light theme then the contrast would probably be too low do you have some guidance good practice concern the handling of the status bar background icon contrast in m3 when use dynamic color be there an automate solution plan to ensure enough contrast between status bar background and status bar icon expect behavior contrast between status bar background and status bar icon be automatically ensure when use m3 with dynamic color before set android windowlightstatusbar to true screenshot 20220610 093521 after set android windowlightstatusbar to true screenshot 20220610 094641 source code light theme dark theme android api version api 32 33 material library version 1 7 0 alpha02 device pixel 5 emulator
materialcomponentsmaterialcomponentsandroid
materialdatepicker soft input not show when picker be show with input mode text
Bug
description when I try to show materialdatepicker with input mode text its not show the soft input keyboard but if I switch between text and calendar mode it show soft input it work for some android device that I test android 6 android 7 expect behavior soft input should be show when materialdatepicker open with input mode text source code l87 inputmethodmanager log the follow w inputmethodmanager ignore showsoftinput as view com google android material textfield textinputedittext 5e38b94 vfe cl f 0 0 770 153 aid 1073741824 be not serve if you can add a delay to post its work minimal sample app repro android api version 30 31 material library version 1 6 0 1 6 1 device samsung galaxy a71 android 11 30 pixel 4xl android 12 31 samsung galaxy m31 android 12 31 samsung galaxy s20 android 12 31
materialcomponentsmaterialcomponentsandroid
linearprogressindicator visual issue
Bug
there be a small issue when you use the linear progress indicator with a max value odd like 3 5 7 etc here be the code to reproduce but same code with max 4 do not have the issue
materialcomponentsmaterialcomponentsandroid
snackbar isanchorviewlayoutlistenerenable cause infinite layout loop
Bug
description set isanchorviewlayoutlistenerenable and trigger layout cause the global layout listener to update margin and request layout trigger itself in an infinite loop expect behavior there s no infinite requestlayout s happen when not need source code snackbar isanchorviewlayoutlistenerenable true minimal sample app repro please consider attach a minimal sample app that reproduce the issue this will help narrow down the condition require for reproduce the issue and it will speed up the bug fix process you may attach a zip file of the sample app or link to a github repo that contain the sample app here s the video show infinite layout loop this be only the case when isanchorviewlayoutlistenerenable be set to true android api version 28 material library version 1 4 0 device emulator to help we triage fast please check to make sure you be use the late version of the library we also happily accept pull request
materialcomponentsmaterialcomponentsandroid
materialswitch coloroutline theme both outline and thumb
Bug
I can see that the new materialswitch be use coloroutline for both outline and thumb color at least when not enable I try set to null but in that case I can not theme thumb color be it currently possible or plan to not have outline but still theme thumb
materialcomponentsmaterialcomponentsandroid
materialdatepicker shapeappearancesmallcomponent or shapeappearancemediumcomponent no long work in material 3 1 7 0
Bug
description materialdatepicker shape appearance be no long work in 1 7 0 alpha 02 already check this commit but still no idea where to set shape in small and medium component source code style appcalendar android api version sdk 21 and above material library version 1 7 0 alpha02
materialcomponentsmaterialcomponentsandroid
navigationview item state not work when there be less than 6 menu item
Bug
description the ripple animation isn t show when try to select an item when one be already select this happen if there be less than 6 menu item define in xml add another item to the menu xml fix this issue expect behavior the non select item should highlight when touch if an item be already select how to reproduce 1 create a menu xml with 5 item and set it as your menu in navigationview 2 add an navigationview setnavigationitemselectedlistener 3 run the app and select an item ripple and state work perfectly fine here 4 long press a different item the touch state doesn t show 5 repeat with 6 menu item and the touch state work perfectly source code non working menu working menu set the listener bind navigation setnavigationitemselectedlistener bind navigation setcheckeditem it true android api version android 12 and 11 material library version 1 7 0 alpha02
materialcomponentsmaterialcomponentsandroid
bottomsheetdialog break after last commit for edge to edge
Bug
description edge to edge be break with last commit image I ve check drawedgetoedge be properly set to true and windowcompat setdecorfitssystemwindow window drawedgetoedge be properly call with false but this trigger the state show above the call should have make the window edgetoedge and the statusbar should have be take in account via padding in the rest of the code revert that commit fix the issue image expect behavior the container should be edge to edge it be not source code bug introduce by minimal sample app repro android api version android 12l androidx core 1 8 0 material library version snapshot device p6 pro last patch ping drchen to help we triage fast please check to make sure you be use the late version of the library we also happily accept pull request
materialcomponentsmaterialcomponentsandroid
preferencefragmentcompat dialog be not show in material design m3 style
Bug
description dialog in preferencefragmentcompat be not show in material design m3 style instead for example wrong color and dialog outline be use as show below the issue be especially visible when use the dynamiccolor feature screenshot 20220602 190913 expect behavior I expect that preferencefragmentcompat show dialog in material design m3 style I e about as show below I ve try to rebuild the expect m3 design by use a themeoverlay but didn t manage e g to get the correct backgrounc color screenshot 20220602 191920 source code here be some code snippet preferencefragmentcompat public class settingsfragment extend preferencefragmentcompat implement sharedpreference onsharedpreferencechangelistener private context mcontext override public void oncreatepreference bundle savedinstancestate string rootkey load the preference from an xml resource setpreferencesfromresource r xml setting rootkey theme xml
materialcomponentsmaterialcomponentsandroid
aapt error resource android color system neutral1 xxx not find
Bug
description recently I upgrade material from 1 4 0 up to 1 5 0 and also change the compilesdkversion from 30 to 31 but still can not build the project I check local android sdk 31 have instal and also all the miss color can be find in it can I get any help expect behavior build success and can run my project material library version com google android material material 1 5 0 I try 1 6 1 and get the same error gradle version 6 5 sdkversion minsdkversion 21 targetsdkversion 31 compilesdkversion 31 buildtoolsversion 31 0 0
materialcomponentsmaterialcomponentsandroid
slider label don t disappear when slider with label visible behavior be set to view go
Bug
description when a slider have label visible or android labelbehavior visible set the label do not disappear when the visibility of the slider itself be set to view go expect behavior the label should disappear along with the slider it s possible to make this happen in a hacky way by call baseslider ensurelabelsremove with reflection screenshot of initial slider screenshot 20220529 162716 after set visibility to view go screenshot 20220529 162724 after set visibility to view go and call ensurelabelsremove with reflection screenshot 20220529 163308 source code xml kotlin val slider slider findviewbyid r i d slider slider isvisible false minimal sample app repro android api version report as 32 in ro build version sdk but this be on android 13 beta 2 1 material library version test on both 1 6 0 and 1 7 0 alpha02 device google pixel 6 pro
materialcomponentsmaterialcomponentsandroid
materialswitch crash with empty text
Bug
description crash with empty text expect behavior no crash source code xml minimal sample app repro can start with this and then update material component android and add materialswitch android api version android 12 material library version 1 7 0 alpha02 device pixel 5a to help we triage fast please check to make sure you be use the late version of the library we also happily accept pull request e androidruntime fatal exception main process be mygod vpnhotspot pid 4534 java lang nullpointerexception attempt to invoke interface method int java lang charsequence length on a null object reference at android text staticlayout staticlayout java 455 at androidx appcompat widget switchcompat makelayout switchcompat java 982 at androidx appcompat widget switchcompat onmeasure switchcompat java 905 at com google android material materialswitch materialswitch onmeasure materialswitch java 123 at android view view measure view java 25833 at android view viewgroup measurechildwithmargin viewgroup java 6980 at android widget linearlayout measurechildbeforelayout linearlayout java 1552 at android widget linearlayout measurehorizontal linearlayout java 1204 at android widget linearlayout onmeasure linearlayout java 723 at android view view measure view java 25833 at android view viewgroup measurechildwithmargin viewgroup java 6980 at android widget linearlayout measurechildbeforelayout linearlayout java 1552 at android widget linearlayout measurevertical linearlayout java 842 at android widget linearlayout onmeasure linearlayout java 721 at android view view measure view java 25833 at androidx recyclerview widget recyclerview layoutmanager measurechildwithmargin recyclerview java 9384 at androidx recyclerview widget linearlayoutmanag layoutchunk linearlayoutmanager java 1653 at androidx recyclerview widget linearlayoutmanager fill linearlayoutmanager java 1587 at androidx recyclerview widget linearlayoutmanag onlayoutchildren linearlayoutmanag java 665 at androidx recyclerview widget recyclerview dispatchlayoutstep2 recyclerview java 4134 at androidx recyclerview widget recyclerview dispatchlayout recyclerview java 3851 at androidx recyclerview widget recyclerview onlayout recyclerview java 4404 at android view view layout view java 23203 at android view viewgroup layout viewgroup java 6412 at android widget framelayout layoutchildren framelayout java 332 at android widget framelayout onlayout framelayout java 270 at android view view layout view java 23203 at android view viewgroup layout viewgroup java 6412 at androidx coordinatorlayout widget coordinatorlayout layoutchild coordinatorlayout java 1213 at androidx coordinatorlayout widget coordinatorlayout onlayoutchild coordinatorlayout java 899 at androidx coordinatorlayout widget coordinatorlayout onlayout coordinatorlayout java 919 at android view view layout view java 23203 at android view viewgroup layout viewgroup java 6412 at android widget linearlayout setchildframe linearlayout java 1829 at android widget linearlayout layoutvertical linearlayout java 1673 at android widget linearlayout onlayout linearlayout java 1582 at android view view layout view java 23203 at android view viewgroup layout viewgroup java 6412 at android widget framelayout layoutchildren framelayout java 332 at android widget framelayout onlayout framelayout java 270 at android view view layout view java 23203 at android view viewgroup layout viewgroup java 6412 at android widget linearlayout setchildframe linearlayout java 1829 at android widget linearlayout layoutvertical linearlayout java 1673 at android widget linearlayout onlayout linearlayout java 1582 at android view view layout view java 23203 at android view viewgroup layout viewgroup java 6412 at android widget framelayout layoutchildren framelayout java 332 at android widget framelayout onlayout framelayout java 270 at android view view layout view java 23203 at android view viewgroup layout viewgroup java 6412 at android widget linearlayout setchildframe linearlayout java 1829 at android widget linearlayout layoutvertical linearlayout java 1673 at android widget linearlayout onlayout linearlayout java 1582 at android view view layout view java 23203 at android view viewgroup layout viewgroup java 6412 at android widget framelayout layoutchildren framelayout java 332 at android widget framelayout onlayout framelayout java 270 at com android internal policy decorview onlayout decorview java 797 at android view view layout view java 23203 at android view viewgroup layout viewgroup java 6412 at android view viewrootimpl performlayout viewrootimpl java 3749 at android view viewrootimpl performtraversal viewrootimpl java 3205 at android view viewrootimpl dotraversal viewrootimpl java 2179 at android view viewrootimpl traversalrunnable run viewrootimpl java 8787 at android view choreographer callbackrecord run choreographer java 1037 at android view choreographer docallback choreographer java 845 at android view choreographer doframe choreographer java 780 at android view choreographer framedisplayeventreceiver run choreographer java 1022 at android os handler handlecallback handler java 938 at android os handler dispatchmessage handler java 99 at android os looper looponce looper java 201 at android os looper loop looper java 288 at android app activitythread main activitythread java 7870 at java lang reflect method invoke native method at com android internal os runtimeinit methodandargscaller run runtimeinit java 548 at com android internal os zygoteinit main zygoteinit java 1003
materialcomponentsmaterialcomponentsandroid
component name short description of issue
Invalid
description full description of issue here expect behavior screenshot and or description of expect behavior source code the code snippet which be cause this issue minimal sample app repro please consider attach a minimal sample app that reproduce the issue this will help narrow down the condition require for reproduce the issue and it will speed up the bug fix process you may attach a zip file of the sample app or link to a github repo that contain the sample app android api version android api version here material library version material android library version you be use here e g 1 1 0 alpha07 device device on which the bug be encounter here to help we triage fast please check to make sure you be use the late version of the library we also happily accept pull request
materialcomponentsmaterialcomponentsandroid
build error when try to build app with 1 7 0 alpha02
Bug
hi team I m not much familiar with the tag but just by try to bump the lib to 1 7 0 alpha02 I m get the follow error resource and asset merger can t determine type for tag attr colorsurface I spend some time build it from the source and see this be newly add but I m not sure how to solve be it a missing step that be not part of the doc sorry for not be able to provide more detail appreciate if you can take a look thank
materialcomponentsmaterialcomponentsandroid
style new materialswitch component
Bug
I m play with the new materialswitch component introduce in 1 7 0 alpha02 out of the box my switch look like this smartselect 20220526 101120 meteogram dev pro which doesn t look much like the guideline particularly for the select state how can we style this via xml the implementation guide say mdc android not available what be that suppose to mean can this only be implement properly via jetpack compose which be not possible if we re use a java codebase
materialcomponentsmaterialcomponentsandroid
textinputedittext hint color and cursor color do not update when the parent textinputlayout go to error state
Bug
description as show in the image below the hint color and cursor color do not update to the error color when the parent textinputlayout be in the error state instead the cursor color be still set to colorprimary the blue and the hint color be still set to coloronsurface the light gray expect behavior when in an error state the hint color and cursor color should update to be the same as the boxbordercolor as show in the interactive demo from the material text field doc source code xml and then at some point in the fragment bind emailinputlayout error empty field android api version 31 material library version 1 6 0 device google pixel 6
materialcomponentsmaterialcomponentsandroid
catalog card selection doesn t work in cardselectionmodeactivity
Bug
material library version 1 7 0 alpha03 device pixel 4a 5 g the problem be also present when interact use talkback
materialcomponentsmaterialcomponentsandroid
badgeutil java app crash fatal exception illegalargumentexception badgedrawable can not be null
Bug
description app crash as it encounter a fatal exception in the createparcelablebadgestate function badgeutil java witness crash recently with the below stack trace and the number of crash seem to increase over time haven t be able to reproduce this issue fatal exception java lang illegalargumentexception badgedrawable can not be null at com google android material badge badgeutil createparcelablebadgestate badgeutil java 223 at com google android material navigation navigationbarpresenter onsaveinstancestate navigationbarpresenter java 119 at androidx appcompat view menu menubuilder dispatchsaveinstancestate menubuilder java 332 at androidx appcompat view menu menubuilder savepresenterstate menubuilder java 365 at com google android material navigation navigationbarview onsaveinstancestate navigationbarview java 738 at android view view dispatchsaveinstancestate view java 20984 at android view viewgroup dispatchsaveinstancestate viewgroup java 3975 at android view viewgroup dispatchsaveinstancestate viewgroup java 3981 at android view viewgroup dispatchsaveinstancestate viewgroup java 3981 at android view viewgroup dispatchsaveinstancestate viewgroup java 3981 at android view viewgroup dispatchsaveinstancestate viewgroup java 3981 at android view view savehierarchystate view java 20967 at com android internal policy phonewindow savehierarchystate phonewindow java 2165 at android app activity onsaveinstancestate activity java 2276 at androidx core app componentactivity onsaveinstancestate componentactivity java 93 at androidx activity componentactivity onsaveinstancestate componentactivity java 335 at com fetchreward fetchreward activity main mainactivity onsaveinstancestate mainactivity kt 990 at android app activity performsaveinstancestate activity java 2200 at android app instrumentation callactivityonsaveinstancestate instrumentation java 1520 at android app activitythread callactivityonsaveinstancestate activitythread java 5830 at android app activitythread callactivityonstop activitythread java 5229 at android app activitythread performstopactivityinner activitythread java 5195 at android app activitythread handlestopactivity activitythread java 5260 at android app servertransaction stopactivityitem execute stopactivityitem java 43 at android app servertransaction activitytransactionitem execute activitytransactionitem java 45 at android app servertransaction transactionexecutor executelifecyclestate transactionexecutor java 176 at android app servertransaction transactionexecutor execute transactionexecutor java 97 at android app activitythread h handlemessage activitythread java 2253 at android os handler dispatchmessage handler java 106 at android os looper looponce looper java 201 at android os looper loop looper java 288 at android app activitythread main activitythread java 7870 at java lang reflect method invoke method java at com android internal os runtimeinit methodandargscaller run runtimeinit java 548 at com android internal os zygoteinit main zygoteinit java 1003 the crash be entirely random and can not be reproduce at will material library version 1 4 0 com google android material material 1 4 0 also use along side with compose material library android api version android api version 29 all occur crash occur on api level 29 and above very less datum on crash with api level below 29 device however the crash be not contain to the device list below pixel 6 android 12 motorola one 5 g android 11 samsung s21 android 12
materialcomponentsmaterialcomponentsandroid
materialdatepicker month name language be not correct
Bug
description I have set the locale to english language with country india but in the materialdatepicker dialog only the month name be come in different language expect behavior the month name should by in the correct language as with other component in the dialog like cancel ok select date etc source code kt val picker materialdatepicker builder datepicker build picker show activity supportfragmentmanager tag minimal sample app repro please consider attach a minimal sample app that reproduce the issue this will help narrow down the condition require for reproduce the issue and it will speed up the bug fix process you may attach a zip file of the sample app or link to a github repo that contain the sample app android api version api 32 material library version com google android material material 1 4 0 device pixel xl to help we triage fast please check to make sure you be use the late version of the library we also happily accept pull request
materialcomponentsmaterialcomponentsandroid
appbarlayout scroll range bug occur while child s visibility be go
Bug
xml bug occur here l684 fix code should take child s visibility into account when calculate total scroll range hack without change lib s code replace setvisibility with update layoutparam height of child and call requestlayout also switch its vertical margin
materialcomponentsmaterialcomponentsandroid
materialtoolbar npe on tab switch with logo change
Bug
description I want to display the app logo in the materialtoolbar only on the start tab to achieve this I write a destinationchangedlistener for the navcontroller and use the setlogo method to set the logo null on specify tab with 1 5 every work like a charm with 1 6 I will receive an npe source code navcontroller addondestinationchangedlistener argument val showlogo argument getboolean showlogo false false if showlogo supportactionbar setlogo r drawable ic logo else supportactionbar setlogo null error message 2022 05 17 10 16 25 150 10665 10665 de rnd news qa e androidruntime fatal exception main process pid 10665 java lang nullpointerexception attempt to invoke virtual method boolean java lang object equal java lang object on a null object reference at com google android material internal toolbarutil getimageview toolbarutil java 98 at com google android material internal toolbarutil getlogoimageview toolbarutil java 88 at com google android material appbar materialtoolbar updatelogoimageview materialtoolbar java 208 at com google android material appbar materialtoolbar onlayout materialtoolbar java 135 at android view view layout view java 23144 at android view viewgroup layout viewgroup java 6412 at android widget linearlayout setchildframe linearlayout java 1829 at android widget linearlayout layoutvertical linearlayout java 1673 at android widget linearlayout onlayout linearlayout java 1582 material library version 1 6
materialcomponentsmaterialcomponentsandroid
collapsingtoolbarlayout transition issue
Bug
description collapsingtoolbarlayout collapse transition be not work properly in material 3 test on multiple device notice how the toolbar color go solid immediately instead of have some fade effect like the first example expect behavior expect ezgif com optimize actual source code activity theme style android api version sdk 21 and above material library version 1 7 0 alpha01
materialcomponentsmaterialcomponentsandroid
material3 circularprogressindicator not work in mi11x pro
Bug
the progress indicator be not show in mi 11x pro but it be work on other device the app do not show a progress indicator the app do not show any error or crash issue happen only mi 11 x pro source code the code snippet which be cause this issue implementation com google android material material 1 7 0 alpha01 device mi 11 xpro os android 11 we also happily accept pull request
materialcomponentsmaterialcomponentsandroid
shapeableimageview corner color bug with materialcontainertransform
Bug
description when use shapeableimageview together with materialcontainertransform sharedelementreturntransition result in black shapeableimageview corner color expect behavior shapeableimageview transition corner color should not be impact source code bind shapeableimageview shapeappearancemodel bind shapeableimageview shapeappearancemodel tobuilder setallcornersize resource getdimensionpixeloffset r dimen corner radius tofloat build sharedelemententertransition materialcontainertransform also it drawingviewid r i d nav host fragment content main it duration 2000 sharedelementreturntransition materialcontainertransform also it drawingviewid r i d nav host fragment content main it duration 2000 bind cardview setonclicklistener val extras fragmentnavigatorextra bind cardview to test transition findnavcontroller navigate r i d action firstfragment to secondfragment null null extra record minimal sample app repro android api version 32 material library version 1 7 0 alpha01 1 5 0 1 6 0 device pixel 6 pro oneplus 7 t pro pixel 4 api 31 emulator
materialcomponentsmaterialcomponentsandroid
materialbutton app icongravity textend not work properly with multiline text
Bug
description when create a materialbutton that have an icon and be android layout width wrap content and have app icongravity textend and have a multiline text inlude seem to place the icon incorrectly when compare to materialbutton with single line text expect behavior expect that with same length text mean long line within the button icon be align between button with single line and multiline text source code in layout style android api version api level 31 material library version material 1 6 0 device pixel 5 android 12 to help we triage fast please check to make sure you be use the late version of the library we also happily accept pull request
materialcomponentsmaterialcomponentsandroid
topappbar toolbar become transparent for some reason
Bug
how to reproduce open bottomappbarmaindemofragment scroll down the page open menu from bottom app bar go to recent app and back pay attention to the toolbar it become transparent and the video material library version 1 6 0 device pixel 4a 5 g android 12
materialcomponentsmaterialcomponentsandroid
appbarlayout appbarlayout not account for left and right inset when android fitssystemwindow true
Bug
description when use translucent mode the property android fitssystemwindow true can be use to fix the alignment in normal portrait mode when turn the device and look at it it landscape mode it turn out that the padding that get successfully apply to the top of the toolbar didn t get apply correctly to the side as see in this screenshot screenshot as you can see the control be hide behind the navigation bar which be really not suppose to happen the same be true for the other side when turn the device 180 screenshot 2 I try find a workaround by use viewcompat setonapplywindowinsetslistener but I couldn t get it work presumably because I m try to adjust the wrong value in any case the default behaviour should handle this correctly expect behavior any actual content of the toolbar should be inside the usable screen space not behind the navigation bar source code my xml basically boil down to this xml android api version 31 probably other too didn t check material library version 1 6 0
materialcomponentsmaterialcomponentsandroid
bottomnavigationview overlap menu name and icon
Bug
description when I update material version to 1 5 0 bottomnavigationview in my project find menu and icon be overlap each other screenshot attach below real behavior whatsapp image 2022 05 09 at 3 36 10 pm expect behavior whatsapp image 2022 05 09 at 3 44 42 pm source code layout xml bottom icon color selector xml navigation xml style widget bottomnavigationview android api version 32 material library version 1 5 0 device report on redmi note 10 pro max and samsung note 9 ps by swithe back material version to 1 4 0 fix the bug
materialcomponentsmaterialcomponentsandroid
modalbottomsheetlayout scrim get dismiss upon swipe
Bug
description bottom sheet scrim get dismiss upon swipe even when confirmstatechange return false and this make the content behind the bottom sheet tappable expect behavior scrim get dismiss when bottom sheet be dismiss source code val bottomsheetstate modalbottomsheetstate remembermodalbottomsheetstate initialvalue hide skiphalfexpande true confirmstatechange false minimal sample app repro please consider attach a minimal sample app that reproduce the issue this will help narrow down the condition require for reproduce the issue and it will speed up the bug fix process you may attach a zip file of the sample app or link to a github repo that contain the sample app android api version android api 30 material library version 1 2 0 alpha05
materialcomponentsmaterialcomponentsandroid
chipgroup getcheckedchipid do not seem to update
Bug
I don t have time to create a sample app to show the bug but chipgroup getcheckedchipid do not seem to return up to date list of check chip my use case be do search as user tap and check uncheck filter I use to rely on getcheckedchipid to filter search result just notice that it do not return up to date list of check item can not say which version break it chipgroup child filter it as chip ischecke false map it i d work fine version I be use be 1 6 0
materialcomponentsmaterialcomponentsandroid
materialdatepicker the keyboard doesn t close when switch to calendar mode
Bug
material library version 1 6 0
materialcomponentsmaterialcomponentsandroid
materialtimepicker text doesn t actually center within the chip
Bug
description for the time picker the number doesn t actually center within the chip rather I think it just happen so that the default font appear to be center try different attribute to customize the style didn t work default displaylarge in material3 image vs different font that doesn t have same line height set as the material font image expect behavior number center with in the chip since the attribute in the style suggest so android api version android 12 material library version 1 6 0 rc01 device pixel 4 xl emulator
materialcomponentsmaterialcomponentsandroid
catalog context menu doesn t match the theme
Bug
material library version 1 8 0 device pixel 4a 5 g api 33
materialcomponentsmaterialcomponentsandroid
materialtoolbar can not clear the navigation icon tint
Bug
I can use materialtoolbar setnavigationicontint colorint int navigationicontint to set the tint of the navigation icon but it seem that there be no way to clear it after look through the source code I think it will resolve the issue that simply change the type of the parameter navigationicontint from int to integer
materialcomponentsmaterialcomponentsandroid
dynamiccolor device support check exclude samsung device not use oneui
Bug
description the devicesupportcondition base behaviour of dynamiccolor isdynamiccoloravailable introduce in exclude samsung device support sdk version s but do not have the oneui build property available this impact popular third party rom such as lineageo base on aosp 12 1 which otherwise support dynamic colour expect behavior device not run oneui be not exclude here be a contrast of two application which support dynamic colour and use the library in the same way the top be tachiyomi v0 13 4 l74 build with material library v1 6 0 alpha1 which do not have the offending commit and the bottom be tachiyomij2k v1 5 0 l105 build with material library v1 5 0 which do note that the bottom application do not offer the dynamic theme when use on a google device use the same rom the option be available source code material library version affect v1 5 0 v1 6 0 alpha2 v1 7 0 alpha1 and all later version device samsung galaxy tab s5e
materialcomponentsmaterialcomponentsandroid
android minifyenable true textinputlayout runtime crash
Bug
description hello when I set minifyenable to true the program give an error during execution could you help I find the cause of the error gradle version 7 4 2 gradle plugin version 7 1 3 source code minifyenable true android api version 31 material library version 1 5 0 error java lang verifyerror reject class com univera component univeratextinputlayout that attempt to sub type erroneous class com google android material textfield textinputlayout declaration of com univera component univeratextinputlayout appear in data app l4f8br8fwe8 gwkovvxiiw com univera android 3jashccz7uwysedlbkvf5w base apk classes3 dex at java lang reflect constructor newinstance0 native method at java lang reflect constructor newinstance constructor java 343 my proguard prof panorama mobile class many of they load via class loader libraryjar lib bixolon printer v2 1 2p02 jar libraryjar lib datacollection jar libraryjar lib libcommon v1 0 9p01 jar libraryjar lib libcommon v1 1 1 jar libraryjar lib mpandroidchartlibrary 2 1 0 jar libraryjar lib patchservice jar libraryjar lib platform sdk v2 3 602 jar keep class com univera keep class android widget keepattribute signature keepattribute annotation keepattribute enclosingmethod keepattribute innerclasse dontwarn java util concurrent dontwarn com google errorprone annotation moshi configuration dontwarn okio dontwarn javax annotation nullable dontwarn javax annotation parametersarenonnullbydefault http ok moshi dontwarn com squareup okhttp google keep class com google dontwarn com google google play service specific rule proguard keep class com google android gms internal dontwarn com google android gms internal keep public class com google android gms common internal safeparcel safeparcelable public static final null keepname com google android gms common annotation keepname class keepclassmembername class com google android gms common annotation keepname keep class property keepname class implement android os parcelable public static final creator firebase keep class com google firebase quickstart database java viewholder keepclassmember class com google firebase quickstart database java model keepclassmember class com google firebase quickstart database kotlin model ze core lib bos gecildi evernote configuration dontwarn com evernote android job gcm dontwarn com evernote android job gcmavailablehelper dontwarn com evernote android job work dontwarn com evernote android job workmanageravailablehelper keep public class com evernote android job v21 platformjobservice keep public class com evernote android job v14 platformalarmservice keep public class com evernote android job v14 platformalarmreceiver keep public class com evernote android job jobbootreceiver keep public class com evernote android job jobrescheduleservice keep public class com evernote android job gcm platformgcmservice retrofit 2 keep class com google gson keep public class com google gson public private protect keep class com google inject keep class org apache http keep class org apache james mime4j keep class javax inject keep class javax xml stream keep class retrofit keep class com google appengine dontwarn rx dontwarn javax xml stream dontwarn com google appengine dontwarn java nio file dontwarn org codehaus dontwarn retrofit2 dontwarn org codehaus mojo keep class retrofit2 keepattribute exception keepattribute runtimevisibleannotation keepattribute runtimeinvisibleannotation keepattribute runtimevisibleparameterannotation keepattribute runtimeinvisibleparameterannotation keepattribute enclosingmethod keepclasseswithmember class retrofit2 http keepclasseswithmember interface retrofit2 platform call class forname on type which do not exist on android to determine platform dontnote retrofit2 platform platform use when run on java 8 vms will not be use at runtime dontwarn retrofit2 platform java8 retain declare check exception for use by a proxy instance keepattribute exception optimizationpasse 5 allowaccessmodification dontusemixedcaseclassname dontskipnonpubliclibraryclasse dontskipnonpubliclibraryclassmember dontpreverify verbose your package path where your gson model be store keep class com jutt example1 model retrofit okhttp gson dontwarn com squareup okhttp dontwarn rx dontwarn retrofit keep class retrofit keepclasseswithmember class retrofit http dontwarn java nio file dontwarn org codehaus mojo animal sniffer ignorejrerequirement okhttp3 keepattribute signature keepattribute annotation keep class okhttp3 keep interface okhttp3 dontwarn okhttp3 rxjava promise keep class com darylteo rx dontwarn com darylteo rx rxjava 0 21 keep class rx scheduler scheduler public static keep class rx scheduler immediatescheduler public keep class rx schedulers testscheduler public keep class rx scheduler scheduler public static test retrolambda specific rule as per official recommendation proguard dontwarn java lang invoke
materialcomponentsmaterialcomponentsandroid
materialbuttontogglegroup orientation change break color of button border
Bug
how to reproduce material library version 1 7 0 alpha01
materialcomponentsmaterialcomponentsandroid
circularprogressindicator the circular indicator be incorrectly align inside the chip
Bug
this can be observe in progressindicatorstandalonedemofragment material library version 1 6 0 rc01
materialcomponentsmaterialcomponentsandroid
materialdatepicker break ripple
Bug
this be how ripple look in datepicker on my device circle in red click to open picture in large size this be how it look on the video open video don t forget to expand to fullscreen material library version 1 6 0 rc01 device pixel 4a 5 g android api version android 12 build sp2a 220405 003
materialcomponentsmaterialcomponentsandroid
materialbuttontogglegroup materialbutton backgroundtint not work correctrly api 21 22
Bug
description backgroundtint not apply on initial state and in some strange situation during switch between button on android api 21 22 expect behavior backgroundtint should be apply normally without any glitch btw text color with selector apply as expect screenshot with initial state video with material catalog from release 1 5 branch source code the code snippet which be cause this issue minimal sample app repro android api version api 21 22 material library version material android library version you be use here e g 1 5 0 1 6 0 rc01 1 7 0 aplpa01 device doesn t matter
materialcomponentsmaterialcomponentsandroid
snackbar each show call add an extra bottom indent
Bug
how to reproduce create a snackbar object call show on this object wait for the snackbar to disappear call show on this object again notice that the snackbar appear high than the previous time here s how it can be reproduce in datepickermaindemofragment material library version 1 6 0 rc01
materialcomponentsmaterialcomponentsandroid
slider widget bug
Bug
after the slider component slide there will be a bug and the display bar will not disappear
materialcomponentsmaterialcomponentsandroid
component name short description of issue
Bug
description full description of issue here expect behavior screenshot and or description of expect behavior source code the code snippet which be cause this issue minimal sample app repro please consider attach a minimal sample app that reproduce the issue this will help narrow down the condition require for reproduce the issue and it will speed up the bug fix process you may attach a zip file of the sample app or link to a github repo that contain the sample app android api version android api version here material library version material android library version you be use here e g 1 1 0 alpha07 device device on which the bug be encounter here to help we triage fast please check to make sure you be use the late version of the library we also happily accept pull request
materialcomponentsmaterialcomponentsandroid
snackbar material 3 theme overlay
Bug
description I be follow the material 2 doc theme snackbar for snackbar however it do not apply with material 3 how can we style snackbar in material 3 because currently none of the specify value color get apply source code usage style appsnackbar android api version 21 material library version 1 7 0 alpha01 device samsung j1
materialcomponentsmaterialcomponentsandroid
circularprogressindicator setbound doesn t work for circularprogressindicator
Bug
code java textview textview1 view findviewbyid r i d text view 1 textview1 settext bitmapdrawable textview textview2 view findviewbyid r i d text view 2 textview2 settext chipdrawable textview textview3 view findviewbyid r i d text view 3 textview3 settext indeterminatedrawable drawable drawable1 contextcompat getdrawable getcontext android r drawable ic delete drawable1 setbound 200 0 250 50 textviewcompat setcompounddrawablesrelative textview1 drawable1 null null null chipdrawable drawable2 chipdrawable createfromattribute getcontext null 0 com google android material r style widget materialcomponent chip action drawable2 setbound 200 0 250 50 textviewcompat setcompounddrawablesrelative textview2 drawable2 null null null circularprogressindicatorspec spec new circularprogressindicatorspec getcontext null 0 com google android material r style widget materialcomponent circularprogressindicator extrasmall indeterminatedrawable drawable3 indeterminatedrawable createcirculardrawable getcontext spec drawable3 setvisible true true drawable3 setbound 200 0 250 50 textviewcompat setcompounddrawablesrelative textview3 drawable3 null null null result image reproduce on material 1 6 0 rc01
materialcomponentsmaterialcomponentsandroid
materialtimepicker incorrect translation of the confirmation button
Bug
description the confirmation button in datepicker have an incorrect translation into some language kazakh spanish latvian here be an example with the kazakh language should be material 1 4 0 correct translation material 1 5 0 1 7 x incorrect translation material library version 1 4 0 work correctly 1 5 0 1 6 0 beta01 1 7 0 alpha01 work incorrectly
materialcomponentsmaterialcomponentsandroid
catalog incorrect image of the datepicker demo
Bug
description it look like an incorrect demo image be be use for the datepicker material library version 1 7 0 alpha01
materialcomponentsmaterialcomponentsandroid
color harmonizedcolorsoption builder setcolorattribute be mark as nullable
Bug
l105 l109 this should be mark as nonnull
materialcomponentsmaterialcomponentsandroid
chip materialthemeoverlay be not work
Bug
description the implementation with chip in material 3 be not work after follow the documentation expect behavior should apply the styling base on what be state in the documentation source code not work incorrect color work correct color usage in main theme style appchip android api version sdk 21 material library version 1 6 0 beta 01 device samsung j1 be it just I or the material 3 component and its documentation be not yet finish or finalize I keep have this issue where the documentation and the behavior be not correct
materialcomponentsmaterialcomponentsandroid
catalog the time format switch in timepicker demo doesn t work correctly
Bug
how to reproduce open timepickermaindemofragment from the catalog app press 12h then 24h then 12h again and finally press select time a 24h time picker appear although there should be a 12h picker also here be a video material library version 1 7 0 alpha01
materialcomponentsmaterialcomponentsandroid
bottomnavigationview display on initial render
Help Wanted
description be there a way to display bottomnavigationview by default when use a layout scrollflag scroll enteralway on materialtoolbar and layout behavior string appbar scrolling view behavior the new bottomnavigationview height change as well in material3 it become a little visible while in the documentation guideline it be not image image expect behavior 1 show bottomnavigationview by default at least on initial render and only apply the scroll behavior when the user start scroll 2 completely hide the bottomnavigationview as show in the guideline source code from android studio template when work with navigation component the content main xml home fragment default destination android api version sdk 21 and above material library version 1 6 0 beta01
materialcomponentsmaterialcomponentsandroid
textinputlayout material3
Bug
do material3 support textinputlayout I have try it but not work correctly and look like it still use material 2 use widget materialcomponent textinputlayout outlinedbox as a parent work with shapeappearance use widget material3 textinputlayout outlinedbox as a parent be not work no effect with shapeappearance use it like this
materialcomponentsmaterialcomponentsandroid
fab be miss
Bug
description the documentation show that there be widget material3 floatingactionbutton but when try to use it as parent no such component exist image source code image material library version 1 6 0 beta01
materialcomponentsmaterialcomponentsandroid
materialtoolbar on material3 daynight still use material2 default color
Bug
description use theme material3 daynight as base theme style the materialtoolbar like title and action menu icon color still use the material2 default value like android textcolorprimary for the title and colorcontrolnormal for navigation action menu icon expect behavior coloronsurface for title color and coloronsurfacevariant for icon should work base on the documentation however background color work perfectly fine even I define colorprimary it win t work until I set coloronsurface source code image image minimal sample app repro n a android api version sdk 21 material library version 1 6 0 beta01 device samsung j1
materialcomponentsmaterialcomponentsandroid
bottomnavigationmenuview crash on add menus
Bug
description I m add the bottom bar item programmatically and there s a crash happen that I m not able to reproduce the crash but I do have the stack trace available stack trace fatal exception java lang illegalstateexception the specify child already have a parent you must call removeview on the child s parent first android view viewgroup addviewinner viewgroup java 6065 android view viewgroup addview viewgroup java 5884 android view viewgroup addview viewgroup java 5824 android view viewgroup addview viewgroup java 5796 com google android material bottomnavigation bottomnavigationmenuview buildmenuview bottomnavigationmenuview java 589 com google android material bottomnavigation bottomnavigationpresenter updatemenuview bottomnavigationpresenter java 67 androidx appcompat view menu menubuilder dispatchpresenterupdate menubuilder java 292 androidx appcompat view menu menubuilder onitemschange menubuilder java 1063 androidx appcompat view menu menubuilder startdispatchingitemschange menubuilder java 1090 com google android material bottomnavigation bottomnavigationmenu addinternal bottomnavigationmenu java 57 androidx appcompat view menu menubuilder add menubuilder java 476 com sportsmax ui main mainactivity setbottombardata mainactivity java 400 source code bind bottomnav menu clear val menuitem bind bottomnav menu add menu none fragmentid menu none bottombaritem gettitle android api version 50 on android 11 25 on android 7 25 on android 10 material android library version be 1 3 0 device 75 of device be samsung devices 50 of they on galaxy a02 and 25 be galaxy j7 pro
materialcomponentsmaterialcomponentsandroid
appbarlayout attribute app expand do not work in 1 6 0 beta01
Bug
simply set app expand false in the layout xml file but the appbarlayout be not collapse it work well in 1 5 0
materialcomponentsmaterialcomponentsandroid
materialdatepicker extra header padding after return to foreground
Bug
description step to reproduce show materialdatepicker from another dialog put app in background then bring app back to foreground source code override fun onviewcreate view view savedinstancestate bundle super onviewcreate view savedinstancestate if childfragmentmanager findfragmentbytag materialdatepicker null val daterangepicker materialdatepicker builder daterangepicker settitletext select date build daterangepicker show childfragmentmanager materialdatepicker android api version 12 material library version 1 6 0 beta01 device pixel 4a
materialcomponentsmaterialcomponentsandroid
top app bar incomplete material 3 documentation
Bug
I m currently try out the new material 3 feature use com google android material material 1 5 0 and I m pretty pleased with the result so far good job however there s one thing that keep bug I in this process the documentation be not easy to follow when browse the material 2 documentation on material io on every page on the top the site want I to check out material 3 once I click on the link and I m redirect to I material io I get to the correct up to date documentation which be a lot short some part even reference the old material 2 documentation and it be not clear where material 2 documentation still apply and where material 3 supersede the previous recommendation so I ve be go back and forth a lotto try and figure out how the stuff work I need for my app there s one particular thing I haven t be able to find out though if you look at the page for the top app bar it proudly present the difference between material 2 and 3 where now the transition between the status bar and the app bar be seamless and use the same colour curiously a lot of example figure use this m3 design but sometimes just the m2 variant be show without any explanation why it suddenly be the old version the codelab guide for example doesn t use m3 style status app bar at all it s always a 2 colored variant there the material theme builder dynamic which be indirectly reference by this guide do make use of this do use the m3 style by follow the code example in the documentation I always get an app that have a different colour for the status bar the primary colour on a virtual android device with android 12 so I come to the conclusion that there must be one or a combination of the follow problem 1 the documentation be incomplete and doesn t contain the required piece of information to make this happen 2 there be an error on my side and I miss an obvious step and or the docmentation be poorly structure for this particular topic 3 mca doesn t support this feature yet even though the documentation suggest otherwise I d be happy if you could help I complete the puzzle most likely there be some sort of communication error somewhere lead to the disconnect
materialcomponentsmaterialcomponentsandroid
customize material date range picker dialog
Bug
hey I want to ask if I be able to customize these several thing 1 be I able to customize the position of the pencil 2 can I remove the underline underneath the day of the week 3 can I change my day to show only one letter for example s instead of sun m instead of mon untitle I couldn t find information about this on the internet please let I know if there be a solution
materialcomponentsmaterialcomponentsandroid
rangeslider part of the label still remain after slide with huawei phone
Bug
description when use rangeslider with huawei android 9 phone the label do not disappear completely after adjust part of the label still remain on the screen expect behavior label be disappear source code image android api version 31 material library version 1 5 0 also try 1 6 0 beta01 device huawei p20 pro android 9
materialcomponentsmaterialcomponentsandroid
materialalertdialogbuilder height padding bottom issue
Bug
description for some reason the height of materialalertdialogbuilder become large than its content I be not sure if this be a padding bottom expect behavior no extra space at the bottom source code fun context materialdialog title string message string positivelabel string positivelistener dialoginterface onclicklistener negativelabel string negativelistener dialoginterface onclicklistener iscancelable boolean materialalertdialogbuilder this apply title let settitle title message let setmessage message positivelabel let setpositivebutton it positivelistener negativelabel let setnegativebutton it negativelistener setcancelable iscancelable alertdialog materialdialog getstre r string to usd getasset name null getstre r string navigation close dialog dialoginterface int dialog dismiss null null false create convertaction setonclicklistener val linearlayoutcompat linearlayoutcompat this activity val usdamount appcompattextview this activity apply width viewgroup layoutparam match parent gravity gravity center horizontal text getstre r string sampleusd val cryptoamountedittext appcompatedittext this activity apply inputtype inputtype type class number or inputtype type number flag decimal hint getstre r string field amount getasset name issingleline true doaftertextchange var coin text tostring try if coin isempty coin 0 00 val cryptoval coin todouble usdamount text getstre r string convert to usd numbersutil formatfractional cryptoval getasset metricsdomain marketdatadomain priceusd catch e exception usdamount text getstre r string invalid amount getasset name with linearlayoutcompat orientation linearlayoutcompat vertical setpadde 30 0 30 0 addview cryptoamountedittext addview usdamount alertdialog setview linearlayoutcompat alertdialog show style xml image image minimal sample app repro n a android api version 21 material library version 1 5 0 device samsung j1
materialcomponentsmaterialcomponentsandroid
bottomnavigationview getorcreatebadge not use dynamic color
Bug
description when use getorcreatebadge on bottomnavigationview the generate badgedrawable be not use the system dynamic color screenshot 20220330 224131 expect behavior the badge use dynamic color source code bind bottomnav getorcreatebadge r i d nav download android api version android 12 sdk 31 material library version 1 6 0 beta01 device android emulator 31 2 9 8316981 with android 12 0 s api 31
materialcomponentsmaterialcomponentsandroid
materialbutton vertical icon position with multi line text
Bug
description give the icongravity be texttop when text have multiple line example button have constrain width but text be long or user have big font scale then icon be wrongly lay out on the text image expect behavior button should take in account the number of line when calculate icon vertical position in texttop mode source code minimal sample app repro n d android api version android 10 material library version 1 6 0 alpha03 1 6 0 beta1 device emulator xiaomi redmi note 4
materialcomponentsmaterialcomponentsandroid
materialdatepicker very slow
Bug
description migrate from datepickerdialog to materialdatepicker but encounter a noticeable lag receive skip 87 frame the application may be do too much work on its main thread every time we call show fragmentmanager tag additionally it seem there be a memory leak happen but will still check it btw we be use it inside a fragment expect behavior no lag and no skip frame source code private lateinit var datepickerfrom materialdatepicker datepickerfrom it showmaterialdatepicker r style appdatepicker calendarconstraint apply addonpositivebuttonclicklistener time datepickerfrom show parentfragmentmanager from datepicker extension for material datepicker fun context showmaterialdatepicker stylere i d int null calendarconstraint calendarconstraint null materialdatepicker builder datepicker apply settitletext select date i d let settheme it calendarconstraint let setcalendarconstraint it build try to remove theme but not work as well minimal sample app repro n a android api version 21 material library version 1 5 0 device samsung j1
materialcomponentsmaterialcomponentsandroid
floatingactionbutton artifact show when press the fab on api 31
Bug
description on api level 31 a strange artifact be show when press the fab the artifact be especially visible on dark black background and be big when app usecompatpadding be true image expect behavior the artifact should not be show like on api 30 or low image source code the code snippet which be cause this issue xml minimal sample app repro android api version android api version 31 material library version 1 5 0 device android emulator
materialcomponentsmaterialcomponentsandroid
materialtoolbar child view layout after a title width even if set titlecentere true
Bug
description when materialtoolbar set titlecentere true the child view still layout after a title width expect behavior the child view should layout at the start source code minimal sample app repro n a android api version all material library version 1 6 0 beta01 device all to help we triage fast please check to make sure you be use the late version of the library we also happily accept pull request
materialcomponentsmaterialcomponentsandroid
textinputlayout dropdownmenuendicondelegate be leak contextthemewrapper instance
Bug
description dropdownmenuendicondelegate be leak contextthemewrapper instance expect behavior should not leak source code your own code of dropdownmenuendicondelegate minimal sample app repro use leakcanary to check this in your sample when switch between light dark mode android api version 25 material library version 1 6 0 beta01 device pax arie 8
materialcomponentsmaterialcomponentsandroid
textinputlayout prefix space be show when field be not in focused
Bug
description recently I update material lib for android from 1 3 0 to current 1 5 0 but after update I be face issue of prefix spacing display not prefix text in textinputlayout and hint move ahe which be work fine in 1 3 0 now I be unable to find solution to this problem expect behavior it should not have take space when not focus source code the code snippet which be cause this issue android api version android api version here material library version 1 5 0 device all sdfds to help we triage fast please check to make sure you be use the late version of the library we also happily accept pull request
materialcomponentsmaterialcomponentsandroid
drawable how to use svg xml in other drawable xml with tint color
Bug
o c j f 6rfg 80 k I have a svg xml the color be white when I use it in other drawable xml qlyb 7 t r 7f 7h1xe 5jx I want to set the svg color to grey I find attribute android tint but no effect how can I do to set the grey color svg exclude create a new file that the grey svg xml chinese svg drawable xml svg svg svg xml
materialcomponentsmaterialcomponentsandroid
collapsingtoolbarlayout may have a toolbar collapse bug in material1 5 0 and 1 6 0alpha3
Help Wanted
description full description of issue here collapsible image toolbar may collapsible in material1 5 0 and 1 6 0 alpha3 when collapsible image toolbar be make use collapsingtoolbarlayout and the materialtoolbar however it be perfectly fine when use the materialcomponent topic only the topic configuration have be modify the rest of the code have not be adjust expect behavior screenshot and or description of expect behavior toolbar normal fold normal error source code the code snippet which be cause this issue java minimal sample app repro please consider attach a minimal sample app that reproduce the issue this will help narrow down the condition require for reproduce the issue and it will speed up the bug fix process you may attach a zip file of the sample app or link to a github repo that contain the sample app android api version android api version here android10 and android12 material library version material android library version you be use here e g 1 1 0 alpha07 1 5 0 and 1 6 0alpha3 device device on which the bug be encounter here xiaomi9 and android virtual device to help we triage fast please check to make sure you be use the late version of the library sure we also happily accept pull request ok
materialcomponentsmaterialcomponentsandroid
chip drawable give error in material ui 3 android kotlin
Bug
hey I be work in android with material ui 3 I be get error when I use this code I be try to set style through programmatically and I be get error I want to create tag through use android chip provide by google but I don t understand why I be get error my run the activity implementation com google android material material 1 5 0 taghelper kt import android content context import android view viewgroup import com google android material chip chip import com google android material chip chipdrawable object taghelper fun addtag producttag list viewgroup viewgroup producttag foreachindexed tagstre val chip chip viewgroup context chip isclickable false setupchipappearance viewgroup context chip chip text tagstre viewgroup addview chip private fun setupchipappearance context context chip chip val drawable chipdrawable createfromattribute context null 0 r style productchip chip setchipdrawable drawable style xml error 2022 03 15 12 42 32 430 18818 18818 com example app dev e androidruntime fatal exception main process com example app dev pid 18818 java lang nullpointerexception attempt to invoke virtual method float com google android material resource textappearance gettextsize on a null object reference at com google android material chip chipdrawable loadfromattribute chipdrawable java 359 at com google android material chip chipdrawable createfromattribute chipdrawable java 280 at com example app taghelper setupchipappearance taghelper kt 26 at com example app taghelper addproducttag taghelper kt 15 at com example app product productactivity setupsaveview productactivity kt 410 at com example app product productactivity setupviewmodel lambda 4 productactivity kt 93 at com example app product productactivity lambda xbndghvztofdboghxrvzecmw9aw unknown source 0 at com example app product lambda productactivity xbndghvztofdboghxrvzecmw9aw onchange unknown source 4 at androidx lifecycle livedata considernotify livedata java 133 at androidx lifecycle livedata dispatchingvalue livedata java 151 at androidx lifecycle livedata setvalue livedata java 309 at androidx lifecycle mutablelivedata setvalue mutablelivedata java 50 at androidx lifecycle livedata 1 run livedata java 93 at android os handler handlecallback handler java 938 at android os handler dispatchmessage handler java 99 at android os looper looponce looper java 201 at android os looper loop looper java 288 at android app activitythread main activitythread java 7839 at java lang reflect method invoke native method at com android internal os runtimeinit methodandargscaller run runtimeinit java 548 at com android internal os zygoteinit main zygoteinit java 1003
materialcomponentsmaterialcomponentsandroid
navigationui add listener parameter on setupwithnavcontroller method
Bug
description use navigationui setupwithnavcontroller we can t add another listener for internal app usage like analytic expect behavior should be usefull to add listener param to navigationui setupwithnavcontroller method source code public fun setupwithnavcontroller navigationbarview navigationbarview navcontroller navcontroller listener onitemselectedlistener null material library version 1 5 0 something like that for each setupwithnavcontroller jvmstatic public fun setupwithnavcontroller navigationbarview navigationbarview navcontroller navcontroller listener onitemselectedlistener null navigationbarview setonitemselectedlistener item if listener null listener onnavigationitemselected item this to the magic onnavdestinationselecte item navcontroller val weakreference weakreference navigationbarview navcontroller addondestinationchangedlistener object navcontroller ondestinationchangedlistener override fun ondestinationchange controller navcontroller destination navdestination argument bundle val view weakreference get if view null navcontroller removeondestinationchangedlistener this return view menu foreach item if destination matchdestination item itemid item ischecke true
materialcomponentsmaterialcomponentsandroid
bottomnavigationview itemicontint xml set null be invalid
Bug
I set up vb bottomnavview itemicontintlist null be success but in xml set app itemicontint null be invalid
materialcomponentsmaterialcomponentsandroid
bottomsheetdialog navigation bar transparency ignore when the bottom sheet reach the top
Bug
description if a bottom sheet be scrollable the content will be show behind the bottom navigation bar system until the bottom sheet reach the top correct behavior video once the bottom sheet be fully expand the behavior will switch to display the content above the navigation bar video when the content be a block of text the user can see how it begin to disappear from the bottom video expect behavior the bottom sheet should always display the content behind the navigation bar when edge to edge be enable minimal sample app repro the bottom sheet section in the catalog app have an example of scrollable content with this behavior android api version any version that can go edge to edge should have this issue material library version master branch commit 6a4fa0b mar 10 2022 device emulator api 29 and another device run android 11
materialcomponentsmaterialcomponentsandroid
navigationview error inflate class since upgrade to version 1 5 0
Bug
description the navigationview class fail to inflate after upgrade the material component library from version 1 4 0 to 1 5 0 expect behavior the navigationview class inflate with version 1 5 0 like it do with version 1 4 0 and early android api version my project s compilesdkversion and targetsdkversion value be set to 31 material library version 1 5 0 include 1 6 0 alpha03 device reproduce on an android 12 emulator and an android 9 device cause set the navigationview app itemicontint value to a style attribute like android attr textcolorsecondary and assign an unnamed color resource to the android textcolorsecondary style value as follow
materialcomponentsmaterialcomponentsandroid
topappbar strange behavior on scroll
Bug
description when I m scroll through recyclerview or other scrollable layout the elevation transition blink expect behavior from your guideline top app bar be position within the same space as content only upon scroll the top app bar container fill with a contrast color that provide visual separation from the background I expect the bar to return to 0dp elevation only when I return to the starting position be this behavior intend source code xml minimal sample app repro the content be just random thing don t pay attention to they peek 2022 03 08 10 40 android api version api 32 material library version 1 6 0 alpha03 with previous version nothing change device pixel 3 xl api 29 pixel 5 api 30
materialcomponentsmaterialcomponentsandroid
slider the stepsize 1 0 must be 0 or a factor of the valuefrom 0 5 valueto 10 0 range
Bug
description recently I get a crash report send to crashlytic it seem a few user suffer from this strange issue the state of the slider setting I can read from the error message look like completely valid and validatestepsize should never be fail though click here to display the full stacktrace fatal exception java lang illegalstateexception the stepsize 1 0 must be 0 or a factor of the valuefrom 0 5 valueto 10 0 range fatal exception java lang illegalstateexception the stepsize 1 0 must be 0 or a factor of the valuefrom 0 5 valueto 10 0 range at com google android material slider baseslider validatestepsize baseslider java 541 at com google android material slider baseslider validateconfigurationifdirty baseslider java 601 at com google android material slider baseslider maybecalculatetickscoordinate baseslider java 1488 at com google android material slider baseslider updatetrackwidth baseslider java 1509 at com google android material slider baseslider onsizechange baseslider java 1479 at android view view sizechange view java 19895 at android view view setframe view java 19856 at android view view layout view java 19759 at android widget linearlayout setchildframe linearlayout java 1791 at android widget linearlayout layouthorizontal linearlayout java 1780 at android widget linearlayout onlayout linearlayout java 1546 at android view view layout view java 19762 at android view viewgroup layout viewgroup java 6149 at android widget linearlayout setchildframe linearlayout java 1791 at android widget linearlayout layoutvertical linearlayout java 1635 at android widget linearlayout onlayout linearlayout java 1544 at android view view layout view java 19762 at android view viewgroup layout viewgroup java 6149 at android widget linearlayout setchildframe linearlayout java 1791 at android widget linearlayout layouthorizontal linearlayout java 1780 at android widget linearlayout onlayout linearlayout java 1546 at android view view layout view java 19762 at android view viewgroup layout viewgroup java 6149 at androidx recyclerview widget recyclerview layoutmanager layoutdecoratedwithmargin recyclerview java 9878 at androidx recyclerview widget linearlayoutmanag layoutchunk linearlayoutmanager java 1689 at androidx recyclerview widget linearlayoutmanager fill linearlayoutmanager java 1591 at androidx recyclerview widget linearlayoutmanager scrollby linearlayoutmanager java 1395 at androidx recyclerview widget linearlayoutmanag scrollverticallyby linearlayoutmanag java 1136 at androidx recyclerview widget recyclerview scrollstep recyclerview java 1972 at androidx recyclerview widget recyclerview scrollbyinternal recyclerview java 2071 at androidx recyclerview widget recyclerview ontouchevent recyclerview java 3531 at android view view dispatchtouchevent view java 11832 at android view viewgroup dispatchtransformedtouchevent viewgroup java 3036 at android view viewgroup dispatchtouchevent viewgroup java 2714 at android view viewgroup dispatchtransformedtouchevent viewgroup java 3042 at android view viewgroup dispatchtouchevent viewgroup java 2728 at android view viewgroup dispatchtransformedtouchevent viewgroup java 3042 at android view viewgroup dispatchtouchevent viewgroup java 2728 at android view viewgroup dispatchtransformedtouchevent viewgroup java 3042 at android view viewgroup dispatchtouchevent viewgroup java 2728 at android view viewgroup dispatchtransformedtouchevent viewgroup java 3042 at android view viewgroup dispatchtouchevent viewgroup java 2728 at android view viewgroup dispatchtransformedtouchevent viewgroup java 3042 at android view viewgroup dispatchtouchevent viewgroup java 2728 at android view viewgroup dispatchtransformedtouchevent viewgroup java 3042 at android view viewgroup dispatchtouchevent viewgroup java 2728 at android view viewgroup dispatchtransformedtouchevent viewgroup java 3042 at android view viewgroup dispatchtouchevent viewgroup java 2728 at android view viewgroup dispatchtransformedtouchevent viewgroup java 3042 at android view viewgroup dispatchtouchevent viewgroup java 2728 at com android internal policy decorview superdispatchtouchevent decorview java 473 at com android internal policy phonewindow superdispatchtouchevent phonewindow java 1857 at android app activity dispatchtouchevent activity java 3326 at androidx appcompat view windowcallbackwrapper dispatchtouchevent windowcallbackwrapper java 69 at com android internal policy decorview dispatchtouchevent decorview java 435 at android view view dispatchpointerevent view java 12071 at android view viewrootimpl viewpostimeinputstage processpointerevent viewrootimpl java 5241 at android view viewrootimpl viewpostimeinputstage onprocess viewrootimpl java 5055 at android view viewrootimpl inputstage deliver viewrootimpl java 4363 at android view viewrootimpl inputstage ondelivertonext viewrootimpl java 4416 at android view viewrootimpl inputstage forward viewrootimpl java 4382 at android view viewrootimpl inputstage apply viewrootimpl java 4390 at android view viewrootimpl inputstage deliver viewrootimpl java 4363 at android view viewrootimpl inputstage ondelivertonext viewrootimpl java 4416 at android view viewrootimpl inputstage forward viewrootimpl java 4382 at android view viewrootimpl asyncinputstage forward viewrootimpl java 4525 at android view viewrootimpl inputstage apply viewrootimpl java 4390 at android view viewrootimpl asyncinputstage apply viewrootimpl java 4582 at android view viewrootimpl inputstage deliver viewrootimpl java 4363 at android view viewrootimpl inputstage ondelivertonext viewrootimpl java 4416 at android view viewrootimpl inputstage forward viewrootimpl java 4382 at android view viewrootimpl inputstage apply viewrootimpl java 4390 at android view viewrootimpl inputstage deliver viewrootimpl java 4363 at android view viewrootimpl deliverinputevent viewrootimpl java 7189 at android view viewrootimpl doprocessinputevent viewrootimpl java 7163 at android view viewrootimpl enqueueinputevent viewrootimpl java 7124 at android view viewrootimpl windowinputeventreceiver oninputevent viewrootimpl java 7323 at android view inputeventreceiver dispatchinputevent inputeventreceiver java 187 at android view inputeventreceiver nativeconsumebatchedinputevent inputeventreceiver java at android view inputeventreceiver consumebatchedinputevent inputeventreceiver java 178 at android view viewrootimpl doconsumebatchedinput viewrootimpl java 7271 at android view viewrootimpl consumebatchedinputrunnable run viewrootimpl java 7346 at android view choreographer callbackrecord run choreographer java 979 at android view choreographer docallback choreographer java 791 at android view choreographer doframe choreographer java 720 at android view choreographer framedisplayeventreceiver run choreographer java 965 at android os handler handlecallback handler java 790 at android os handler dispatchmessage handler java 99 at android os looper loop looper java 164 at android app activitythread main activitythread java 6687 at java lang reflect method invoke method java at com android internal os runtimeinit methodandargscaller run runtimeinit java 438 at com android internal os zygoteinit main zygoteinit java 810 expect behavior no exception throw when valuefrom 0 5f valueto 10 0f and stepsize 0 5f material library version 1 6 0 alpha02 device lg q6 android 8 1 0 huawei y9 prime 2019 android 10 maybe this issue look very rare and I can not reproduce it myself
materialcomponentsmaterialcomponentsandroid
materialdatepicker background draw on top of header background
Help Wanted
description I m use material component I be try to apply a custom style to a materialdatepicker I m try to set a different background color for the body and for the header while the header technically use the correct background color from the materialcalendarheaderlayout style the dialog background still get partially draw on top expect behavior the header and body should have separate background color actual behavior screenshot 1646298061 this be my source code in style xml and I be show the dialog with val daterangepicker materialdatepicker builder daterangepicker settitletext select date setselection pair materialdatepicker thismonthinutcmillisecond materialdatepick todayinutcmillisecond settheme r style materialrangedatepicker build activity let daterangepicker show activity supportfragmentmanager date range picker
materialcomponentsmaterialcomponentsandroid
slider not possible get place from crash
Bug
description there be no way how to find place for crash from stack trace there be no way to recognize component fragment view in app we have slider on around 40 place in app crash only in production and it s not possible recognize where it crash log be from firebase crashlytic expect behavior show in log application place where crash be force source code bind rangeprice apply value listof 0f 100f valuefrom 0f valueto 100f addonchangelistener slider value fromuser do something bind rangeprice value listofnotnull 0f 101f android api version any material library version implementation com google android material material 1 5 0 device any fatal exception java lang illegalstateexception slider value 117 0 must be great or equal to valuefrom 0 0 and low or equal to valueto 100 0 com google android material slider baseslider validatevalue baseslider java 549 com google android material slider baseslider validateconfigurationifdirty baseslider java 602 com google android material slider baseslider ondraw baseslider java 1533 android view view draw view java 22782 android view view updatedisplaylistifdirty view java 21594 android view view draw view java 22487 android view viewgroup drawchild viewgroup java 4666 android view viewgroup dispatchdraw viewgroup java 4400 androidx constraintlayout widget constraintlayout dispatchdraw constraintlayout java 1994 android view view updatedisplaylistifdirty view java 21585 android view view draw view java 22487 android view viewgroup drawchild viewgroup java 4666 android view viewgroup dispatchdraw viewgroup java 4400 android view view updatedisplaylistifdirty view java 21585 android view view draw view java 22487 android view viewgroup drawchild viewgroup java 4666 android view viewgroup dispatchdraw viewgroup java 4400 android view view draw view java 22789 androidx core widget nestedscrollview draw nestedscrollview java 2075 android view view updatedisplaylistifdirty view java 21594 android view view draw view java 22487 android view viewgroup drawchild viewgroup java 4666 android view viewgroup dispatchdraw viewgroup java 4400 androidx constraintlayout widget constraintlayout dispatchdraw constraintlayout java 1994 android view view updatedisplaylistifdirty view java 21585 android view view draw view java 22487 android view viewgroup drawchild viewgroup java 4666 android view viewgroup dispatchdraw viewgroup java 4400 android view view draw view java 22789 android view view updatedisplaylistifdirty view java 21594 android view view draw view java 22487 android view viewgroup drawchild viewgroup java 4666 androidx coordinatorlayout widget coordinatorlayout drawchild coordinatorlayout java 1277 android view viewgroup dispatchdraw viewgroup java 4400 android view view updatedisplaylistifdirty view java 21585 android view view draw view java 22487 android view viewgroup drawchild viewgroup java 4666 android view viewgroup dispatchdraw viewgroup java 4400 android view view updatedisplaylistifdirty view java 21585 android view view draw view java 22487 android view viewgroup drawchild viewgroup java 4666 android view viewgroup dispatchdraw viewgroup java 4400 android view view updatedisplaylistifdirty view java 21585 android view view draw view java 22487 android view viewgroup drawchild viewgroup java 4666 android view viewgroup dispatchdraw viewgroup java 4400 android view view updatedisplaylistifdirty view java 21585 android view view draw view java 22487 android view viewgroup drawchild viewgroup java 4666 android view viewgroup dispatchdraw viewgroup java 4400 android view view updatedisplaylistifdirty view java 21585 android view view draw view java 22487 android view viewgroup drawchild viewgroup java 4666 android view viewgroup dispatchdraw viewgroup java 4400 android view view updatedisplaylistifdirty view java 21585 android view view draw view java 22487 android view viewgroup drawchild viewgroup java 4666 android view viewgroup dispatchdraw viewgroup java 4400 com android internal policy decorview dispatchdraw decorview java 2968 android view view draw view java 22789 com android internal policy decorview draw decorview java 893 android view view updatedisplaylistifdirty view java 21594 android view threadedrenderer updateviewtreedisplaylist threadedrenderer java 559 android view threadedrenderer updaterootdisplaylist threadedrenderer java 565 android view threadedrenderer draw threadedrenderer java 642 android view viewrootimpl draw viewrootimpl java 4664 android view viewrootimpl performdraw viewrootimpl java 4375 android view viewrootimpl performtraversal viewrootimpl java 3585 android view viewrootimpl dotraversal viewrootimpl java 2340 android view viewrootimpl traversalrunnable run viewrootimpl java 9057 android view choreographer callbackrecord run choreographer java 1044 android view choreographer docallback choreographer java 867 android view choreographer doframe choreographer java 794 android view choreographer framedisplayeventreceiver run choreographer java 1029 android os handler handlecallback handler java 938 android os handler dispatchmessage handler java 99 android os looper loop looper java 264 android app activitythread main activitythread java 8268 java lang reflect method invoke method java com android internal os runtimeinit methodandargscaller run runtimeinit java 632 com android internal os zygoteinit main zygoteinit java 1049 sample project activity main xml activitymain kt import android os bundle import android util log import android widget button import androidx appcompat app appcompatactivity import com google android material slider rangeslider class mainactivity appcompatactivity lateinit var slider rangeslider override fun oncreate savedinstancestate bundle super oncreate savedinstancestate setcontentview r layout activity main slider findviewbyid r i d slider apply value listof 0f 100f valuefrom 0f valueto 100f addonchangelistener slider value fromuser do something log v slider value value fromuser fromuser findviewbyid r i d buttoncrash setonclicklistener slider value listof 1f 101f java lang illegalstateexception slider value 101 0 must be great or equal to valuefrom 0 0 and low or equal to valueto 100 0 at com google android material slider baseslider validatevalue baseslider java 549 at com google android material slider baseslider validateconfigurationifdirty baseslider java 602 at com google android material slider baseslider ondraw baseslider java 1533 at android view view draw view java 22704 at android view view updatedisplaylistifdirty view java 21579 at android view viewgroup recreatechilddisplaylist viewgroup java 4512 at android view viewgroup dispatchgetdisplaylist viewgroup java 4485 at android view view updatedisplaylistifdirty view java 21535 at android view viewgroup recreatechilddisplaylist viewgroup java 4512 at android view viewgroup dispatchgetdisplaylist viewgroup java 4485 at android view view updatedisplaylistifdirty view java 21535 at android view viewgroup recreatechilddisplaylist viewgroup java 4512 at android view viewgroup dispatchgetdisplaylist viewgroup java 4485 at android view view updatedisplaylistifdirty view java 21535 at android view viewgroup recreatechilddisplaylist viewgroup java 4512 at android view viewgroup dispatchgetdisplaylist viewgroup java 4485 at android view view updatedisplaylistifdirty view java 21535 at android view viewgroup recreatechilddisplaylist viewgroup java 4512 at android view viewgroup dispatchgetdisplaylist viewgroup java 4485 at android view view updatedisplaylistifdirty view java 21535 at android view viewgroup recreatechilddisplaylist viewgroup java 4512 at android view viewgroup dispatchgetdisplaylist viewgroup java 4485 at android view view updatedisplaylistifdirty view java 21535 at android view threadedrenderer updateviewtreedisplaylist threadedrenderer java 534 at android view threadedrenderer updaterootdisplaylist threadedrenderer java 540 at android view threadedrenderer draw threadedrenderer java 616 at android view viewrootimpl draw viewrootimpl java 4525 at android view viewrootimpl performdraw viewrootimpl java 4245 at android view viewrootimpl performtraversal viewrootimpl java 3374 at android view viewrootimpl dotraversal viewrootimpl java 2179 at android view viewrootimpl traversalrunnable run viewrootimpl java 8787 at android view choreographer callbackrecord run choreographer java 1037 at android view choreographer docallback choreographer java 845 at android view choreographer doframe choreographer java 780 at android view choreographer framedisplayeventreceiver run choreographer java 1022 at android os handler handlecallback handler java 938 at android os handler dispatchmessage handler java 99 at android os looper looponce looper java 201 at android os looper loop looper java 288 at android app activitythread main activitythread java 7870 at java lang reflect method invoke native method at com android internal os runtimeinit methodandargscaller run runtimeinit java 548 at com android internal os zygoteinit main zygoteinit java 1003 expect behavior slider value 101 0 must be great or equal to valuefrom 0 0 and low or equal to valueto 100 0 on mainactivity kt 28
materialcomponentsmaterialcomponentsandroid
materialcolor getcolorrole incorrect dark tone
Bug
this commit add apis for color harmonization and role mapping utility expect behavior that the tone use agree with the documentation here here and here note that kotlin agree with the documentation if we check the colordarktoken from darkcolorscheme androidx compose ui graphic color androidx compose ui graphic color androidx compose ui graphic color androidx compose ui graphic color androidx compose ui graphic color androidx compose ui graphic color androidx compose ui graphic color androidx compose ui graphic color androidx compose ui graphic color androidx compose ui graphic color androidx compose ui graphic color androidx compose ui graphic color androidx compose ui graphic color androidx compose ui graphic color androidx compose ui graphic color androidx compose ui graphic color androidx compose ui graphic color androidx compose ui graphic color androidx compose ui graphic color androidx compose ui graphic color androidx compose ui graphic color androidx compose ui graphic color androidx compose ui graphic color androidx compose ui graphic color androidx compose ui graphic color androidx compose ui graphic color image image image source code private static final int tone accent light 40 private static final int tone on accent light 100 private static final int tone accent container light 90 private static final int tone on accent container light 10 private static final int tone accent dark 70 should be 80 private static final int tone on accent dark 10 should be 20 private static final int tone accent container dark 20 should be 30 private static final int tone on accent container dark 80 should be 90 nonnull public static colorrole getcolorrole colorint int color boolean islighttheme return islighttheme new colorrole getcolorrole color tone accent light getcolorrole color tone on accent light getcolorrole color tone accent container light getcolorrole color tone on accent container light new colorrole getcolorrole color tone accent dark getcolorrole color tone on accent dark getcolorrole color tone accent container dark getcolorrole color tone on accent container dark
materialcomponentsmaterialcomponentsandroid
bottomsheetdialog do not respect android windowlightnavigationbar value in bottomsheetdialogtheme if navigation bar color be translucent
Bug
description bottomsheetdialog s internal logic override the system navigation bar s light dark mode as set in its app s theme s bottomsheetdialogtheme if that theme also set a translucent navigation bar color cause the system navigation bar to not be in light mode when the dialog be show expect behavior when a bottomsheetdialog be show with a theme whose bottomsheetdialogtheme have android windowlightnavigationbar set to true the system navigation bar be in light mode source code see this bottomsheetdialog theme overlay l15 apply in the app s theme here l76 the result bottom sheet look like the above screenshot except with white navigation bar icon this be because bottomsheetdialog onattachedtowindow set systemuivisibility flag without keep any exist flag l190 l193 cause the light navigation bar flag to be lose use windowcompat or manually keep exist flag here should fix this to reproduce change this line l169 to use bottomsheetdialog instead of my fixedbottomsheetdialog class android api version 27 material library version 1 5 0 device any
materialcomponentsmaterialcomponentsandroid
materialbutton app icon be not visible in dynamic feature module when include aar lib
Bug
I include in my dynamic delivery module aar lib as dependency implementation file lib sdk 2 0 11 aar in this case materialbutton inside my dynamic delivery and sdk 2 0 11 aar stop display icon in runtime example materialbutton in xml pay attention to app icon drawable ic arrow back I m set icon in this materialbutton and it be visible in preview but in runtime be not in this case not display absolute all drawable I try specify android drawable his same not visible notice this situation reproduce exactly when my dynamic delivery module be com android dynamic feature and if I implement aar to lib in case when my dynamic delivery module be com android library all show correct and also when my dynamic delivery module be com android dynamic feature but not implement sdk 2 0 11 aar icon be visible in runtime I ve be try to figure out what the problem be for a very long time but haven t be able to I ve come to the conclusion that it s a library error com google android material material because all other library work correctly about aar sdk it be com android library and contain follow dependency in his gradle file apply plugin com android library apply plugin com kezong fat aar apply plugin kotlin android apply plugin kotlin kapt apply plugin kotlin parcelize apply plugin androidx navigation safearg apply plugin koin dependency implementation org jetbrain kotlin kotlin stdlib jdk8 kotlin version androidx api androidx material api androidx appcompat api androidx activity api androidx fragment api androidx core api androidx cardview api androidx recyclerview api androidx constraintlayout api androidx webkit google service api google location api google phone api google play lifecycle api lifecycle extension api lifecycle runtime api lifecycle common java8 api lifecycle viewmodel api lifecycle livedata retrofit api retrofit retrofit api retrofit converter background api background coroutine core api background coroutine android api background work navigation api navigation fragment api navigation ui di api di fragment api di scope api di viewmodel api di ext push api push core api push message mlkit api mlkit barcode api mlkit face image loader api image loader glide kapt image loader compiler embed commons api commons socket exclude group org json module json api commons commons text embed font calligraphy embed font viewpump embed commons signature pad embed commons round imageview embed commons scale imageview embed commons shortcut embed commons permission embed commons decoro embed name abbyy rtr sdk 1 0 ext aar embed name dtk lib 1 0 8 ext aar actual result expect result android api version here 29 material library version material android library version you be use here 1 3 0 also test with 1 4 0 but result same device undependence of device I use samsung galaxy a71 and pixel 3
materialcomponentsmaterialcomponentsandroid
checkbox typo in the implementation doc
Bug
description there s a minor error in the sample code of checkbox checkbox to listen for a checkbox s check unchecked state change checkbox setoncheckedchangelistener buttonview ischecked respond to checkbox be check unchecked expect behavior to listen for a checkbox s check unchecked state change checkbox setoncheckedchangelistener buttonview ischecke respond to checkbox be check unchecked
materialcomponentsmaterialcomponentsandroid
materialtoolbar elevation reset to 0dp in dark theme
Bug
description when use materialtoolbar with the theme materialcomponent daynight noactionbar theme the toolbar s elevation reset to 0dp during the night mode as a result the background color of toolbar which it get from attr colorsurface be the same as the activity s background color so we can not differentiate between the toolbar and the activity s background this happen because at 0dp elevation the dark theme set the colorsurface to the same value as the colorbackground the expect behavior should be that the toolbar s elevation be still 4dp in the night mode as well please reply if anybody else be have this same problem or be I the only victim expect behavior material dark theme image source code here s the link l70 to file as you can see in the follow style the android elevation be not set to the toolbar and this style get apply in night mode android api version android 11 api 30 material library version 1 5 0 device samsung galaxy a50s
materialcomponentsmaterialcomponentsandroid
materialdatepicker materialtimepicker button be not display properly
Bug
description full description of issue here expect behavior the materialdatepicker and materialtimepicker button ok and cancel be not display properly in one plus device refer to the screenshot below android api version 30 31 material library version com google android material material 1 3 0 com google android material material 1 5 0 device device detail device name oneplus 9 pro 5 g edit model le2125 os version android 12 to help we triage fast please check to make sure you be use the late version of the library we also happily accept pull request
materialcomponentsmaterialcomponentsandroid
component name short description of issue
Bug
description full description of issue here expect behavior screenshot and or description of expect behavior source code the code snippet which be cause this issue please consider attach a minimal sample app that reproduce the issue android api version android api version here material library version material android library version you be use here e g 1 1 0 alpha07 device device on which the bug be encounter here to help we triage fast please check to make sure you be use the late version of the library we also happily accept pull request
materialcomponentsmaterialcomponentsandroid
textinputlayout set endiconmode make hint disappear
Bug
description to display my custom icon correctly on the right side app endicondrawable drawable ic drop down it be necessary to specify app endiconmode custom however add this parameter entail a situation where the text from android hint be not show for some reason expect behavior image source code android api version 32 material library version 1 4 0 device redmi 9 12 0 2 emulator
materialcomponentsmaterialcomponentsandroid
collapsingtoolbarlayout expand text can not get long than collapse text
Bug
description use a collapsingtoolbarlayout the extended title get cut off wrap at the same point where the collapse text do image to verify that the collapse title influence the extended title you can remove the menu or change the textappearance of the collapse title both of these influence the extend title image this might be relate to 1840 expect behavior image note I achieve this by set the collapsedtitletextappearance to something very small source code xml material library version 1 6 0 alpha02 late I use the layout editor to demonstrate the issue but it behave just the same on my testing device
materialcomponentsmaterialcomponentsandroid
materialbuttontogglegroup onbuttoncheckedlistener call multiple time
Bug
description it seem like the commit 747bcf25fffb3d3e3b6ec0ef52e884255f144bb4 simplification of the check logic break my materialbuttontogglegroup implementation when I upgrade to 1 6 0 alpha02 when I downgrade to 1 6 0 alpha01 it work correctly I let the user change the app theme light dark auto with a toggle group after the user select an option the app programmatically restart to apply the new theme to the whole app because the contain fragment be restore from save instance the toggle group be initialize again with the new theme select since the last alpha when I tap on a button of the group the app restart infinitely and never change the theme because the toggle group always go back to the previous selection log have show that the onbuttoncheckedlistener be call once with the new selection of the user and again with the previous selection all before restart of the app probably cause the infinite loop when I force stop the app during this loop and open the fragment again the toggle group be initialize with its old state mean the select option be never write to sharedpreference instead the old one be again in simple word and without the restart behavior the onbuttoncheckedlistener be call twice and the second call contain the previously select button so in the end the group and the variable in the listener stay unchanged expect behavior the onbuttoncheckedlistener should be call exactly once with the correct argument when I click on a button in a group it should not matter if I be restart the app programmatically after that for example to apply the select theme source code xml java int i d switch sharedpref getstre pref mode mode auto case mode light i d r i d button theme light break case mode dark i d r i d button theme dark break default i d r i d button theme auto break bind toggletheme check i d log I tag get sharedpref getstre pref mode mode auto bind toggletheme addonbuttoncheckedlistener group checkedid ischecked string pref if checkedid r i d button other theme light pref mode light else if checkedid r i d button other theme dark pref mode dark else pref mode auto sharedpref edit putstre pref mode pref apply log I tag set pref restarttoapply in logcat I can see that since 1 6 0 alpha02 the onbuttoncheckedlistener be call infinitely on fragment creation get auto on single button click set dark set auto app restart get auto cause by fragment recreation set dark set auto app restart get auto cause by fragment recreation and so on the correct log should be on fragment creation get auto on single button click set dark app restart get dark cause by fragment recreation android api version 31 material library version 1 6 0 alpha02 device pixel 6