Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to save and restore Android Studio user interface settings?

Android Studio allows the user to customize certain features, such as editor settings and coding styles. On Windows boxes, the default folder for these settings appears to be C:\Users\{username}\.AndroidStudio{version}\config. I'm looking for documentation for these files so that we can decide which files should be under version control.

The goals are: 1) to have consistent UI settings for a group of developers; and 2) to have an easy way to configure a new Android Studio install.

So far, the following files look interesting:

  ...\config\templates\user.xml               User-defined code templates ...\config\options\editor.codeinsight.xml   Editor settings & code insight ...\config\options\editor.xml               Editor settings ...\config\options\cachedDictionary.xml     User additions to spelling dictionary. ...\config\codestyles\Default_1_.xml        Code formatting  
like image 589
Yojimbo Avatar asked Jan 18 '16 19:01

Yojimbo


People also ask

What allows you to properly restore a user state when an activity is restarted?

onSaveInstanceState() is called by Android if the Activity is being stopped and may be killed before it is resumed! This means it should store any state necessary to re-initialize to the same condition when the Activity is restarted.

How do you save an activity state?

When the activity goes into the background, the system calls onSaveInstanceState() . You should save the search query in the onSaveInstanceState() bundle. This small amount of data is easy to save. It's also all the information you need to get the activity back into its current state.


2 Answers

You can go file > Export settings then you get to choose exactly the settings to export and you get a single settings.jar file.

The reverse process is file > Import Settings > choose settings.jar

enter image description here

like image 92
denixtry Avatar answered Sep 29 '22 14:09

denixtry


It seems that the user interface has changed since the last answer.

Now as of Android Studio 4.2 Bata 1 on Windows You have to go to File -> Manage IDE Settings -> Export Setting to see the same window.

If you can't find the File > Import Settings menu, try accessing File -> Manage IDE Settings -> Export Setting.

ScreenShat

There may be differences on the version or operating system.

like image 33
samgakhyeong Avatar answered Sep 29 '22 12:09

samgakhyeong