Android studio xml Editor Auto Complete is not working [duplicate] - android

This question already has an answer here:
Code completion does not work for External Library XML attributes (Android Studio)
(1 answer)
Closed 6 years ago.
title = description
xml editor auto complete not working in My CustomView.
but other views in working.
i tried invalid caches / restart .. but still not working
what should i do?
Thanks for help.

Few tricks :
1.Clean and Run
File -> Invalidate Caches / Restart... -> Select Invalidate and Restart
2.Turned off Power Save
File -> Power Save Mode
3. Delete .idea folder and all .iml and rebuild.
4.If this still didn't do the work,try changing your custom view's name to its original android view temporarily and use autocomplete inside, and then revert the view to its custom name.

Related

Android Layout Manager Attributes

[Layout screen as an bug example1While developing my android app I deleted linear layout by selecting it in layout manager by mouse and pressing delete button after that android studio stopped giving me auto complete code suggestions in XML also layout manager is not showing all attributes associated with with a UI component Please guide me how to fix this issue
The xml code might not be in proper format, like missing any closing bracket or something else, first you should check that.
Other steps to try:
Build -> Clean Project -> Rebuild Project
File -> Invalidate Caches and Resatart
File ->Manage IDE Settings -> Restore Default Settings (it will reset your IDE, as if it is newly installed.)

Unexpected XML View formatting Android Studio 3.5 [duplicate]

This question already has answers here:
Android studio 3.5 refactor issue
(9 answers)
Closed 3 years ago.
After updating Android Studio to 3.5 whenever I auto format code (cmd+opt+l) it changes the order of the view tags inside the xml.
So for example in a LinearLayout your views would move around
Found the solution:
Preferences -> Editor -> Code Style -> XML
Search for Set from on the top left.
Set from -> Predefined Style -> Android
Don't forget to apply your changes
Hope this helps someone

Android XML Bug [duplicate]

This question already has answers here:
Android studio 3.5 refactor issue
(9 answers)
Closed 3 years ago.
Reformat code in xml change UI Layout
Before Reformat code
After Reformat code
Please help me.
Just go to-:
Settings -> Editor -> Code Style -> XML-> Set From -> Predefined Style > Android.
if doesnot happen try fresh install not updating android studio.

XML code formatting gives wrong arranging child views in LinearLayout Android Studio 3.5 [duplicate]

This question already has answers here:
Android studio 3.5 refactor issue
(9 answers)
Closed 3 years ago.
Menu -> Code -> Reformat Code
Previous Android Studio version, my hands are very used to click Ctl+Alt+L to format code whenever I have typed some code block. After I updated to Android Studio 3.5, I formatted the code in XML and it is giving me wrong arrangement of my views and destroying my design.
Here is the design before code reformatting.
After code reformatted (click -> Ctl+Alt+L), my views was shuffled in both design and xml code side. please see second picture.
It seems a bug and I already reported it to Google Issue Tracker.
I just got answer from one of my colleague. That works well.
Settings -> Editor -> Code Style -> XML-> Set From -> Predefined
Style > Android.

How do I delete landscape specific xml layout file?

Accidentally created a *.xml(land) file and I want to delete it. I tried going into the project view and deleting it from the 'layount_land', but when I do that not only is the land-xml deleted, the normal xml-file that I wish to keep get deleted as well?
I saw that if you have Windows Operating System this file could be deleted from Windows Explorer(?) but since Im on a MacBook that won't be possible.
What should I do?
if you're using Android Studio , click on res -> Layout and right click on your landscape layout -> Delete
uncheck (safe Delete) and the other option.
click ok.
I saw that if you have Windows Operating System this file could be deleted from Windows Explorer(?) but since Im on a MacBook that won't be possible.
You can delete the file from finder on a MacBook. There is no such restrictions on MacBooks.
Alternatively, you can switch the way you view your projects. On top left corner of your Android Studio you should see a menu that changes the view options of your project. You probably deleted from the "Android" view, try switching to "Project" view, there you should be able to pick file directly from src/main/res/layout folder.

Categories

Resources