Android Studiohas a cool feature toImportandExportsettings. So during installation of newAndroid Studioversion I usually import my previous settings. But recently a bad thing happened to me - I have lost myAndroid Studiosettings file.
My advice to you: always keep backup of your Android Studio settings file somewhere on the cloud.
And since I am configuring myAndroid Studiofrom scratch anyway, below are some things which may be useful for you.
Show line numbers
When I first fired upAndroid Studioand started using it, one of the first things I wanted to do was to be able to see line numbers within the file. I was always curious why this thing is not turned on by default?
To do so
In toolbar menu selectFile|Settings
ChooseEditor|General|Appearance
Tick onShow line numbers
Camel humps
Android Studiodoesn’t respect ‘Camel Humps’ words when you navigate through your code with pressedCtrl+Left/Rightarrow keys.
To do so
In toolbar menu selectFile|Settings
ChooseEditor|General|Smart Keys
Tick onUse ‘Camel Humps’ words
Note:if you still want to select whole word on mouse double click go to
In toolbar menu selectFile|Settings
ChooseEditor|General
Remove tick on‘Honor Camel Humps words settings when selecting on double click’
Field naming conventions
I am usually followingfield naming conventionsfrom Android Code Style Guidelines for Contributors. There is one thing whichAndroid Studiocan automatically do for us - generate field name prefix for:
Non-public, non-static field names start withm.
Static field names start withs.
To do so
In toolbar menu selectFile|Settings
ChooseEditor|Code Style|Java
SelectCode Generationtab
Addmprefix for field andsprefix for static field
Imports on the fly
InAndroid Studiothere are shortcuts to auto import or clean-up non used imports. But we live in 2015 right? Those things should be done on the fly.
To do so
In toolbar menu selectFile|Settings
ChooseEditor|General|Auto Import
Tick onOptimize imports on the fly
Tick onAdd unambiguous imports on the fly
Android log colors
With defaultDarculathemeLogcathighlighting I am not able to recognize type of log.
I prefer to use bright colors from plain oldAndroid Holotheme.