Android Studio has many settings you can change to control the appearance and behavior of the product. You can get to these settings on Windows by going to File and choosing Settings or pressing Ctrl + Alt + S. On Mac OS X, go to the Android Studio menu choice and choose Preferences or press Cmd and the comma key. The Settings or Preferences dialogue looks the the same on all operating systems, and lets you control many things about the environment’s behavior and appearance.
- [Voiceover] Android Studio has many settings that you can use to control the appearance and behavior of the product. You can get to those settings on Mac OS X by going to the menu and choosing Android Studio and then Preferences... Or, you can use the keyboard shortcut cmd + ,. On Windows you can get to the Settings dialog by going to the menu and choosing File and then Settings, or by pressing ctrl + alt + s. The Preferences dialog on Mac, and the Settings dialog on Windows look exactly the same.
They both let you control many things about the environment's behavior and appearance. Here are some key categories to know about. Under Appearance & Behavior you'll see subcategories for Appearance, Menus and Toolbars, System Settings, and more. Under System Settings we find the Updates category which I demonstrated in another video. The Keymap category lets you modify your keyboard shortcuts. And the Editor category is used to manage the appearance and behavior of your Code Editor.
Version Control lets you manage tools like GetHub, Subversion, and Mercurial. Build, Execution, and Deployment has tools for managing the build process, debugging, a new feature named Instant Run and more, and there are also categories labeled Languages & Frameworks and Tools. Here are some common changes that I always make whenever I open up a new copy of Android Studio. I typically go to the Editor category to General, and then to Appearance and I turn on line numbers.
This makes it easier to remember where I am in the code. And then I also usually turn on a feature named method separators, and that will draw horizontal lines to visually separate my methods in my Java code. I'll also adjust fonts by going to Colors & Fonts and choosing the Font category. There are two predefined schemes named Darcula and Default. You can't modify those built-in schemes, so if you want to customize your font you need to make a copy of one of them.
I'll click Save As... and I'll accept the name Default copy and click OK. My primary font on Mac is set to Menlo. On Windows you might see something different but you can pull down the list and choose another monospaced font if you like. And then on my system to make the code large enough to see in the recording, I'll change my font to a size of 16. I'll then click OK and I'll see that the font is much larger. And then to see the result of separating methods with a horizontal line, I'll add a new onPause method.
And as soon as the method is filled in the horizontal line is drawn. I encourage you to explore the other available settings. Now if you want to start completely over with your settings you can close Android Studio and delete the Settings folder. On Mac OS X your Preferences folder is under the Library subfolder under your Home Directory. Notice when I go to my Home Directory and finder that I don't see a Library subdirectory. So I'll press cmd + shift + g for Go to a folder, and I've started with the tilde character which means my Home Directory then /Library/Preferences and I'll see that I have a couple of folders here starting with AndroidStudio.
AndroidStudio1.5 is for managing my 1.5 installation, and AndroidStudioPreview2.0 is for the beta version of Android Studio 2 that I'm currently using. If I wanted to start over with my preferences I could simply delete or rename this directory and then restart Android Studio and I'd be starting off from scratch. On Windows the Home Directory is also placed under your folder but it starts with a dot prefix and then once again follows the naming convention starting with AndroidStudio and ending with the version number, and then including the word Preview if appropriate.
- Installing Android Studio on Mac and Windows
- Creating Android Studio projects
- Setting up the development environment, including HAXM and the new Android emulator
- Importing existing code into Android Studio projects
- Exploring the interface, including the editor and project windows
- Managing project builds and dependencies
- Creating new Java classes
- Refactoring code
- Using templates
- Using breakpoints and watch expressions
- Updating apps with Instant Run
- Using Git for version control
Skill Level Beginner
Q: This course was updated on 04/27/2017. What changed?
A: New videos were added that highlight the new features introduced in Android Studio 2.3. In addition, the following topic was updated: update apps with Instant Run.