Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

When reformat code xml in Android studio 3.5 moves the code up and down And Change View [duplicate]

I've just updated to Android Studio 3.5 and now when I try to refactor the file AndroidManifest.xml, all my app permissions are moved to the bottom of the file.

Has anyone else faced this issue? Is there any solution for this?

Before refactor:

enter image description here

After refactor:

enter image description here

It is applicable to my all project files.

Why it matters:

enter image description here

like image 918
Sagar Kacha Avatar asked Nov 17 '22 02:11

Sagar Kacha


1 Answers

You just need to set xml layout for Android applications from the settings.

Follow this steps:

1. Go to Android Studio > Preferences. For Windows, go to File > Settings.

enter image description here

2. Search for xml in search bar.

enter image description here

3. Under code style section, select xml tab.

enter image description here

4. In the top right corner, click on set from... and under predefined style, select Android

enter image description here

5. Click on Apply and try to refactor.

like image 66
Birju Vachhani Avatar answered May 31 '23 00:05

Birju Vachhani