Basically every time i try to Select Button or anything that extends Button
(AppCompatButton
, MaterialButton
)
Android studio freezes for few seconds when selecting Button in layout editor. every other component works normally (i think so).
On new project this behavior is not present.
p.s. 3.5.{latest} also had this issue but it was less annoying since xml editor and layout editor was two separate things.
Simply putting marker on anything that is inside xml button declaration (in my layout) causes this lag of (3-4 seconds). In that period of time i can't use Android studio at all.
So my question is what could cause such behavior and how could i avoid it?
Anyone facing AS freeze while editing XML or editing Material components like Button, do the following steps:
Open Layout Editor -> Click on Attributes Tab -> Settings Icon -> Will show list of options, disable all options with "Attributes", like "All Attributes", "Common Attributes", "Declared Attributes"
Will solve the issue for now.
UPDATE: Issue is already reported and AS team is working on the fix: https://issuetracker.google.com/issues/139716861 Actual fix requires new AS release or 4.1 canary 10 (as per AS Team comment).