repository
stringclasses
156 values
issue title
stringlengths
1
1.01k
labels
stringclasses
8 values
body
stringlengths
1
270k
antlrantlr4
allow multiple u s in unicode escape uu000d
Bug
jls7 allow for multiple u s in unicode escape to indicate level of nest encoding e g uu000d indicate a carriage return encode twice topic 3 3 bottom 3 paragraph the code that do this for the java7 compiler be locate in method convertunicode in langtool ce654f4ecfd8 src share class com sun tool javac parser scanner java need to modify method readcharat in tool test org antlr v4 test javaunicodeinputstream java to also allow multiple u s perhaps we need to also allow multiple u s in the unicode escape for the antlr tool
antlrantlr4
version 3 4 of c runtime may lead to core dump
Invalid
give a rule rule sub rule when successfully match sub rule but encounter rather than an error message be yield like this end of input 1 error 1 unexpected token at offset 6226064 at syntax error under some condition the process will core before at offset 6226064 at syntax error show by dig into the source code I find it crash at newstr8 line 587 of antlr3stre c when apply strlen at ptr newstr8 be call by gettext at line 371 of antlr3commontoken c in normal case newstr8 be call by gettext at 389 of antlr3commontoken c because token textstate equal neither antlr3 text string nor antlr3 text charp a little deep digging show that token be point to eoftoken of antlr3 token source which be not initialize and both eoftoken textstate and eoftoken toktext char contain random value when eoftoken textstate happen to equal to antlr3 text charp and eoftoken toktext char hold the address of inaccessible address core dump show up below be the call stack when token point to eoftoken toklt antlr3 token stream struct ts 0x003e6f70 int k 1 line 377 c antlr3recognitionexceptionnew antlr3 base recognizer struct recognizer 0x00754378 line 347 0x14 byte c recoverfrommismatchedtoken antlr3 base recognizer struct recognizer 0x00754378 unsigned int ttype 64 antlr3 bitset list struct follow 0x004c9608 line 1471 0x9 bytes c match antlr3 base recognizer struct recognizer 0x00754378 unsigned int ttype 64 antlr3 bitset list struct follow 0x004c9608 line 478 0x16 bytes c the next be the call stack just before process crash newstr8 antlr3 string factory struct factory 0x003e6590 unsigned char ptr 0x00473894 line 587 c gettext antlr3 common token struct token 0x003e6c50 line 389 0x19 byte c tostre antlr3 common token struct token 0x003e6c50 line 538 0xe byte c displayrecognitionerror antlr3 base recognizer struct recognizer 0x00754378 unsigned char tokenname 0x004c9460 line 1066 0x11 bytes c reporterror antlr3 base recognizer struct recognizer 0x00754378 line 747 0x18 byte c
antlrantlr4
error with pushmode in lexer
Duplicate
hi all I m quite new to antlr and antlr 4 specifically I m get a strange error when generate a lexer antlr4 mylex g4 the stack trace be exception in thread main java lang nullpointerexception at org antlr v4 automata lexeratnfactory lexercommand lexeratnfactory java 155 at org antlr v4 parse atnbuilder lexercommand atnbuilder java 695 at org antlr v4 parse atnbuilder lexercommand atnbuilder java 614 at org antlr v4 parse atnbuilder alternative atnbuilder java 511 at org antlr v4 parse atnbuilder ruleblock atnbuilder java 289 at org antlr v4 automata parseratnfactory createatn parseratnfactory java 148 at org antlr v4 automata lexeratnfactory createatn lexeratnfactory java 94 at org antlr v4 tool processnoncombinedgrammar tool java 407 at org antlr v4 tool process tool java 384 at org antlr v4 tool processgrammarsoncommandline tool java 343 at org antlr v4 tool main tool java 190 this seem to be cause be a wrong way of write an instruction pushmode wrong instead of pushmode correct regard giorgio
antlrantlr4
nullpointerexception on interpreter
Invalid
hello I be use the antlr v3 eclipse plugin and I be try to run and test my grammar with the interpreter yesterday be work fine but today I get the nullpointerexception below be there something I can do to overcome this issue thank a lot entry org eclipse ui 4 0 2013 05 09 13 54 55 755 message unhandled event loop exception stack 0 java lang nullpointerexception at org deve antlride ui view interpreter evalelementviewer traverse evalelementviewer java 479 at org deve antlride ui view interpreter evalelementviewer draw evalelementviewer java 406 at org deve antlride ui view interpreter evalelementviewer draw evalelementviewer java 304 at org deve antlride ui view interpreter evalelementviewer setinput evalelementviewer java 289 at org deve antlride internal ui editor antlrinterpreterpage runtest antlrinterpreterpage java 626 at org deve antlride internal ui editor antlrinterpreterpage access 1 antlrinterpreterpage java 623 at org deve antlride internal ui editor antlrinterpreterpage runaction run antlrinterpreterpage java 187 at org deve antlride internal ui editor antlrinterpreterpage dropdownmenu run antlrinterpreterpage java 134 at org eclipse jface action action runwithevent action java 498 at org eclipse jface action actioncontributionitem handlewidgetselection actioncontributionitem java 584 at org eclipse jface action actioncontributionitem access 2 actioncontributionitem java 501 at org eclipse jface action actioncontributionitem 6 handleevent actioncontributionitem java 452 at org eclipse swt widget eventtable sendevent eventtable java 84 at org eclipse swt widget widget sendevent widget java 1053 at org eclipse swt widget display rundeferredevent display java 4165 at org eclipse swt widget display readanddispatch display java 3754 at org eclipse ui internal workbench runeventloop workbench java 2701 at org eclipse ui internal workbench runui workbench java 2665 at org eclipse ui internal workbench access 4 workbench java 2499 at org eclipse ui internal workbench 7 run workbench java 679 at org eclipse core databinde observable realm runwithdefault realm java 332 at org eclipse ui internal workbench createandrunworkbench workbench java 668 at org eclipse ui platformui createandrunworkbench platformui java 149 at org eclipse ui internal ide application ideapplication start ideapplication java 123 at org eclipse equinox internal app eclipseapphandle run eclipseapphandle java 196 at org eclipse core runtime internal adaptor eclipseapplauncher runapplication eclipseapplauncher java 110 at org eclipse core runtime internal adaptor eclipseapplauncher start eclipseapplauncher java 79 at org eclipse core runtime adaptor eclipsestarter run eclipsestarter java 344 at org eclipse core runtime adaptor eclipsestarter run eclipsestarter java 179 at sun reflect nativemethodaccessorimpl invoke0 native method at sun reflect nativemethodaccessorimpl invoke unknown source at sun reflect delegatingmethodaccessorimpl invoke unknown source at java lang reflect method invoke unknown source at org eclipse equinox launcher main invokeframework main java 622 at org eclipse equinox launcher main basicrun main java 577 at org eclipse equinox launcher main run main java 1410
antlrantlr4
null pointer exception at org antlr v4 tool grammar setnodeoption grammar java 760
Duplicate
I make a syntax error in my input grammar file but besides the error message I also get a null pointer exception antlr probably shouldn t throw npe brenden kageyama dev proj wikiparser ant parser buildfile c user brenden dev proj wikiparser build xml pre compile java error 50 c user brenden dev proj wikiparser antlr wiki wikigrammar g4 25 8 syntax error extraneous input any expect gt while look for rule element java exception in thread main java lang nullpointerexception java at org antlr v4 tool grammar setnodeoption grammar java 760 java at org antlr v4 parse antlrparser terminal antlrparser java 8569 java at org antlr v4 parse antlrparser atom antlrparser java 7445 java at org antlr v4 parse antlrparser element antlrparser java 6193 java at org antlr v4 parse antlrparser element antlrparser java 5908 java at org antlr v4 parse antlrpars alternative antlrparser java 5792 java at org antlr v4 parse antlrparser labeledalt antlrparser java 3682 java at org antlr v4 parse antlrparser rulealtlist antlrparser java 3573 java at org antlr v4 parse antlrparser ruleblock antlrparser java 3492 java at org antlr v4 parse antlrparser parserrule antlrparser java 2578 java at org antlr v4 parse antlrparser rule antlrparser java 2379 java at org antlr v4 parse antlrparser rule antlrparser java 2192 java at org antlr v4 parse antlrpars grammarspec antlrparser java 307 java at org antlr v4 tool load tool java 617 java at org antlr v4 tool loadgrammar tool java 568 java at org antlr v4 tool sortgrammarbytokenvocab tool java 492 java at org antlr v4 tool processgrammarsoncommandline tool java 325 java at org antlr v4 tool main tool java 190 java java result 1
antlrantlr4
protect field access in defaulterrorstrategy
Duplicate
while I don t need to access this field myself as I track my own error not that in many method in defaulterrorstrategy java the field syntaxerror in the parser class be access directly and there be no accessor method to get to it this mean that if you subclass the defautlerrorstrategy class there be no way to increment the error count in the recognizer public void reportunwantedtoken parser recognizer if errorrecoverymode return recognizer syntaxerror can only do this in the runtime package not user subclass so the recognizer should declare syntaxerror as a private field and provide incsyntaxerrorcount int I and use it internally jim
antlrantlr4
recoursive parser use implicit token ignore white space lexer rule
Bug
for this gramar use antlr 4 0 complete jar expression i d expression expression dofunction expression doparenthesis expression donot expression donegate expression dopositiv expression expression dopower expression expression domultipy expression expression dodivide expression expression domodulo expression expression dominus expression expression doplus expression expression doequal expression expression donotequal expression expression dogreather expression expression dogreatherequal expression expression dolesser expression expression dolesserequal expression k in expression expression doin expression k and expression doand expression k or expression door expression expression newarray k true newtrueboolean k false newfalseboolean number newnumber date newdatetime i d newidentifi sq string newstre k null newnull fragement fragment digit 0 9 fragment upper a z fragment low a z fragment letter low upper fragment word letter fragment alphanum word digit tokens i d letter alphanum number digit digit e e digit date digit digit digit digit digit digit digit digit digit digit digit digit digit digit digit sq string dq string ws t n r skip comment n n skip a expression like test 1 3 compile while test 1 3 do not but any white space should be eliminate by my lexer rule ws
antlrantlr4
epsilon cause hang
Bug
I m use the follow grammar grammar grammar1 a d d epsilon ws r t n skip in antlrworks 2 I use run in testrig with a file of content x cpu usage spike and memory do not stop to be allocate while this grammar be not useful on its own the same bug affect the grammar I be work on after I accidentally put an extra pipe in a rule one pipe be at the end of a long line so I carelessly add another one while add some alternative below a d d some long line e f
antlrantlr4
dfa 15 throw an exception
Invalid
I be currently work in parse pl sql procedure use csharp I be use antlr I generate parser and lexer use a grammar find in antlr grammar list while I run lexer I get the exception the type initializer for dfa 15 throw an exception in dfa unpackencodedstringtounsignedchar dfa15 min what would be the problem the problem be in grammar file I choose or other I need help regard ganku007
antlrantlr4
unhelpful error message
Duplicate
in a lexer grammar mistype popmode and get exception in thread main java lang nullpointerexception at org antlr v4 automata lexeratnfactory lexercommand lexeratnfactory java 155 at org antlr v4 parse atnbuilder lexercommand atnbuilder java 695 at org antlr v4 parse atnbuilder lexercommand atnbuilder java 614 at org antlr v4 parse atnbuilder alternative atnbuilder java 511 at org antlr v4 parse atnbuilder ruleblock atnbuilder java 289 at org antlr v4 automata parseratnfactory createatn parseratnfactory java 148 at org antlr v4 automata lexeratnfactory createatn lexeratnfactory java 94 at org antlr v4 tool processnoncombinedgrammar tool java 407 at org antlr v4 tool process tool java 384 at org antlr v4 tool processgrammarsoncommandline tool java 343 at org antlr v4 tool main tool java 190 seem like this may be relate to 161 or be at least the same error point
antlrantlr4
nullpointerexception from grun with no argument
Duplicate
bjame newton antlr example 1 grun java org antlr v4 runtime misc testrig grammarname startrulename token tree gui ps file ps encode encodingname trace diagnostic sll input filename s use startrulename token if grammarname be a lexer grammar omit input filename make rig read from stdin exception in thread main java lang nullpointerexception at sun misc launcher appclassloader loadclass launcher java 287 at java lang classloader loadclass classloader java 266 at org antlr v4 runtime misc testrig process testrig java 157 at org antlr v4 runtime misc testrig main testrig java 142 bjame newton antlr example 1 java version java version 1 6 0 27 openjdk runtime environment icedtea6 1 12 3 6b27 1 12 3 0ubuntu1 10 04 openjdk 64 bit server vm build 20 0 b12 mixed mode bjame newton antlr example 1 uname a linux newton 2 6 32 45 generic 104 ubuntu smp tue feb 19 21 20 09 utc 2013 x86 64 gnu linux
antlrantlr4
null pointer exception
Duplicate
I m not sure how it happen but I guess a null pointer should be more precise cause by java lang nullpointerexception at org antlr v4 runtime parser unrollrecursioncontext parser java 497
antlrantlr4
u000d in antlr result u000d in generate code lead to compilation error
Bug
java convert all unicode escape to character before lexe begin
antlrantlr4
null pointer exception in stray bracket
Invalid
the follow grammar cause a null pointer exception no issue occur if be not present on line 58 simple example be probably possible I don t have time right now to find one but figure that I would report the bug antlr grammar logo option language java output ast token move header package edu wssu compsci logoos parser import java util hashmap lexer header package edu wssu compsci logoos parser expr bool expr color expr bool expr or expr num expr add expr or expr and expr or and expr and expr not expr and not expr not expr not bool val bool val option backtrack true compare expr true false lparen bool expr rparen compare expr add expr add expr add expr mult expr mult expr mult expr val div mod val val num i d lparen num expr rparen movementcommand a forward a backward a right a left a size num expr move a num expr colorcommand foreground background color expr color white black red green blue pink cyan yellow magenta grey brown color expr color mix lparen color color rparen jumpcommand jump num expr num expr assigncommand let i d expr declarecommand local global i d expr repeatcommand repeat num expr command ifcommand if bool expr command command command movementcommand jumpcommand colorcommand lparen commandlist rparen repeatcommand ifcommand commandlist command program commandlist fragment a a a fragment b b b fragment c c c fragment d d d fragment e e e fragment f f f fragment g g g fragment h h h fragment I I I fragment j j j fragment k k k fragment l l l fragment m m m fragment n n n fragment o o o fragment p p p fragment q q q fragment r r r fragment s s s fragment t t t fragment u u u fragment v v v fragment w w w fragment x x x fragment y y y fragment z z z fragment alphabet a b c d e f g h i j k l m n o p q r s t u v w x y z forward f d f w d f o r w a r d backward b k b a c k b a c k w a r d right r t r I g h t leave l t l e f t penup p u p e n u p p e n u p pendown p d p e n d o w n p e n d o w n pencolor p c p e n c o l o r p e n c o l o r size s z s I z e if I f I f e l s e I f e l s e I f t h e n e l s e I f t h e n e l s e repeat r e p e a t r p t foreground f g f o r e f o r e g r o u n d background b g b a c k b a c k g r o u n d mod m o d m o d u l o div d I v d I v I d e and a n d or o r true t r u e t false f a l s e f not n o t mix m I x white w h I t e black b l a c k red r e d blue b l u e green g r e e n pink p i n k f u c h s I a f u s c I a f u c h I a yellow y e l l o w cyan c y a n magenta m a g e n t a grey g r e y g r a y brown b r o w n jump j u m p j p local l o c a l global g l o b a l let l e t spawn s p a w n join j o I n yield y I e l d exit e x I t while w h I l e function f u n f u n c t I o n fork f o r k return r e t u r n lparen rparen num 0 9 0 9 e 0 9 i d alphabet alphabet 0 9 newline r n
antlrantlr4
antlr 3 4 error compile to java target
Invalid
I be get a java compile error on a grammar I m use eclipse indigo sr2 and these plugin antlr ide antlr tool v 2 1 2 201108281759 antlr ide stringtemplate tool 1 1 0 201108281759 I be have eclipse place the generate java code in a package antlr generate the build path for antlr generate include antlr 3 4 complete jar here be my grammar entry point 8 swiftmessage block4 10 block4 startblock 4 tag value pair endmessageblock 12 tag value pair newline tag value 16 tag colon 1 9 0 9 a z 18 value colon a z a z 0 9 20 startblock 22 endmessageblock 24 newline n 26 colon here be the generate swiftbugparser code portion of comment ommitte antlr start tag swiftbug g 16 1 tag colon 1 9 0 9 a z public final void tag throw recognitionexception try swiftbug g 16 5 colon 1 9 0 9 a z swiftbug g 16 8 colon 1 9 0 9 a z match input colon follow colon in tag68 matchrange 1 9 first error line 193 matchrange 0 9 second error line 195 swiftbug g 16 32 a z int alt2 2 int la2 0 input la 1 if third error line 201 alt2 1 switch alt2 case 1 swiftbug g if fourth error line 208 input consume state errorrecovery false else mismatchedsetexception mse new mismatchedsetexception null input throw mse break catch recognitionexception re reporterror re recover input re finally do for sure before leave return antlr end tag I be get these four java compilation error description resource path location type the method matchrange char char be undefined for the type swiftbugparser swiftbugparser java swiftmessage antlr generate line 193 java problem the method matchrange char char be undefined for the type swiftbugparser swiftbugparser java swiftmessage antlr generate line 195 java problem syntax error on token expression expect after this token swiftbugparser java swiftmessage antlr generate line 201 java problem syntax error on token expression expect after this token swiftbugparser java swiftmessage antlr generate line 208 java problem
antlrantlr4
mismatchedtreenodeexception when associate action
Invalid
I post this on stackoverflow antlr action when build grammar result in mismatchedtreenodeexception where bart kier respond that it look like an antlr bug the follow work antlr lexer grammar test not low case low case system out println not low case low case a z however the following do not antlr lexer grammar test not low case low case low case a z system out println low case with the follow error can not generate the grammar because syntax error buildnfa mismatchedtreenodeexception 50 29
antlrantlr4
antlr 3 4 javascript target bug
Invalid
antlr 3 3 javascript target be ok antlr 3 4 javascript target generate unusable
antlrantlr4
error declaration do not declare anything
Invalid
the follow grammar part cause error in antlr 3 4 c target when generate code with antr 3 2 everything work properly grammar assignment i d identifier as1 valueassignment as2 typeassignment as3 parameterizedassignment as4 objectclassassignment i d as1 as2 as3 as4 antlr 3 2 generate code the one that work antlr start synpred23 asn1 static void synpred23 asn1 fragment pasn1pars ctx asn1parser valueassignment return as1 undef return type as1 define return type as1 asn1parser valueassignment return home dfranusic antlr c test asn1 g 198 6 as1 valueassignment home dfranusic antlr c test asn1 g 198 6 as1 valueassignment followpush follow valueassignment in synpred23 asn13729 as1 valueassignment ctx followpop if hasexception goto rulesynpred23 asn1ex if hasfaile return this be where rule clean up and exit goto rulesynpred23 asn1ex prevent compiler warning rulesynpred23 asn1ex antlr 3 4 generate code the one that do not work antlr start synpred23 asn1 static void synpred23 asn1 fragment pasn1parser ctx void undef return type define return type void home dfranusic antlr c test asn1 g 198 6 as1 valueassignment home dfranusic antlr c test asn1 g 198 6 as1 valueassignment followpush follow valueassignment in synpred23 asn13729 as1 valueassignment ctx followpop if hasexception goto rulesynpred23 asn1ex if hasfaile return this be where rule clean up and exit goto rulesynpred23 asn1ex prevent compiler warning rulesynpred23 asn1ex
antlrantlr4
support code generation within antlrworks 2
Invalid
antlrwork 2 should provide the ability to generate code for a grammar within the ide
antlrantlr4
compilation error with java 6 on mac osx
Invalid
g day ter and all use today s source march 13 I get javac user michael code antlr4 build src org antlr v4 parse antlrparser java 2412 exception org antlr runtime recognitionexception be never throw in body of correspond try statement javac catch recognitionexception re javac my system be osx 10 6 8 java 1 6 0 29 after fix the above problem the build run smoothly michael
materialcomponentsmaterialcomponentsandroid
color update from 1 10 0 to 1 11 0 many component require android background
Bug
description I have an activity with more fragment after the update from 1 10 0 to 1 11 0 or 1 12 0 beta01 the background color of some component be wrong when I use system color while be correct if I force a color some screenshot what happen after update system color be blue as workaround I set android background android colorbackground to some component in layout but I understand which a wrong way to solve my issue expect behavior here before update source code no change to code android api version 34 test also 33 same result material library version 1 11 0 device avd android 14
materialcomponentsmaterialcomponentsandroid
materialswitch crash occur when call setthumbtintmode on a switch with a thumb icon
Bug
crash java lang runtimeexception unable to start activity componentinfo java lang nullpointerexception attempt to invoke virtual method android graphic drawable drawable android graphic drawable drawable constantstate newdrawable on a null object reference at android app activitythread performlaunchactivity activitythread java 2298 at android app activitythread handlelaunchactivity activitythread java 2360 at android app activitythread access 800 activitythread java 144 at android app activitythread h handlemessage activitythread java 1278 at android os handler dispatchmessage handler java 102 at android os looper loop looper java 135 at android app activitythread main activitythread java 5221 at java lang reflect method invoke native method at java lang reflect method invoke method java 372 at com android internal os zygoteinit methodandargscaller run zygoteinit java 899 at com android internal os zygoteinit main zygoteinit java 694 cause by java lang nullpointerexception attempt to invoke virtual method android graphic drawable drawable android graphic drawable drawable constantstate newdrawable on a null object reference at android graphic drawable layerdrawable childdrawable layerdrawable java 968 at android graphic drawable layerdrawable layerstate layerdrawable java 1014 at android graphic drawable layerdrawable createconstantstate layerdrawable java 135 at android graphic drawable layerdrawable mutate layerdrawable java 932 at androidx core graphic drawable wrappeddrawableapi14 mutate wrappeddrawableapi14 java 233 at androidx appcompat widget switchcompat applythumbtint switchcompat java 754 at androidx appcompat widget switchcompat setthumbtintmode switchcompat java 736 at com google android material materialswitch materialswitch setthumbtintmode materialswitch java 170 at androidx fragment app fragment performcreateview fragment java 3104 at androidx fragment app fragmentstatemanager createview fragmentstatemanager java 524 at androidx fragment app fragmentstatemanager movetoexpectedstate fragmentstatemanager java 261 at androidx fragment app fragmentmanager executeopstogether fragmentmanager java 1890 at androidx fragment app fragmentmanager removeredundantoperationsandexecute fragmentmanager java 1808 at androidx fragment app fragmentmanager execpendingaction fragmentmanager java 1751 at androidx fragment app fragmentmanager dispatchstatechange fragmentmanager java 2976 at androidx fragment app fragmentmanager dispatchactivitycreated fragmentmanager java 2886 at androidx fragment app fragmentcontroller dispatchactivitycreate fragmentcontroller java 263 at androidx fragment app fragmentactivity onstart fragmentactivity java 351 at androidx appcompat app appcompatactivity onstart appcompatactivity java 251 at android app instrumentation callactivityonstart instrumentation java 1220 at android app activity performstart activity java 5953 at android app activitythread performlaunchactivity activitythread java 2261 at android app activitythread handlelaunchactivity activitythread java 2360 at android app activitythread access 800 activitythread java 144 at android app activitythread h handlemessage activitythread java 1278 at android os handler dispatchmessage handler java 102 at android os looper loop looper java 135 at android app activitythread main activitythread java 5221 at java lang reflect method invoke native method at java lang reflect method invoke method java 372 at com android internal os zygoteinit methodandargscaller run zygoteinit java 899 at com android internal os zygoteinit main zygoteinit java 694 source code xml kotlin bind adaptivemodeswitch apply thumbtintlist colorstatelist valueof color red thumbtintmode porterduff mode multiply android api version 21 material library version 1 11 0 device samsung galaxy j1
materialcomponentsmaterialcomponentsandroid
materialshapedrawable cause oom
Bug
description oom with recyclerview with materialcardview expect behavior no oom source code xml layout recyclerview adapter class horizontalnewsadapter private val glide requestmanager private val itemlistener itemlistener filterablelistadapter diffutilnew inner class itemview itemview trendingcardbinde recyclerview viewholder itemview root private val titletxtv materialtextview itemview posttitle private val datetxtv materialtextview itemview posttime private val descriptiontxtv materialtextview itemview postdescription private val featuredimage appcompatimageview itemview postimage full update bind fun bindfull domain wordpresspostdatadomain with domain bindtextdata titledomain formattedtitle formatteddate contentdomain strippedimagetagcontent glide load featuredmediaurl placeholder itemview context restodrawable r drawable logo placeholder centercrop into featuredimage it be advisable to always use interface when work with setonclicklistener in adapter to avoid outdated bind and datum reference pass position and use adapter currentlist position in the activity fragment be well than declare getitem position inside setonclicklistener reference itemview setonclicklistener itemlistener onitemselecte bindingadapterposition partial update bind fun bindpartial bundle bundle bindtextdata bundle getstre diffutilnew arg news title bundle getstre diffutilnew arg news date bundle getstre diffutilnew arg news strip content private fun bindtextdata title string date string description string titletxtv text title datetxtv text date descriptiontxtv text description override fun oncreateviewholder parent viewgroup viewtype int itemview return itemview trendingcardbinde inflate layoutinflater from parent context parent false override fun onbindviewholder holder itemview position int reference onbindviewholder holder holder bindingadapterposition emptylist override fun onbindviewholder holder itemview position int payload list holder apply for most case getbindingadapterposition be use as it provide the most up to date position consider pende change it be also ideal for get datum from getcurrentlist as it return the only position under this specific adapter and not the entire adapter of a concatadapter reference val domain getitem bindingadapterposition if payload isempty payload first be bundle holder bindfull domain full update bind else val bundle payload first as bundle holder bindpartial bundle partial update bind require when sethasstableid be set to true override fun getitemid position int long return currentlist position i d tolong override fun onfilter list list constraint string list todo not yet implement fun interface itemlistener fun onitemselecte position int oom 05 47 18 336 w throw outofmemoryerror fail to allocate a 28 byte allocation with 3984 free byte and 3 kb until oom recursive case 05 47 18 338 w main prio 5 tid 1 runnable 05 47 18 338 w group main scount 0 dscount 0 obj 0x73c04710 self 0x7bce33ba00 05 47 18 338 w systid 3946 nice 6 cgrp default sche 0 0 handle 0x7bd184ffe8 05 47 18 338 w state r schedstat 2083268596 213661445 6688 utm 183 stm 25 core 2 hz 100 05 47 18 338 w stack 0x7fd8420000 0x7fd8422000 stacksize 8 mb 05 47 18 338 w hold mutexe mutator lock share hold 05 47 18 338 w at com google android material shape materialshapedrawable materialshapedrawable java 126 05 47 18 338 w at com google android material shape materialshapedrawable materialshapedrawable java 222 05 47 18 338 w at com google android material shape materialshapedrawable materialshapedrawable java 213 05 47 18 338 w at com google android material card materialcardviewhelper materialcardviewhelper java 143 05 47 18 338 w at com google android material card materialcardview materialcardview java 174 05 47 18 338 w at com google android material card materialcardview materialcardview java 160 05 47 18 338 w at java lang reflect constructor newinstance native method 05 47 18 338 w at android view layoutinflater createview layoutinflater java 619 05 47 18 338 w at android view layoutinflater createviewfromtag layoutinflater java 764 05 47 18 338 w at android view layoutinflater createviewfromtag layoutinflater java 704 05 47 18 338 w at android view layoutinflater inflate layoutinflater java 492 05 47 18 338 w at android view layoutinflater inflate layoutinflater java 423 05 47 18 338 w at com sample app databinding trendingcardbinding inflate trendingcardbinde java 59 05 47 18 338 w at com sample app presentation adapter horizontalnewsadapter oncreateviewholder horizontalnewsadapter kt 98 05 47 18 338 w at com sample app presentation adapter horizontalnewsadapter oncreateviewholder horizontalnewsadapter kt 40 05 47 18 338 w at androidx recyclerview widget recyclerview adapter createviewholder recyclerview java 7788 05 47 18 338 w at androidx recyclerview widget recyclerview recycler trygetviewholderforpositionbydeadline recyclerview java 6873 05 47 18 338 w at androidx recyclerview widget recyclerview recycler getviewforposition recyclerview java 6757 05 47 18 338 w at androidx recyclerview widget recyclerview recycler getviewforposition recyclerview java 6753 05 47 18 338 w at androidx recyclerview widget linearlayoutmanag layoutstate next linearlayoutmanager java 2362 05 47 18 338 w at androidx recyclerview widget linearlayoutmanag layoutchunk linearlayoutmanager java 1662 05 47 18 338 w at androidx recyclerview widget linearlayoutmanager fill linearlayoutmanager java 1622 05 47 18 338 w at androidx recyclerview widget linearlayoutmanag onlayoutchildren linearlayoutmanager java 687 05 47 18 338 w at androidx recyclerview widget recyclerview dispatchlayoutstep2 recyclerview java 4645 05 47 18 338 w at androidx recyclerview widget recyclerview onmeasure recyclerview java 4022 05 47 18 338 w at android view view measure view java 18788 05 47 18 338 w at android view viewgroup measurechildwithmargin viewgroup java 5951 05 47 18 338 w at androidx appcompat widget linearlayoutcompat measurechildbeforelayout linearlayoutcompat java 1401 05 47 18 338 w at androidx appcompat widget linearlayoutcompat measurevertical linearlayoutcompat java 685 05 47 18 338 w at androidx appcompat widget linearlayoutcompat onmeasure linearlayoutcompat java 575 05 47 18 338 w at android view view measure view java 18788 05 47 18 338 w at android view viewgroup measurechildwithmargin viewgroup java 5951 05 47 18 338 w at androidx appcompat widget linearlayoutcompat measurechildbeforelayout linearlayoutcompat java 1401 05 47 18 338 w at androidx appcompat widget linearlayoutcompat measurevertical linearlayoutcompat java 685 05 47 18 338 w at androidx appcompat widget linearlayoutcompat onmeasure linearlayoutcompat java 575 05 47 18 338 w at android view view measure view java 18788 05 47 18 338 w at androidx core widget nestedscrollview measurechildwithmargin nestedscrollview java 1921 05 47 18 338 w at android widget framelayout onmeasure framelayout java 194 05 47 18 338 w at androidx core widget nestedscrollview onmeasure nestedscrollview java 640 05 47 18 338 w at android view view measure view java 18788 05 47 18 338 w at android view viewgroup measurechildwithmargin viewgroup java 5951 05 47 18 338 w at androidx coordinatorlayout widget coordinatorlayout onmeasurechild coordinatorlayout java 760 05 47 18 338 w at com google android material appbar headerscrollingviewbehavior onmeasurechild headerscrollingviewbehavior java 100 05 47 18 338 w at com google android material appbar appbarlayout scrollingviewbehavior onmeasurechild appbarlayout java 2348 05 47 18 338 w at androidx coordinatorlayout widget coordinatorlayout onmeasure coordinatorlayout java 831 05 47 18 338 w at android view view measure view java 18788 05 47 18 338 w at android view viewgroup measurechildwithmargin viewgroup java 5951 05 47 18 338 w at android widget framelayout onmeasure framelayout java 194 05 47 18 338 w at androidx appcompat widget contentframelayout onmeasure contentframelayout java 145 05 47 18 338 w at android view view measure view java 18788 05 47 18 338 w at android view viewgroup measurechildwithmargin viewgroup java 5951 05 47 18 338 w at android widget linearlayout measurechildbeforelayout linearlayout java 1465 05 47 18 338 w at android widget linearlayout measurevertical linearlayout java 748 05 47 18 338 w at android widget linearlayout onmeasure linearlayout java 630 05 47 18 338 w at android view view measure view java 18788 05 47 18 338 w at android view viewgroup measurechildwithmargin viewgroup java 5951 05 47 18 338 w at android widget framelayout onmeasure framelayout java 194 05 47 18 338 w at android view view measure view java 18788 05 47 18 338 w at android view viewgroup measurechildwithmargin viewgroup java 5951 05 47 18 338 w at android widget linearlayout measurechildbeforelayout linearlayout java 1465 05 47 18 338 w at android widget linearlayout measurevertical linearlayout java 748 05 47 18 338 w at android widget linearlayout onmeasure linearlayout java 630 05 47 18 338 w at android view view measure view java 18788 05 47 18 338 w at android view viewgroup measurechildwithmargin viewgroup java 5951 05 47 18 338 w at android widget framelayout onmeasure framelayout java 194 05 47 18 338 w at com android internal policy phonewindow decorview onmeasure phonewindow java 2643 05 47 18 338 w at android view view measure view java 18788 05 47 18 338 w at android view viewrootimpl performmeasure viewrootimpl java 2100 05 47 18 338 w at android view viewrootimpl measurehierarchy viewrootimpl java 1216 05 47 18 338 w at android view viewrootimpl performtraversal viewrootimpl java 1452 05 47 18 338 w at android view viewrootimpl dotraversal viewrootimpl java 1107 05 47 18 338 w at android view viewrootimpl traversalrunnable run viewrootimpl java 6013 05 47 18 338 w at android view choreographer callbackrecord run choreographer java 858 05 47 18 338 w at android view choreographer docallback choreographer java 670 05 47 18 338 w at android view choreographer doframe choreographer java 606 05 47 18 338 w at android view choreographer framedisplayeventreceiver run choreographer java 844 05 47 18 338 w at android os handler handlecallback handler java 739 05 47 18 338 w at android os handler dispatchmessage handler java 95 05 47 18 338 w at android os looper loop looper java 148 05 47 18 338 w at android app activitythread main activitythread java 5417 05 47 18 338 w at java lang reflect method invoke native method 05 47 18 338 w at com android internal os zygoteinit methodandargscaller run zygoteinit java 726 05 47 18 338 w at com android internal os zygoteinit main zygoteinit java 616 05 47 18 338 w minimal sample app repro n a android api version n a material library version n a sorry can t remember when this crash due to oom happen I keep this log long ago to submit a report but forget to do so but surely before or during v1 10 0 device n a
materialcomponentsmaterialcomponentsandroid
slider small indicator should be flatten not cut off
Bug
material library version 1 12 0 beta01
materialcomponentsmaterialcomponentsandroid
progressindicator ccw circularprogressindicator be break on api 29
Bug
material library version 1 12 0 beta01 device api 29 emulator build qsr1 190920 001 reproduce huawei p smart 2019 pot lx1 build qp1a 190711 020 reproduce api 28 emulator build psr1 180720 117 not reproduce api 30 emulator build rsr1 201013 001 not reproduce
materialcomponentsmaterialcomponentsandroid
progressindicator track in circularprogressindicator doesn t close smoothly
Bug
material library version 1 12 0 beta01
materialcomponentsmaterialcomponentsandroid
button vertical bar apper and go on the right of button and textview s
Bug
this be a very strange behavior I m use bottom navigation and in one of the fragment fa there be a button when the fragment be show for the first time everything be normal when we use bottom navigation to other fragment and then back to the fa a vertical bar appear on the right of the button and then disappear in 3 second this happen to button only with style use widget materialcomponent button outlinedbutton as parent style elevate be behave as expect this be the style that the button use expect behavior button submit 1 button submit 2 source code the code snippet which be cause this issue this be the button android api version minsdk 29 compilesdk 34 material library version material 1 11 0 device test on android 11 12 device and android 14 emulator
materialcomponentsmaterialcomponentsandroid
bottom sheet weird animation when dismiss modal bottom sheet with back button gesture on 1 10 0
Bug
hi there be weird animation artifact introduce on 1 10 0 I think it be relate to add predictive back press it only happen if you use back button or gesture to dismiss dismissing when tap outside be not affect as you can see on 1 10 0 there be some sort of artifact as it be disappear animation seem to stop and repeat a bit just as about to finish video from 1 9 0 video from 1 10 0
materialcomponentsmaterialcomponentsandroid
button max width of button from component source code be not be respect
Bug
description accord to the source code material button should be 320dp maximum by default but this not actually work this cause warning in android studio l20 l39 the warning can be suppress with tool ignore visuallintbuttonsize but it would be well to fix the component to behave as specify in the source material library version 1 11
materialcomponentsmaterialcomponentsandroid
materialtoolbar subtitle be cut off when font size be increase via accessibility option
Bug
description when the font size be increase via the system accessibility setting fontscale then the subtitle be be cutoff on the bottom despite use wrap content on the toolbar screenshot from 2024 03 14 16 15 47 screenshot from 2024 03 14 16 15 22 screenshot from 2024 03 14 16 21 17 expect behavior toolbar should grow in height and keep the default padding and center the title subtitle combo source code l8 l194 android api version afaik all version I test on android 13 and 14 material library version 1 11 0 device pixel 6 and other
materialcomponentsmaterialcomponentsandroid
slider stop indicator have the incorrect style near the handle sometimes
Bug
detail device resolution 1080x2400px 411x914dp slider size 996x126px 379x48dp slider configuration android valuefrom 0 android valueto 100 android stepsize 1 app tickvisible true material library version 22de817
materialcomponentsmaterialcomponentsandroid
slider label style doesn t meet m3 spec
Bug
m3 spec ed715338 b9b5 4971 ae5f 50d705e62b9e current style 22de817 l77 l83
materialcomponentsmaterialcomponentsandroid
slider incorrect slider label behavior inside viewpager
Bug
description when swipe the viewpager to a page with a slider with labelbehavior visible a label appear but it shouldn t be there until the slider be visible see video start from 00 13 material library version 1 12 0 alpha03
materialcomponentsmaterialcomponentsandroid
search bar hide navigation icon crashing application
Bug
description I be use material 1 11 0 and when I set app hidenavigationicon true it crash the application stacktrace java lang nullpointerexception attempt to invoke virtual method android graphic drawable drawable constantstate android graphic drawable drawable getconstantstate on a null object reference at com google android material internal fadethroughdrawable fadethroughdrawable java 46 at com google android material search searchview updatenavigationiconifneede searchview java 469 at com google android material search searchview setupwithsearchbar searchview java 565 at com signinghub nd ui fragment locale localesearchfragment setupui localesearchfragment kt 65 at com signinghub nd ui fragment locale localesearchfragment onviewcreate localesearchfragment kt 46 at androidx fragment app fragment performviewcreate fragment java 3147 at androidx fragment app fragmentstatemanager createview fragmentstatemanager java 588 at androidx fragment app fragmentstatemanager movetoexpectedstate fragmentstatemanager java 272 at androidx fragment app fragmentmanager executeopstogether fragmentmanager java 1943 at androidx fragment app fragmentmanager removeredundantoperationsandexecute fragmentmanager java 1845 at androidx fragment app fragmentmanager execpendingaction fragmentmanager java 1782 at androidx fragment app fragmentmanager 5 run fragmentmanager java 565 at android os handler handlecallback handler java 942 at android os handler dispatchmessage handler java 99 at android os looper looponce looper java 226 at android os looper loop looper java 313 at android app activitythread main activitythread java 8762 at java lang reflect method invoke native method at com android internal os runtimeinit methodandargscaller run runtimeinit java 604 at com android internal os zygoteinit main zygoteinit java 1067 expect behavior the app should not crash and icon should hide source code android api version android 13 material library version material 1 11 0 device samsung device and I believe it will crash on other device as well
materialcomponentsmaterialcomponentsandroid
textfilde bad gravity
Bug
bad gravity to text prfex
materialcomponentsmaterialcomponentsandroid
com google android material appbar headerscrollingviewbehavior onmeasurechild
Bug
description java lang nullpointerexception attempt to read from field androidx recyclerview widget viewinfostore androidx recyclerview widget recyclerview mviewinfostore on a null object reference expect behavior screenshot and or description of expect behavior to appear the recycler view and the list of element source code the code snippet which be cause this issue no reference to any class in my project in the stacktrace exception java lang nullpointerexception attempt to read from field androidx recyclerview widget viewinfostore androidx recyclerview widget recyclerview mviewinfostore on a null object reference at androidx recyclerview widget recyclerview layoutmanager addviewint recyclerview java 9402 at androidx recyclerview widget recyclerview layoutmanager addview recyclerview java 9388 at androidx recyclerview widget recyclerview layoutmanager addview recyclerview java 9375 at androidx recyclerview widget linearlayoutmanager layoutchunk linearlayoutmanager java 1676 at androidx recyclerview widget linearlayoutmanager fill linearlayoutmanager java 1622 at androidx recyclerview widget linearlayoutmanag onlayoutchildren linearlayoutmanag java 687 at androidx recyclerview widget recyclerview dispatchlayoutstep2 recyclerview java 4645 at androidx recyclerview widget recyclerview onmeasure recyclerview java 4022 at android view view measure view java 27131 at android view viewgroup measurechildwithmargin viewgroup java 7951 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 27131 at androidx core widget nestedscrollview measurechildwithmargin nestedscrollview java 1792 at android widget framelayout onmeasure framelayout java 194 at androidx core widget nestedscrollview onmeasure nestedscrollview java 627 at android view view measure view java 27131 at androidx swiperefreshlayout widget swiperefreshlayout onmeasure swiperefreshlayout java 641 at android view view measure view java 27131 at android view viewgroup measurechildwithmargin viewgroup java 7951 at android widget framelayout onmeasure framelayout java 194 at android view view measure view java 27131 at android view viewgroup measurechildwithmargin viewgroup java 7951 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 27131 at android widget scrollview measurechildwithmargin scrollview java 2362 at android widget framelayout onmeasure framelayout java 194 at android widget scrollview onmeasure scrollview java 701 at android view view measure view java 27131 at android view viewgroup measurechildwithmargin viewgroup java 7951 at android widget framelayout onmeasure framelayout java 194 at android view view measure view java 27131 at android view viewgroup measurechildwithmargin viewgroup java 7951 at android widget framelayout onmeasure framelayout java 194 at android view view measure view java 27131 at android view viewgroup measurechildwithmargin viewgroup java 7951 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 27131 at android view viewgroup measurechildwithmargin viewgroup java 7951 at androidx coordinatorlayout widget coordinatorlayout onmeasurechild coordinatorlayout java 760 at com google android material appbar headerscrollingviewbehavior onmeasurechild headerscrollingviewbehavior java 99 at com google android material appbar appbarlayout scrollingviewbehavior onmeasurechild appbarlayout java 2122 at androidx coordinatorlayout widget coordinatorlayout onmeasure coordinatorlayout java 831 at android view view measure view java 27131 at android view viewgroup measurechildwithmargin viewgroup java 7951 at android widget framelayout onmeasure framelayout java 194 at androidx appcompat widget contentframelayout onmeasure contentframelayout java 145 at android view view measure view java 27131 at android view viewgroup measurechildwithmargin viewgroup java 7951 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 27131 at android view viewgroup measurechildwithmargin viewgroup java 7951 at android widget framelayout onmeasure framelayout java 194 at android view view measure view java 27131 at android view viewgroup measurechildwithmargin viewgroup java 7951 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 27131 at android view viewgroup measurechildwithmargin viewgroup java 7951 at android widget framelayout onmeasure framelayout java 194 at com android internal policy decorview onmeasure decorview java 1175 at android view view measure view java 27131 at android view viewrootimpl performmeasure viewrootimpl java 4187 at android view viewrootimpl measurehierarchy viewrootimpl java 2936 at android view viewrootimpl performtraversal viewrootimpl java 3204 at android view viewrootimpl dotraversal viewrootimpl java 2618 at android view viewrootimpl traversalrunnable run viewrootimpl java 9971 at android view choreographer callbackrecord run choreographer java 1010 at android view choreographer docallback choreographer java 809 at android view choreographer doframe choreographer java 744 at android view choreographer framedisplayeventreceiver run choreographer java 995 at android os handler handlecallback handler java 938 at android os handler dispatchmessage handler java 99 at android os looper loop looper java 246 at android app activitythread main activitythread java 8653 at java lang reflect method invoke at com android internal os runtimeinit methodandargscaller run runtimeinit java 602 at com android internal os zygoteinit main zygoteinit java 1130 android api version several version affect from 25 to 34 material library version 1 3 0 device several device huawey xaomi samsung 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
autocompletetextview dialog dropdown trigger without touch autocompletetextview
Bug
description I have implement an dropdown view as per documentation inside a materialdialog however even though I don t touch the autocompletetextview the dropdown be trigger expect behavior trigger dropdown only when touch minimal sample app repro android api version google pixel 6 with api 32 material library version 1 11 0 device google pixel 6 it be not clearly visible on the record but I m not touch the textinputlayout I m press and touching outside of the dialog
materialcomponentsmaterialcomponentsandroid
materialtoolbar title not mark as head for accessibility
Bug
expect behavior the title textview of the toolbar should be mark as a heading so screen reader describe it as so source code android api version any material library version any device any
materialcomponentsmaterialcomponentsandroid
slider always visible label still show up when hide its fragment
Bug
description when use version 1 11 0 a slider with app labelbehavior visible present a bug on scroll the label do not follow the new position of the slider this bug be document here when move to a different fragment the slider label of the former fragment be no long visible when use version 1 12 0 alpha03 the issue be fix but when I hide a fragment and show another one under the same fragmentmanager the slider label of the first fragment be not hide and still show up show fragment of tab setup 1 label position follow slider position on scroll as expect label scroll fix show fragment of tab setup 2 but also the label of the setup 1 fragment be visible label still visible when change fragment expect behavior when hide a fragment also the slider label should be hide source code I know that instead of add all the fragment and hiding show they maybe I could use replace but in version 1 11 0 when hide a fragment even the label be hide as expect so a bug be introduce in the alpha release childfragmentmanager commit setreorderingallowe true add r i d call setup fragment container callsetupfragment 0 setup1 add r i d call setup fragment container callsetupfragment 1 setup2 hide callsetupfragment 1 add r i d call setup fragment container callsetupfragment 2 setup3 hide callsetupfragment 2 add r i d call setup fragment container callsetupfragment 3 setup4 hide callsetupfragment 3 bind callsetuptab addontabselectedlistener object tablayout ontabselectedlistener override fun ontabselecte tab tablayout tab childfragmentmanager commit tab let show callsetupfragment it position override fun ontabunselecte tab tablayout tab childfragmentmanager commit tab let hide callsetupfragment it position override fun ontabreselecte tab tablayout tab 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 34 material library version 1 12 0 alpha03 device xiaomi pad 6 and samsung galaxy tabs5e edit I try also the late snapshot version 1 12 0 snapshot and can confirm that the issue be still present
materialcomponentsmaterialcomponentsandroid
slider unclear redesign spec
Bug
description hi I be happy that a new slider design be release but I find many unclear and contradictory detail in the design spec and result unclear detail in the 1 12 0 alpha03 implementation I already think about give feedback to the design team but there seem to be no easy way to do that so as the material android team also have connection to the designer and because the unclear guideline also affect the mdc implementation I hope this issue can lead to improve spec and thus an improved implementation issue in the spec spec in the new spec table ac9f6c26 b539 41c2 bf9e c9daa0d116c2 be a bit confusing duplicate token with different name unclear naming token with unclear usage e g what be enable label text and why be it set to onprimary if it would refer to the rounded label display while the handle be drag onprimary would be an incorrect value another example what be enable slider with tick mark container size and all other container token slider doesn t have a container I think stop indicator be suppose to offer enough contrast at the end of the slider but with color role primary should not be place on primarycontainer and for active stop indicator primarycontainer on primary as the container color switch in dynamic contrast and become very similar to primary which destroy the contrast I think only onprimarycontainer should be place on primarycontainer to preserve contrast in all dynamic contrast variation otherwise the color alpha combination of both tick mark and stop indicator should be test in all contrast state to make sure it look good at the moment it only look correct in the default contrast level in medium and high it s not very accessible screenshot 20240209 171906 screenshot 20240209 171916 distance from track start end to the first last tick mark vary in every illustration dimension spec mention 4dp but in a lot of the image the dot be center in the corner radius which would be more than 4dp some image show both distance variantion at the same time with one slider use 4dp and another have a center tick mark or in the dimension sheet 2bd5bf17 77fb 4e1f 81ce b3a105d63bff the left image show the 4dp distance and the right image have a center tick mark lqbz9nqd 1p slider layout example result issue in the implementation instead of 4dp distance the position of the first last tick be calculate with corner radius which result in a radius center tick where the spec currently mention 4dp as distance default stop indicator color result in very low contrast in different dynamic contrast mode see previous screenshot default tick size be incorrect in the spec table stop indicator refer to all tick mark if I understand it correctly so instead of 2dp the tick would also be 4dp in size would be glad if the new guideline could get review and fix improve so that the implementation and default color dimen be more clear expect behavior up to the design team to decide material library version 1 12 0 alpha03
materialcomponentsmaterialcomponentsandroid
materialalertdialogbuilder automatic resizing of materialalertdialogbuilder height when the keyboard be open
Bug
description I have build a custom dialog with materialalertdialogbuilder the dialog have 2 textinputlayout the problem be when I try to write something in the textinputedittext and when the keyboard be visible the materialalertdialogbuilder shrink in height expect behavior I want to prevent automatic resizing of materialalertdialogbuilder height when the keyboard be open source code in xml xml in kotlin kt materialalertdialogbuilder this tosbiactivity setview view settitle setpositivebutton apply dialog dialog dismiss setnegativebutton cancel dialog dialog dismiss show android api version 33 material library version 1 11 0 device symphony i69 display 5 7 1440 x 720 pixel screen record device screen information 91702d09 2b4a 407b 8885 6805b96e0ad6 note this bug be for screen size the bug be not visible on large screen size device but this bug be not find in alertdialog builder in same design and same screen size
materialcomponentsmaterialcomponentsandroid
catalog carousel catalog app crash
Bug
description the catalog app crash 1 select 2 9 from the expose dropdown menu screenshot 20240207 215456 2 rotate the device screenshot 20240207 215511 3 scroll the carousel to the end expect behavior the catalog app doesn t crash minimal sample app repro catalog app multibrowsecarouseldemofragment herocarouseldemofragment and uncontainedcarouseldemofragment android api version 34 material library version 1 12 0 alpha03 device emulator 32 1 15 api 32
materialcomponentsmaterialcomponentsandroid
divid wrong divider color
Bug
description divider divider color refer to attr coloroutlinevarient but in doc it s refer to attr coloroutline fix
materialcomponentsmaterialcomponentsandroid
autocompletetextview dropdown selection cut off
Bug
in my dropdown selection if the text be long and it need to exceed 1 line it just cut the text image pixel 4xl my selection layout be I have try add various thing like android singleline false android maxline 3 etc nothing seem to be work
materialcomponentsmaterialcomponentsandroid
chip chip s close button work too wide
Bug
why do the trigger area of the close button occupy textendpadding if the text of my clip be a single text then the clickable range of the clip be only a little bit on the text side even if I widen the textpadding it will not work snipaste 2024 01 31 11 52 57
materialcomponentsmaterialcomponentsandroid
last tabitem render error
Bug
description as show in the figure several tablayout be create in the demo and the background of rounded rectangle be set for tablayout and tabitem but the last tabitem display abnormally and the rounded rectangle on the right be cut expect behavior render normal source code layout xml file shape bg ffffff 15 corner 18 xml shape full tab indicator xml android api version 33 material library version 1 11 0 device pixel 7pro image
materialcomponentsmaterialcomponentsandroid
date picker text input mode cursor should be position at end of text field
Bug
description in version 1 9 0 when opening datepicker with text input mode and a default selection the cursor be position at the end screenshot 1705689616 since version 1 10 0 it be position at the beginning screenshot 1705689939 expect behavior for usability it be preferable to position cursor at the end since in order to delete the default selection user must now change cursor position first minimal sample app repro the issue can be reproduce with the catalog app date picker set default selection to today and input mode to text input the problem seem to have be introduce with commit 4032a741127b4715c3bbcd4cab08494b39ae5bdb android api version api 32 material library version since 1 10 0 device emulator
materialcomponentsmaterialcomponentsandroid
textinputlayout starticondrawable overlap text
Bug
description starticondrawable in textinputlayout in recyclerview viewholder overlap text if item do not fit on the screen without scroll viewholder be create later not when screen be just open text be display correctly after scroll to top or after minimize the app expect behavior starticondrawable do not overlap text source code minimal sample app repro android api version api 29 material library version 1 11 0 device honor 20 pro
materialcomponentsmaterialcomponentsandroid
datepicker calendar date come in marathi language when we change locale to marathi
Bug
description after set locale mr marathi language the date be show in marathi this same issue happen in bengali too for locale bn expect behavior the date should come in english only not in base on current locale source code add below code in oncreate of mainactivity and run the app link l49 locale mylocale new locale mr for bengali set bn resource re getresource displaymetric dm re getdisplaymetric configuration conf re getconfiguration conf locale mylocale re updateconfiguration conf dm onconfigurationchange conf android api version api 34 material library version 1 9 0 device emulator pixel 2 api 33 here be the proof of issue expect in hindi language unexpected in marathi screenshot 20240115 121358 screenshot 20240115 121538
materialcomponentsmaterialcomponentsandroid
navigationrailview start inset use the system bar instead of the display cutout
Bug
description the navigation rail apply start inset base on the system bar this result in the rail appear behind display cutout expect behavior apply start inset base on the display cutout source code l216 minimal sample app repro android api version api 34 material library version 1 10 0 the bug be introduce with this commit device samsung galaxy s21 and google pixel 7 both run their late stable software update as of 1 11 24
materialcomponentsmaterialcomponentsandroid
slider state layer be inconsistent
Bug
description the slider state layer be inconsistent android 13 api 33 screenshot 20240111 111017 android 12l api 32 screenshot 20240111 105205 android 14 api 34 screenshot 20240111 105303 expect behavior the slider state layer be consistent minimal sample app repro catalog app android api version 34 material library version 1 12 0 alpha03 device emulator 32 1 15 api 33
materialcomponentsmaterialcomponentsandroid
textfield disable hint prevent custom defaulthinttextcolor
Bug
description I want to have textfield with disabled float hint but with custom hint color for when the textfield be empty let say I have a textfield with float hint enable I use setdefaulthinttextcolor to change the hint color it work and change the color for expand and collapse now I call sethintenable false the float hint get disabled expand but I still see the hint collapse when there be no text which be what I want however I loose the custom color I set with setdefaulthinttextcolor for when there be no text expect behavior screenshot and or description of expect behavior the setdefaulthinttextcolor to be preserve while use sethintenable false 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 13 11 10 material library version 1 11 0 device emulator real device
materialcomponentsmaterialcomponentsandroid
searchview bad layout
Bug
screenshot 2024 01 08 13 28 31 856 ninja coder ghostemane code hello I be use version 1 11 0 as you can see in the picture the icon be not the same as the text and it do not look good
materialcomponentsmaterialcomponentsandroid
topappbar there be no method to change lift on scroll color programmatically
Bug
description I m create an application create widget programmatically I want to change the lift on scroll color but unfortunately there be no such method expect behavior can not provide the screenshot source code no minimal sample app repro no android api version 30 material library version 1 11 0 device on every device
materialcomponentsmaterialcomponentsandroid
menu context menu background color be strange
Bug
description the context menu background color be strange menumaindemofragment screenshot 20231231 102408 the context menu background color will be correct if some preference be change screenshot 20231231 102527 test2 screenshot 20240108 221911 the context menu background color will be correct if the activity be recreate screenshot 20240108 221921 expect behavior the context menu background color be correct minimal sample app repro catalog app menumaindemofragment and test2 zip android api version 34 material library version 1 12 0 alpha02 device emulator 32 1 15 api 32 33 and 34
materialcomponentsmaterialcomponentsandroid
timepicker can not type in specific value in hour and minute field
Bug
description 9abf67ef 7f88 4976 961d 3f8a43de5f25 there be two primary method for select time with the mobile time picker people can type in a specific value in the hour and minute field select the hour or minute field from the text input and adjust the clock dial to simultaneously change the corresponding time field above but we can not type in a specific value in the hour and minute field expect behavior we can type in a specific value in the hour and minute field or update the spec minimal sample app repro catalog app timepickermaindemofragment android api version 34 material library version 1 12 0 alpha02 device emulator 32 1 15 api 32
materialcomponentsmaterialcomponentsandroid
not round corner last version
Bug
hello I be use the late version of the material library but the corner of the dialog be not round I also apply the style correctly device xiaomi 10c android 13 I use another library and there be no problem
materialcomponentsmaterialcomponentsandroid
datepicker datepicker layout be break
Bug
description when the font size be large the datepicker layout be break font size be default screenshot 20231227 221730 font size be large screenshot 20231227 221808 expect behavior the datepicker layout be not break one solution be to lay out the outlined text field vertically screenshot 20231227 221925 minimal sample app repro catalog app datepickermaindemofragment android api version 34 material library version 1 12 0 alpha02 device emulator 32 1 15 api 32
materialcomponentsmaterialcomponentsandroid
datepicker fullscreen datepicker be not fullscreen
Bug
description the fullscreen datepicker be not fullscreen screenshot 20231226 111012 screenshot 20231226 111026 screenshot 20240106 193957 expect behavior the fullscreen datepicker be fullscreen screenshot 20231226 111108 screenshot 20231226 111119 screenshot 20240106 194327 minimal sample app repro catalog app datepickermaindemofragment android api version 34 material library version 1 12 0 alpha02 device emulator 32 1 15 api 32
materialcomponentsmaterialcomponentsandroid
toolbar navigationicontint work differently in android 5
Bug
description full description of issue here expect behavior in android 5 the tint only affect certain layer which be our preferred behavior in android 6 and above the tint change the whole color of navigation icon source code this be the drawable of navigation icon which use layer and resource qualifier of day and night dynamic day and night color toolbar theme usage android api version 5 material library version 1 11 0 device pixel emulator
materialcomponentsmaterialcomponentsandroid
catalog bottomsheet foreground color of status bar change if bottom sheet be open multiple time
Bug
description the foreground color of the status bar change if the bottom sheet be open multiple time first time screenshot 20231219 123457 second time screenshot 20231219 123508 expect behavior the foreground color of the status bar doesn t change even if the bottom sheet be open multiple time I think it s well to use bottomsheetdialogfragment 3600 minimal sample app repro catalog app android api version 34 material library version 1 12 0 alpha02 device emulator 32 1 15 api 32
materialcomponentsmaterialcomponentsandroid
version 1 11 0 android studio layout preview break
Bug
description version 1 11 0 of material 3 library break android studio layout preview with app which use the theme theme material3 dynamiccolor daynight which work fine with previous version expect behavior bug theme material3 daynight still work but I prefer theme material3 dynamiccolor daynight as it give more contrast color scheme render problem get render problem error while use theme material3 dynamiccolor daynight such as java lang numberformatexception color value android color system primary dark have wrong size format be either aarrggbb rrggbb rgb or argb java lang numberformatexception color value android color system primary light have wrong size format be either aarrggbb rrggbb rgb or argb android api version android api version here 34 material library version material android library version you be use here e g 1 1 0 alpha07 version 1 11 0
materialcomponentsmaterialcomponentsandroid
material3 color version 1 11 0 component do not respect the system color
Bug
hi I be use version 1 10 0 and it work perfect my device be a samsung s22 ultra with one ui 6 android 14 so my accent color be a brownish color and with the version 1 10 0 material component be also match to that color today I update to version 1 11 0 and suddenly the component doesn t respect my system accent color material component be in a color of blue or something look like the app identify the primarycolor as light blue how be this possible also I be use the android 14 emulator and this be not happen in that happen only on my device here be two screenshot be this an issue on my end if it be could you point I a way to fix this 1 10 0 this one be with 1 10 0 1 11 0 this one be with 1 11 0
materialcomponentsmaterialcomponentsandroid
carousel materialbutton wrap in maskableframelayout doesn t draw its icon
Bug
description materialbutton do not draw its icon when in a carousel see image below I m assume this have something to do with maskableframelayout image expect behavior same layout wrap in a normal framelayout image source code android api version 32 material library version 1 12 0 alpha02 1 11 0 rc01 device pixel 3 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
textfield placeholder that be too long break the component
Bug
material library version 1 12 0 alpha01
materialcomponentsmaterialcomponentsandroid
textfield textinputlayout app crash with cause by java lang illegalargumentexception this component require that you specify a valid textappearance attribute update your app theme to inherit from theme materialcomponent or a descendant
Bug
device be google emulator api 33 and use same material component theme for activity as well as app I try by add android textappearance style textappearance materialcomponent body1 this line of code but same isseue be repeat please check code be
materialcomponentsmaterialcomponentsandroid
textinputlayout wrong hint placement in 1 11 0 rc01
Bug
from android preview textinputlayout hint be misplace under start icon this may happen as well at runtime for a few frame when component be draw on screen image material library version 1 11 0 rc01 textinputlayout zip
materialcomponentsmaterialcomponentsandroid
material 1 9 0 android resource link fail after update to 1 9 0
Bug
description I m migrate from 1 5 0 to 1 9 0 and when I start make the project and I m get android resource linking fail error resource style shapeappearanceoverlay aka my company style shapeappearanceoverlay not find error fail link reference I try 1 7 0 1 80 and the same error I try 1 6 0 and build with no problem I search in the whole project for shapeappearanceoverlay and delete everything relate with the overlay hop it will fix the issue but be persist even try with 1 10 0 same error
materialcomponentsmaterialcomponentsandroid
timepicker japanese translation be not good
Bug
description the japanese translation be not good screenshot 20231121 183813 expect behavior screenshot 20231121 215158 android app timepickerdialog screenshot 20231121 184925 minimal sample app repro catalog app timepickermaindemofragment android api version 34 material library version 1 12 0 alpha01 device emulator 32 1 15 api 32
materialcomponentsmaterialcomponentsandroid
bottomsheetbehavior java lang classnotfoundexception didn t find class android view roundedcorner
Bug
description try to mock bottomsheetbehavior in com google android material material 1 10 0 throw a classnotfoundexception minimal sample app repro just pull the project and run randomunitt to reproduce android api version work on api 30 but break on api 29 material library version 1 10 0 stack trace underlie exception java lang illegalargumentexception could not create type at com example roundedcornererror randomunitt noclassfound randomunittest java 16 32 trim cause by java lang illegalargumentexception could not create type at net bytebuddy typecache findorinsert typecache java 170 at net bytebuddy typecache withinlineexpunction findorinsert typecache java 399 at net bytebuddy typecache findorinsert typecache java 190 at net bytebuddy typecache withinlineexpunction findorinsert typecache java 410 at org mockito internal creation bytebuddy typecachingbytecodegenerator mockclass typecachingbytecodegenerator java 75 at org mockito internal creation bytebuddy subclassbytebuddymockmaker createmocktype subclassbytebuddymockmaker java 77 at org mockito internal creation bytebuddy subclassbytebuddymockmaker createmock subclassbytebuddymockmaker java 43 at org mockito android internal creation androidbytebuddymockmaker createmock androidbytebuddymockmaker java 39 at org mockito internal util mockutil createmock mockutil java 99 at org mockito internal mockitocore mock mockitocore java 88 at org mockito mockito mock mockito java 2101 at org mockito mockito mock mockito java 2016 34 more cause by java lang noclassdeffounderror fail resolution of landroid view roundedcorner at java lang reflect executable getparametertypesinternal native method at java lang reflect method getparametertype method java 186 at java lang class getdeclaredmethod class java 1884 at net bytebuddy description method methodlist forloadedmethod methodlist java 152 at net bytebuddy description type typedescription forloadedtype getdeclaredmethod typedescription java 8940 at net bytebuddy description type typedescription generic ofnongenerictype getdeclaredmethod typedescription java 3711 at net bytebuddy description type typedescription generic lazyprojection getdeclaredmethod typedescription java 6210 at net bytebuddy dynamic scaffold subclass constructorstrategy default 5 doextractconstructor constructorstrategy java 175 at net bytebuddy dynamic scaffold subclass constructorstrategy default extractconstructor constructorstrategy java 196 at net bytebuddy dynamic scaffold subclass subclassdynamictypebuilder applyconstructorstrategy subclassdynamictypebuilder java 242 at net bytebuddy dynamic scaffold subclass subclassdynamictypebuilder totypewriter subclassdynamictypebuilder java 212 at net bytebuddy dynamic scaffold subclass subclassdynamictypebuilder totypewriter subclassdynamictypebuilder java 203 at net bytebuddy dynamic dynamictype builder abstractbase usingtypewriter make dynamictype java 4055 at net bytebuddy dynamic dynamictype builder abstractbase make dynamictype java 3739 at net bytebuddy dynamic dynamictype builder abstractbase delegator make dynamictype java 3991 at org mockito internal creation bytebuddy subclassbytecodegenerator mockclass subclassbytecodegenerator java 296 at org mockito internal creation bytebuddy typecachingbytecodegenerator lambda mockclass 0 org mockito internal creation bytebuddy typecachingbytecodegenerator typecachingbytecodegenerator java 78 at org mockito internal creation bytebuddy typecachingbytecodegenerator externalsyntheticlambda0 call unknown source 4 at net bytebuddy typecache findorinsert typecache java 168 45 more cause by java lang classnotfoundexception didn t find class android view roundedcorner on path dexpathlist zip file system framework android test runner jar zip file system framework android test mock jar zip file datum app com example roundedcornererror test momt6bb7q o6x8s753hutw base apk zip file datum app com example roundedcornererror jfsh1bdfi snlqlzlwn4w base apk nativelibrarydirectorie datum app com example roundedcornererror test momt6bb7q o6x8s753hutw lib x86 datum app com example roundedcornererror jfsh1bdfi snlqlzlwn4w lib x86 system lib system product lib at dalvik system basedexclassloader findclass basedexclassloader java 196 at java lang classloader loadclass classloader java 379 at java lang classloader loadclass classloader java 312 64 more
materialcomponentsmaterialcomponentsandroid
linear progress indicator indicator colour be go when screen text be zoom
Bug
description indicator colour be invisible when we try to zoom use accessibility android api version api 33 device emulator api 33
materialcomponentsmaterialcomponentsandroid
appbarlayout crash when setexpand animate be true
Bug
description crash after repeat call of appbarlayout setexpanded true true expect behavior not crash source code when a back press be call the recyclerview inside content main scroll up after call recyclerview smoothscrolltoposition 0 then we also call appbarlayout setexpanded true true it work for a while but after repeatedly trigger both method and click some action menu or navigation icon while the list be scroll the error below kick in jni detect error in application can t call void com google android material appbar appbarlayout setelevation float on null object minimal sample app repro n a android api version 21 material library version 1 10 0 device pixel emulator
materialcomponentsmaterialcomponentsandroid
calendar can not scale for tablet sw600dp
Bug
description scale calendar dialog for tablet expect behavior mobile tablet it be actually too small in tablet just didn t capture the whole screen and the dialog padding have issue which can be see when look at the button source code the code snippet which be cause this issue here I be hope that materialalertdialogtitletextstyle and materialalertdialogbodytextstyle will take effect just like in normal alert dialog I try fullscreen version but it suffer the same issue like day style dialogbodystyle minimal sample app repro n a android api version 21 and above material library version 1 10 0 device pixel c emulator
materialcomponentsmaterialcomponentsandroid
appbarlayout accessibility no next container when collapsingtoolbarlayout content be large than toolbar
Bug
description I have a very simple layout consist of a collapsingtoolbarlayout with some content and a scrollview below use talkback with container navigation zippy 2ccontainer navigation 4 finger horizontal swipe I can jump from the back button that be focus initially unlabelle button to the content of the scroll view and back this mean that the content of the collapsingtoolbarlayout be detect as a container and the scrollview be detect as another container now change the height of the imageview that be inside the collapsingtoolbarlayout as soon as the imageview be large than the toolbar container navigation stop work swipe horizontally with 4 finger talkback just announce no next container and no previous container note that the example give below be a heavily simplify layout to make it easy to reproduce the problem of course the example layout be rather useless and not be able to jump to the scrollview be no problem here in our actual app however we have more content in the collapsingtoolbarlayout toolbar button etc and scrollview there talkback user should be able to skip directly to the main content in the scrollview or skip out of the scrollview back to the toolbar use container navigation expect behavior talkback container navigation zippy 2ccontainer navigation 4 finger horizontal swipe should work even if the content of the collapsingtoolbarlayout be large than the toolbar note that this be a regression introduce in 72228f4f35b0c155c870f59bc7c807e05443bf95 source code xml minimal sample app repro android api version test with api version 33 and 32 material library version all start with 1 7 0 git bisect show that 72228f4f35b0c155c870f59bc7c807e05443bf95 be the first bad commit in the example app I use 1 10 0 device nokia 5 3 stock android 12 and oneplus 7 t android 13 lineageo
materialcomponentsmaterialcomponentsandroid
materialdatepicker day of month display only first digit when large font scale be use
Bug
description use a default new project in android studio that use theme material3 daynight noactionbar when you show a materialdatepicker and set full screen zoom 320dp width and 200 font size in system set the dialog do not pass wcag guildeline and google s own guideline part of the text to become crop cut or obscure you can see on the screenshot that day of week be cut and day of month be crop only the first digit be visible make the date picker unusable expect behavior follow recommendation from link guideline avoid text content with a fix height and width prefer responsive layout that can readily accommodate different screen size screen orientation pixel density and font size for example datepickerdialog from android sdk handle this correctly source code kotlin materialdatepicker builder datepicker build show supportfragmentmanager null minimal sample app repro datetimepicker zip android api version api 34 material library version 1 10 0 I m use the late version of the com google android material material library device pixel 7 pro emulator
materialcomponentsmaterialcomponentsandroid
textinputlayout percentage corner radius fail to work when layout direction set to rtl
Bug
description percentage corner radius use shapeappearance property fail to work when layout direction set to rtl but it work fine when I set its corner directly in dp use 24dp expect behavior percentage corner radius use shapeappearance property for textinputlayout should work like ltr direction example both layout be with app shapeappearance style custom round corner full style but for second one I ve set android layoutdirection ltr and for first one android layoutdirection rtl image material library version 1 9 0
materialcomponentsmaterialcomponentsandroid
materialswitch the switch icon have the incorrect color when the monochrome theme be apply
Bug
description the switch icon have the incorrect color when the monochrome theme be apply everything work fine with other theme 1 minimal sample app repro catalog android api version 14 material library version 1 11 0 alpha03 device virtual device
materialcomponentsmaterialcomponentsandroid
progressindicator doesn t show up on popupwindow when open the window again use enter hide transition
Bug
description when implement a popup with a progress indicator base on circularprogressindicator or linearprogressindicator the indicator be only appear the first time the popup be show when use the popup show hide transition entertransition exittransition if transition animation be not use the progress indicator be display correctly expect behavior circularprogressindicator or linearprogressindicator should always be visible unless we explicitly hide it source code progresspopup snippet kotlin fun show if mpopup isshowe mpopup update else mpopup showatlocation parent popupgravity x y fun hide if mpopup isshowe mpopup dismiss init mpopup popupwindow contentview windowmanager layoutparam match parent windowmanager layoutparam match parent set show hide animation cause the problem mpopup entertransition fade fade in mpopup exittransition fade fade out mpopup istouchable false mpopup isfocusable false mprogressbar contentview findviewbyid r i d progressindicator mprogressvaluetext contentview findviewbyid r i d progress value text mprogresstasktext contentview findviewbyid r i d progress task text layout snippet xml usage kotlin val progressview layoutinflat inflate r layout progress null val progresspopup progresspopup mainview progressview also it popupgravity gravity fill val button findviewbyid r i d button button setonclicklistener progresspopup progress 50 handler postdelaye progresspopup hide 2000 on the second and subsequent click of the button a pop up window appear with an invisible progress indicator minimal sample app repro popupindicatortest zip android api version api31 material library version test on 1 8 0 1 9 0 1 10 0 rc01 1 11 0 alpha03 device android emulator api 31 arm64
materialcomponentsmaterialcomponentsandroid
side sheet inconsistent behavior when dismiss the dialog
Bug
in the doc modal side sheet example you can then show the side sheet with sidesheetdialog show and dismiss it with sidesheetdialog hide sidesheetdialog have build in functionality to automatically cancel the dialog after it be swipe off the screen in the latter case it will call cancel which call dismiss result in different behavior than hide
materialcomponentsmaterialcomponentsandroid
materialalertdialogbuilder setsinglechoiceitem item list scroll layout
Bug
when setsinglechoiceitem be use with item that have multiple line text layout be scroll instead of expand the dialog body to show the full content screenshot 20230918 113325 bdd screenshot 20230918 113334 bdd
materialcomponentsmaterialcomponentsandroid
button why do the materialbutton display text in two line instead of one
Bug
I m use com google android material button materialbutton as a button as you can see open gallery be break into two line instead of stay on a single line the materialbutton s width be set to fill the entire screen but it doesn t seem to be consider this image what I want be image
materialcomponentsmaterialcomponentsandroid
materialtimepicker button at the bottom be get cut off
Bug
description materialtimepicker be get its button cut off at the bottom in the 1 11 x release this look correct in 1 10 0 beta01 so it may be a regression I suspect this might improve if those two button be also constrain to parent at their bottom edge expect behavior the expect behaviour be that those button would not be clip here be two screenshot one from 1 10 and one from 1 11 notice how the dialog s height be less than it be in 1 10 and the button be clip 1 10 1 11 screenshot 1694795666 screenshot 1694795666 copy source code material timepicker dialog xml this may be due to commit d10201dc88f919421b3bc4d8d7aa432de685c892 which update the layout minimal sample app repro n a android api version 33 material library version 1 11 0 alpha02 device pixel 6 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
collapsingtoolbarlayout be there any way to make expand title full width when some menu exist
Bug
description expand title width be short when some menu exist see this picture expect behavior expand title width be same with screen source code java update some code from catalog topappbarcollapsingmultilinedemofragment java override public void oncreateoptionsmenu menu menu menuinflater menuinflater update menu file to display more icon in toolbar menuinflater inflate r menu cat topappbar menu menu super oncreateoptionsmenu menu menuinflater override public void onprepareoptionsmenu nonnull menu menu super onprepareoptionsmenu menu collapsingtoolbarlayout collapsingtoolbarlayout requireview findviewbyid r i d collapsingtoolbarlayout suppresswarning restrictto int maxline collapsingtoolbarlayout getmaxline for int I 0 I linesmap size I int value linesmap valueat I int itemid linesmap keyat I menuitem item menu finditem itemid charsequence title getstre r string menu max line value if maxline value spannablestre spannable new spannablestring title spannable setspan new foregroundcolorspan colorprimary 0 title length 0 title spannable item settitle title override public boolean onoptionsitemselecte menuitem item collapsingtoolbarlayout collapsingtoolbarlayout requireview findviewbyid r i d collapsingtoolbarlayout collapsingtoolbarlayout setmaxline linesmap get item getitemid 1 return super onoptionsitemselecte item 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 29 material library version 1 7 0 1 9 0 device pixel
materialcomponentsmaterialcomponentsandroid
get illegal char at index 45 app mergedemodebugresource 47 value value xml exception from 1 4 0 version but in 1 3 0 version no issue
Bug
description when I upgrade the material library from the version 1 3 0 to late 1 4 0 to 1 9 0 I be face illegal char at index 45 app mergedemodebugresource 47 value value xml this issue but in 1 3 0 I be not face this issue actually if see the value xml path I could find a colon in the path I suspect that be the issue please check and if anything need to change from my end please let I know android api version target sdk version be 33 material library version com google android material material 1 4 0 1 4 0 to 1 9 0 I be face issue ss
materialcomponentsmaterialcomponentsandroid
expose dropdown menu tap create flicker ripple effect
Bug
description if you tap on an expose dropdown menu it ll create a ripple effect for half a second before abruptly disappear there be no animation when it appear or disappear hold down on the expose dropdown menu will create a functional ripple effect here s a screenshot of the broken ripple effect image when I take this screenshot I be tap the center of the text box so the ripple be also appear at an incorrect position expect behavior it have a normal ripple effect source code the expose dropdown menu demo in the material component catalog minimal sample app repro the material component catalog android api version api 33 material library version 1 11 0 alpha02 device galaxy s21
materialcomponentsmaterialcomponentsandroid
materialdatepicker talkback do not announce initially select date as select
Bug
description an initially select date e g a date set use materialdatepickerbuilder datepicker setselection be not announce as select when use talkback it be necessary for the user to interactively select a date at which point select will be prepende to the announcement of the date after that talkback will correctly announce the select date expect behavior regardless of whether the date be initially select or interactively select talkback should announce select when swipe to the select date source code add the following to an activity s oncreate to build and show a date picker dialog var datepicker materialdatepicker builder datepicker setselection date time build show supportfragmentmanager note that when initially swipe to the select date it will not be announce as select see attach video android api version 34 device pixel 5 material library version com google android material material 1 9 0
materialcomponentsmaterialcomponentsandroid
catalog status bar be not transparent in topappbarscrollingtransparentstatusdemoactivity scrolling demo transparent status bar
Bug
description the status bar be not transparent in topappbarscrollingtransparentstatusdemoactivity scrolling demo transparent status bar screenshot 20230825 192940 expect behavior the status bar be transparent in topappbarscrollingtransparentstatusdemoactivity scrolling demo transparent status bar screenshot 20230825 193008 minimal sample app repro catalog app android api version 34 material library version 1 11 0 alpha02 device emulator 32 1 14 api 32
materialcomponentsmaterialcomponentsandroid
materialswitch thumb icon drawable be not properly tint in light theme with certain characteristic
Bug
let s a consider a materialswitch with a check mark thumb icon drawable specify with app thumicon drawable material switch check selector material switch check selector xml material switch check xml this usually work fine and the switch will show the check drawable when it be check however if a light theme have a dark color for colorprimarycontainer and a light color for coloronprimarycontainer the check drawable tinting do not work properly end up in the check mark drawable be invisible this situation do not seem to happen with dynamic material you theme but can happen if you generate a theme with the color library for example a theme generate with schemecontent or schemeexpressive with seed color 5c76aa a dark blue produce a dark colorprimarycontainer and a light white actually coloronprimarycontainer result in the switch check mark not be visible when the switch be check schememonochrome result in a check mark barely visible white on light gray background all other scheme be unaffected as they produce a light colorprimarycontainer and dark coloronprimarycontainer here s the code that generate both color I wonder if for schemecontent or schemeexpressive it should not generate for a light theme a light colorprimarycontainer and dark coloronprimarycontainer like for other scheme nonnull public dynamiccolor primarycontainer return new dynamiccolor name primary container palette s s primarypalette tone s if isfidelity s return performalber s sourcecolorhct s if ismonochrome s return s isdark 85 0 25 0 return s isdark 30 0 90 0 isbackground true background this highestsurface secondbackground null contrastcurve new contrastcurve 1 0 1 0 3 0 7 0 tonedeltapair s new tonedeltapair primarycontainer primary 15 0 tonepolarity nearer false nonnull public dynamiccolor onprimarycontainer return new dynamiccolor name on primary container palette s s primarypalette tone s if isfidelity s return dynamiccolor foregroundtone primarycontainer tone apply s 4 5 if ismonochrome s return s isdark 0 0 100 0 return s isdark 90 0 10 0 isbackground false background s primarycontainer secondbackground null contrastcurve new contrastcurve 4 5 7 0 11 0 21 0 tonedeltapair null the easy way to reproduce this issue be to have a materialswitch with app thumicon drawable material switch check selector and a light theme with 5a74a8 ffffff which be the color generate by schemecontent for seed color 5c76aa more broadly do m3 require that in a light theme colorprimarycontainer must always be a light color and coloronprimarycontainer a dark one if that s the case the color return by schemecontent and schemefidelity be not always compliant
materialcomponentsmaterialcomponentsandroid
bottomappbar app hideonscroll true bottomappbar remain hidden in detail fragment select item of recyclerview
Bug
description app hideonscroll true work fine in recyclerview scroll but when I scroll the recyclerview until bottomappbar become hidden and select an item of recyclerview and go to detail fragment while bottomappbar be hide then in detail fragment bottomappbar be also hide performshow or slideup do nothing expect behavior I want the bottomappbar become visible in select item detail fragment source code android api version device api 23 compile sdk version 33 material library version 1 9 0 device 4 65 720p galaxy nexus api 23 android studio emulator
materialcomponentsmaterialcomponentsandroid
materialdatepicker support islamiccalendar
Bug
hi it would be great if we can have the materialdatepicker support islamiccalendar
materialcomponentsmaterialcomponentsandroid
material datepicker year selection issue
Bug
description I be face issue in material date picker while select year it be select wrong year instead of select correct one for example if I be select year 1998 it be select 2001 also it always pick 3 year later then select one expect behavior it should pick correct year which be pick by user source code the code snippet which be cause this issue be as below image android api version androidx core core ktx 1 10 1 material library version com google android material material 1 9 0 device all device but firstly it be encounter in android 14 in emulator
materialcomponentsmaterialcomponentsandroid
com google android material datepicker e rangedateselector issue
Bug
description on some device I encounter a crash with stack trace here androidx core util precondition checkargument precondition java 38 com google android material datepicker rangedateselector setselection rangedateselector java 84 com google android material datepicker rangedateselector setselection rangedateselector java 51 com google android material datepicker materialdatepicker builder build materialdatepicker java 627 expect behavior this should not crash source code override public void setselection nonnull pair selection if selection first null selection second null precondition checkargument isvalidrange selection first selection second selectedstartitem selection first null null utcdates canonicalyearmonthday selection first selectedenditem selection second null null utcdates canonicalyearmonthday selection second happen when isvalidrange false which should not happen android api version 13 and 12 material library version material android library version you be use here e g 1 1 0 alpha07 com google android material material 1 4 0 device samsung s20 fe 5 g samsung s21 fe 5 g galaxy s10e 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
slider label and state layer be not display
Bug
description when the slider be touch the label and the state layer be display when the slider in the scroll container be touch the label and the state layer be not display when the slider in the scroll container be drag the label and the state layer be display expect behavior the label and the state layer be display minimal sample app repro catalog app android api version 34 material library version 1 11 0 alpha01 device emulator 32 1 14
materialcomponentsmaterialcomponentsandroid
floatingactionbutton snackbar fab triggering snackbar reset color of toolbar and reposition fab
Bug
description I m get start with edge to edge have some issue implement it I come back to the basic I e the android studio template use the basic view activity I notice a wired behavior start with the fresh project template apply windowcompat setdecorfitssystemwindow window false like mention in the guide lie out in full screen lead to the floatingactionbutton be initially lay out over the navigation bar in contrast to the nestedscrollview text content over scroll down the appbarlayout toolbar change its color like expect hard to see in the picture should have change the color over appbar color now in the scrolled state click the floatingactionbutton bring the snackbar into view now the color reset back to white and once the snackbar disappear the floatingactionbutton doesn t reposition to its starting position but fall through behind the navigation bar scrolling bring back the color though under appbar white expect behavior I know set windowcompat setdecorfitssystemwindow window false be only the start of get edge to edge but from read the rest of the guide and try to implement with vary degree of success the expect behavior would be that at this point the floatingactionbutton should start already behind the navigation bar where it fall to once click furthermore the color of the appbarlayout toolbar shouldn t reset imho source code in template mainactivity kotlin override fun oncreate savedinstancestate bundle super oncreate savedinstancestate windowcompat setdecorfitssystemwindow window false minimal sample app repro android studio giraffe 2022 3 1 basic view activity android api version 30 material library version 1 9 0 device avd pixel 6
materialcomponentsmaterialcomponentsandroid
materialbutton miss theme attribute for icon button style
Bug
description in the materialcomponent and material3 theme button can be style use theme attribute like materialbuttonstyle and materialbuttonoutlinedstyle rather than use the explicit style reference like style widget material3 button this allow you to customise button style at the theme level by set these attribute rather than have to change every button s style attribute however there be no theme level attribute correspond to the icon button style like style widget material3 button icon expect behavior there should be attribute for the icon style for materialbutton material library version 1 9 0
materialcomponentsmaterialcomponentsandroid
materialbutton padding be incorrect when use icongravity be end textend
Bug
description materialbutton support move the icon to the end of the button or the button text by set icongravity to end or textend the padding that widget material3 button icon add however assume the icon be at the start of the start of the text of the button start or textstart as an example here s a button use widget material3 button icon with icongravity set to textend expect behavior it would be amazing if materialbutton or the widget material3 button x style be able to dynamically switch the padding base on the icongravity but I m not sure how feasible that be alternatively materialcomponent could provide a style or a theme overlay for end icon like xml material library version 1 9 0
materialcomponentsmaterialcomponentsandroid
navigation bar change icon use selector drawable
Bug
description selector drawable throw resource not find exception expect behavior base on selector drawable state menu icon should be change on the navigation bar source code the code snippet which be cause this issue minimal sample app repro selector item navigation menu more menu option in mainactivity xml android api version 33 material library version 1 11 0 alpha01 device pixel 4a
materialcomponentsmaterialcomponentsandroid
materialcontainertransform can I use two materialcontainertransform when create activity transition animation
Bug
description can I use two materialcontainertransform at the same time or one materialcontainertransform and one changebound when implement activity transition animation I try it but didn t get the expected result expect behavior when create activity transition animation I want to apply share element transition to two set of view simultaneously without affect each other source code class testsharedelementexitactivity componentactivity override fun oncreate savedinstancestate bundle with window requestfeature window feature content transition setexitsharedelementcallback materialcontainertransformsharedelementcallback super oncreate savedinstancestate setcontentview r layout activity test share element exit findviewbyid r i d exit button transitionname button findviewbyid r i d exit text transitionname text findviewbyid r i d exit button setonclicklistener startactivity intent this testsharedelemententeractivity class java activityoptionscompat makescenetransitionanimation this pair create it button pair create findviewbyid r i d exit text text tobundle class testsharedelemententeractivity componentactivity override fun oncreate savedinstancestate bundle with window requestfeature window feature content transition setentersharedelementcallback materialcontainertransformsharedelementcallback super oncreate savedinstancestate setcontentview r layout activity test share element enter findviewbyid r i d enter button transitionname button findviewbyid r i d enter text transitionname text val transitionset transitionset transitionset addtransition materialcontainertransform apply isdrawdebugenable true addtarget r i d enter button drawingviewid r i d test container transitionset addtransition materialcontainertransform apply isdrawdebugenable true addtarget r i d enter text or transitionset addtransition changebound apply addtarget r i d enter text transitionset duration 10 1000 window sharedelemententertransition transitionset r layout activity test share element enter r layout activity test share element exit the animation work fine when I use only one materialcontainertransform the animation doesn t work properly when I use two materialcontainertransform android api version target sdk 33 material library version com google android material material 1 2 1
materialcomponentsmaterialcomponentsandroid
bottomsheetbehavior arrayindexoutofboundsexception onlayoutchild
Bug
l612c1 l612c1 I m get the follow stack trace in production build come out to around 300 400 instance per month fatal exception java lang arrayindexoutofboundsexception length 15 index 15 at java util arraylist get arraylist java 439 at com google android material bottomsheet bottomsheetbehavior onlayoutchild bottomsheetbehavior java 590 at androidx coordinatorlayout widget coordinatorlayout onlayout coordinatorlayout java 918 at android view view layout view java 23411 at android view viewgroup layout viewgroup java 6534 at androidx drawerlayout widget drawerlayout onlayout drawerlayout java 1263 at android view view layout view java 23411 at android view viewgroup layout viewgroup java 6534 at android widget framelayout layoutchildren framelayout java 332 at android widget framelayout onlayout framelayout java 270 at android view view layout view java 23411 at android view viewgroup layout viewgroup java 6534 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 23411 at android view viewgroup layout viewgroup java 6534 at android widget framelayout layoutchildren framelayout java 332 at android widget framelayout onlayout framelayout java 270 at android view view layout view java 23411 at android view viewgroup layout viewgroup java 6534 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 23411 at android view viewgroup layout viewgroup java 6534 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 804 at android view view layout view java 23411 at android view viewgroup layout viewgroup java 6534 at android view viewrootimpl performlayout viewrootimpl java 3714 at android view viewrootimpl performtraversal viewrootimpl java 3172 at android view viewrootimpl dotraversal viewrootimpl java 2141 at android view viewrootimpl traversalrunnable run viewrootimpl java 8647 at android view choreographer callbackrecord run choreographer java 1034 at android view choreographer docallback choreographer java 858 at android view choreographer doframe choreographer java 789 at android view choreographer framedisplayeventreceiver run choreographer java 1019 at android os handler handlecallback handler java 938 at android os handler dispatchmessage handler java 99 at android os looper loop looper java 236 at android app activitythread main activitythread java 8097 at java lang reflect method invoke method java at com android internal os runtimeinit methodandargscaller run runtimeinit java 620 at com android internal os zygoteinit main zygoteinit java 1011 it look like there might be a race condition where the size of the callback array be reduce while iterate through the list
materialcomponentsmaterialcomponentsandroid
button icon button animate vector and animate selector
Bug
description be I understand correctly that at this moment it s not possible to use animate vector and animate selector with icon button be it a bug or miss feature specifically app icontint set the color however selector or vector can t use it