Configuring Android Studio

Intro

Show line numbers

Without line numbers
With line numbers
  • In toolbar menu select File|Settings
  • Choose Editor|General|Appearance
  • Tick on Show line numbers
Settings

Camel humps

Without ‘Camel Humps’
With ‘Camel Humps’
  • In toolbar menu select File|Settings
  • Choose Editor|General|Smart Keys
  • Tick on Use ‘Camel Humps’ words
Settings
  • In toolbar menu select File|Settings
  • Choose Editor|General
  • Remove tick on ‘Honor Camel Humps words settings when selecting on double click’

Field naming conventions

  • Non-public, non-static field names start with m.
  • Static field names start with s.
Field name prefix
  • In toolbar menu select File|Settings
  • Choose Editor|Code Style|Java
  • Select Code Generation tab
  • Add m prefix for field and s prefix for static field
Settings

Private member access between outer and inner classes

  • In toolbar menu select File|Settings
  • Choose Editor|Inspections
  • Tick on Java|J2ME|Private member access between outer and inner classes

Imports on the fly

Without imports on the fly
With imports on the fly
  • In toolbar menu select File|Settings
  • Choose Editor|General|Auto Import
  • Tick on Optimize imports on the fly
  • Tick on Add unambiguous imports on the fly
Settings

Android log colors

Darcula theme Logcat highlighting
Holo theme Logcat highlighting
  • In toolbar menu select File|Settings
  • Choose Editor|Colors & Fonts|Android Logcat
  • Click on Save As… button and create new color schema
  • Change all colors to ‘Holo theme colors’ (Uncheck ‘Use inherited attributes’ for every color)
Assert:  #AA66CC
Debug: #33B5E5
Error: #FF4444
Info: #99CC00
Verbose: #FFFFFF
Warning: #FFBB33
Holo theme colors

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store