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).
Related
Using Android Studio 3.4 Canary 9 and 10
ConstraintLayout 2.0.0.alpha3
I am having an issue with constraint layout in the bleeding edge build of Android Studio 3.4 canary 9. Basically, when you click on a view in constraint layout, say on a chain element, you should be able to see small icons appear that allow you to perform certain actions on the views.
As you can see, under each view are 3 buttons that allow you to change the chain settings. However, this is what I get in my layout editor on 3.4.C09 when clicking on an element in a chain:
Did they get disabled or moved elsewhere? Is this a bug? I have looked everywhere in the IDE without any luck, tried zooming in / zooming out, changing the theme, invalidating caches/restart, clean rebuild etc.
Thank you for any help provided!
UPDATE
Now you should see Circle Chain mode option in right-click menu in Android Studio 3.6.
According to the official response, this function has been removed in AS3.4.
But there seems to be no alternative. I have reported this problem to Goole and you can track here.
For now, you can add app:layout_constraintHorizontal_chainStyle attr in xml manually. And after that Cycle chain mode options will appeare in the right-click menu.
It is now available in attributes under layout_constraints. ( AS 3.5 )
I have been struggling for this minor thing in Android Studio for few hours. I am not sure if it's a bug or a new feature in Android studio 2.3.3.
I can't see the classes that i have opened. They were appearing fine before,I didn't update the studio or did any other thing intentionally.
Expected Result:
Current Screen:
P.S: The second screen shot is from linux as i am currently working on linux. It was working fine before.
Your set tab visibility none, so you can change visibility by
press
Ctrl + Shift + A
then write tabs placements and then you find tabs placements top is off so press to On.
You can see the tabs.;)
this is the simple way to do that
go to
Window -> Editor Tabs -> Tabs placement -> set to Top
Now on Android Studio 2.2 on new Preview mode, there are no more refresh button:
Image 1: Preview on Android Studio 2.2 (without refresh button)
Image 2: Preview on Android Studio 2.1 (with refresh button)
Does anyone know how to display it again? Or with shortcut maybe?
Edit: If I change a drawable by example and that the change does not appear in the layout, the only method that works for me is closed and restart the project. If I close the layout and as I re-opens nothing happens. Same result using the "Synchronized" button.
Refresh feature is not removed, it is there; It's pretty simple to refresh:
Click on the preview screen to make sure preview window has the focus and press R. It should display the progress in the right-top corner while refreshing.
If it doesn't work for any reason, switch to design tab and press R, it refreshes the layout instantly.
I think it is a small bug. But I find a hack solution to resolve the problem, you can modify the a resource id to a wrong name, for example, you have a resource named 'ic_launcher', when you input 'ic_launcher1', you can find the interface like that:
next step, click refresh icon(sometimes it is 'clear cache' label). it is works for me.
I have try to change the orientation, but it not works when I replace a exist image file.
May your problem is same as : http://stackoverflow.com/questions/39646639/android-studio-2-2-layout-editor-refresh-button
Display again?
I guess you cant. Apparently the refresh functionality has been removed because they think the processing will happen much faster and will auto-refresh the previews real time. The Layout Editor's document has no mention of refresh functionality.
Shortcut?
If you are faster in making changes to your layout than Android-studio refreshes, you could try toggling between the design and blueprint views using the shortcut B
Refer the Layout Editor Official Documentation for other shortcuts you might feel comfortable with or works for you.
So do the Simple Step. When you change your layout then save it and clean your project.
go to menu Build -> Clean Project.
I Hope this will help you.
There is no refresh button in stable version of android studio 2.2 for preview. But there is a work around to do so. By toggling the orientation button in an editor will refreshes the changes!
I too had the same Problem , sometimes changing the Android Version worked
and it'll sure work if you clean/Rebuild the project
Find the double diagonal lines below your preview layout and click them. It will refresh your layout.
I am trying for last 3 days to show up my custom view properties in my Android Studio Design Panel, so I can directly edit custom properties of my view directly from the design editor and my supervisor can create an app without any coding knowledge by dragging a view in editor and simply editing its properties from the designer panel.(without modifying XML code. It is a very simple app, so I think its just okay).
However, it seems I have no luck. I have asked one question on it, got only one reply and its also not working. The question is here:
Does Android studio layout editor shows custom view properties?
I have checked almost all custom properties of views in android tutorials, downloaded source codes and find that none of these was able to show up the custom properties in android design panel.
So now, I have big doubt, if it is actually possible to show up any custom properties for a view in Android Studio. Its a bit strange that there is no single discussion/tutorial on it in online. Every tutorial suggests, how to create custom properties using xml layout or code, but none discussed, how to show up that in android studio. I believe, andoid studio can only show up default properties set for a view and we have to edit custom properties by editing XML files only.
Can you please tell me if its correct? I am really very frustrated with it and want to leave it now. If any of you got succeed to bring custom properties of views in Android Studio editor, I will be very grateful, if you kindly reply/answer.
Select the below API level than current in that designer panel.
I have updated my Eclipse and some of my projects have stopped showing in the Layout Design(and instead shows a basic XML design),
What I have found, in order to open the Layout file I need to right click and go to Open with and then selecting the Show in Layout Editor
I have a big Project I just can't keep on doing this, has anyone come across such problem? and a possible solution for the same
This problem has already been addressed.Apparently, this problem happens in certain versions of ADT.Please check the marked answers from
No Graphical layout editor in Android and
I cannot find the graphical layout tab for xml on eclipse
I had tghis to but
after several times performing this action the layout editor was set to default