A Settings Tour
Android Studio 2: The New UI
Course 2 · Chapter 2 · Making the IDE Yours
Chapter 1 mapped the window. This chapter maps the Settings dialog, because almost every complaint about an IDE ("the text is too small", "it keeps adding imports I did not ask for", "the lines wrap at the wrong place") is a setting somewhere in it. The dialog is large, with a tree of dozens of pages, so the aim is not to read every page. It is to learn how the tree is laid out, how to find a page fast, and which handful of pages are worth visiting in your first week.
Checked in the docs. One web search, which returned JetBrains documentation for the IntelliJ platform that Android Studio is built on (not an Android Studio page). It covers Sync with OS and the Islands themes.
Not run by me. Where a page was only partly visible in a screenshot, the chapter says so.
Opening Settings and Finding Things
Open it with File > Settings... or Ctrl+Alt+S (both seen in the File menu in Chapter 1), or with the gear in the main toolbar, or from the Welcome screen without a project. The dialog has a
tree on the left, the selected page on the right, a search box at the top of the tree, and three buttons at the bottom: OK (apply and close),
Apply (apply and stay) and Cancel (throw the changes away). A page title at the top shows the path as breadcrumbs, for example Editor > General > Auto Import; the
arrows at the top right step back and forward through the pages you have visited.
The search box filters the whole tree as you type. Type Font and the tree collapses to the pages that mention it (in one screenshot: Appearance, Notifications, Data Editor and Viewer, Editor > Font,
Color Scheme, Inspections, Reader Mode, Markdown, Logcat, Terminal and Advanced Settings), and a matching setting on a page is highlighted. The same trick works from outside the dialog: Search Everywhere
(Shift Shift) lists individual settings pages next to files and actions. When you do not know which page holds a setting, search; do not browse.
The Shape of the Tree
The top-level groups in the tree on Rabbit 2, with the pages inside the two you will use most, are below. A ● beside a page in the dialog just marks a page you have changed from its default.
Two of those groups have a chapter of their own later: Version Control belongs with Chapter 10 and Studio Labs with Chapter 11. Build, Execution, Deployment is where Gradle settings live (Chapter 4), and Tools holds Logcat and Terminal (Chapters 7 and 1).
Appearance: Theme, Menus and Window Chrome
Appearance & Behavior > Appearance is the first page to visit. The Theme drop-down at the top chooses the look of the whole IDE. Two things from the docs and your install are worth knowing: the Islands themes (for example Islands Dark) are the New UI's themes, with clear separation between the panels, and Sync with OS makes the IDE follow your operating system's light or dark mode, switching on its own if Windows switches day and night. The docs also describe a "different tool window background" option that appears only for Islands themes.
Further down, under UI Options, the screenshot showed these (with the state on that install):
| Setting | State seen | What it does |
|---|---|---|
| Compact mode | off | Smaller spacing, so UI elements take up less screen space. |
| Always show full path in window header | off | Puts the full project path in the title bar. |
| Use project colors in main toolbar | on | Gives each project a toolbar tint, so you can tell windows apart at a glance (the purple "C" next to the project name). |
| Keep popups open for toggle items | on | Lets you tick several items in a menu without it closing. |
| Main menu | Hide under Hamburger Button | The three-way choice from Chapter 1. |
| Smooth scrolling, mnemonics, icons in menu items | on | Cosmetic and keyboard conveniences; the underlined letters in menu names are the mnemonics. |
Below that sit the Tool Windows options from Chapter 1 and Presentation Mode, whose Zoom setting (175% on the install checked) is the zoom used when you switch to Presentation Mode for a talk or a screen recording. It is not the zoom for everyday work: for that, use the font settings next.
Fonts and Zoom
Text size is under Editor > Font. The screenshot showed a Size of 13.0 and a Line height of 1.2, an Enable ligatures
check-box (off), a Typography Settings section with Main weight (Regular), Bold weight (Bold, marked Recommended) and a Fallback font (None, used for symbols the
main font does not have), and a long list of OpenType Character variants such as Slashed Zero. A preview pane on the right shows a paragraph of sample text in the font and the settings you have chosen, so you
see the result before you press OK. The font family drop-down sits just above the part of the page in the screenshot.
For quick changes without opening Settings there are three routes:
| Route | How |
|---|---|
| Mouse wheel | Tick Change font size with Ctrl+Mouse Wheel in (Editor > General > Mouse Control; it was off on the install checked), then choose Active editor or All editors. |
| Actions | Search Everywhere listed Increase Font Size, Decrease Font Size and Reset Font Size (under the View menu, Active Editor), and the "in All Editors" versions. |
| Settings page | Editor > Font, for a permanent change with the live preview. |
Editor > General: How Typing and Scrolling Feel
Editor > General is a long page of small behaviours. The sections visible in the screenshot were:
| Section | What it controls (state seen) |
|---|---|
| Mouse Control | Font size with Ctrl+Mouse Wheel (off); move code fragments by drag-and-drop (on; hold Ctrl to copy). |
| Soft Wraps | Wrap long lines on screen without changing the file, per file pattern such as *.md; *.txt; *.rst; *.adoc (off). Wrapped lines keep their original indent (on). |
| Virtual Space | Whether the caret may sit after the end of a line or inside tabs (both off). |
| Scroll Offset | How many lines or columns stay visible around the caret as you scroll (vertical 1, horizontal 3). |
| Caret Movement | How Ctrl+Arrow jumps between words and what Home and End do on a wrapped line (IDE defaults). |
| Scrolling | Enable smooth scrolling (on). |
Editor > General > Appearance
This sub-page decides what the editor shows around your code. The defaults on the install checked are the ones most people keep, but two are worth a look:
| Setting | State seen | Why you might change it |
|---|---|---|
| Show line numbers | on, Absolute | The drop-down offers other numbering styles; absolute numbers match error messages and Logcat stack traces. |
| Show indent guides | on | The faint vertical lines that help in deeply nested Compose code. |
| Show whitespaces | off | Turn it on, with its Leading, Inner, Trailing and Selection options, when a mix of tabs and spaces is causing trouble. |
| Highlight occurrences of selected text | on | Marks every other use of the word you have selected. |
| Render documentation comments | off | Shows comment blocks as formatted text instead of raw /** */. |
| Show intention bulb | on | The lightbulb that offers quick fixes (Chapter 9). |
| Caret blinking, smooth caret blinking and movement | 500 ms; smooth options off and tagged New | Pure taste; the "New" tags show these are recent additions. |
Auto Import
Editor > General > Auto Import matters more to Android developers than any other editor page, because Compose code needs dozens of imports. The page has a block per language. The Java and Kotlin blocks on the install checked read:
| Language | Setting | State seen |
|---|---|---|
| Java | Show auto-import tooltip for Classes, and for Static methods and fields | both on |
| Java | Insert imports on paste | Always |
| Java | Add unambiguous imports on the fly | off |
| Java | Optimize imports on the fly | off |
| Kotlin | Add unambiguous imports on the fly | off |
| Kotlin | Optimize imports on the fly | off |
"Unambiguous" means only one class of that name could be meant, so the IDE can add the import line itself without asking. With the Kotlin option off (the default here), you press Alt+Enter
on a red name and choose the import. Turning Add unambiguous imports on the fly on for Kotlin saves a great many of those key presses; turning Optimize imports on the fly on also removes
unused imports as you go, which keeps files tidy but can surprise you when a temporarily unused import disappears. Both are personal taste, and neither changes what the code does. The same page has lists to force-include or
exclude particular classes or packages from auto-import, which is useful if a class you never want (a second Date class, say) keeps appearing at the top of the list.
Code Folding
Editor > General > Code Folding controls the small arrows in the margin that collapse a block, and what starts collapsed when you open a file. The screenshot showed Show code folding arrows set to On mouse hover, and under Fold by default: File header and Imports on (which is why the long import list at the top of a file is hidden behind a single line), Documentation comments, Method bodies and Custom folding regions off, and under Android, String references on (a reference to a string resource is shown as the string's text). The Java, Kotlin and C/C++ sections continue below. Tick Method bodies if you like to open a file and see only an outline of it.
Code Style
Editor > Code Style decides how the IDE formats code when you ask it to. The top of the page shows the Scheme (here Project, a scheme that belongs to this project; a gear beside it manages schemes). Under it is a warning, Settings may be overridden by Indents Detection with a Disable link: when the IDE sees that a file already uses a particular indent, it follows the file. The General tab then showed:
| Setting | State seen | Note |
|---|---|---|
| Line separator | System-Dependent | Applies to new files only (a Windows machine writes \r\n). |
| Hard wrap at | 100 columns | The column the formatter wraps at, and where a visual guide can be drawn. |
| Wrap on typing | off | Whether the editor breaks a line for you as you type past the column. |
| Visual guides | empty (optional) | Vertical lines at the columns you list, one (80) or several (80, 120). |
| Detect and use existing file indents for editing | on | The cause of the Indents Detection warning above. |
| Enable EditorConfig support | on | An .editorconfig file in the project can override these IDE settings. |
Beneath Code Style sits one page per language: Java, Kotlin, C/C++, CMake, EditorConfig, Gradle Declarative Configuration Language, Groovy, HTML, JSON, Markdown, Mermaid, Properties, Shell Script, TOML, XML, YAML and Other File Types. For Android work the page you will actually open is Kotlin. Because the scheme is Project, your choices travel with the project instead of staying on your machine.
Backup and Sync, and the Rest of the Tree
Backup and Sync has its own top-level page in the tree, and the View > Tool Windows list (Chapter 1) has a matching Backup and Sync History window. The pages are meant for saving your IDE settings to an account so a second machine can share them. I could not check what the page offers on this install, so treat that as the name of a feature to explore, not as something this chapter has described. The same caution applies to Experimental, Advanced Settings and Studio Labs, which are listed in the tree: Studio Labs gets its own chapter (Chapter 11).
Try It Yourself
Use the Settings search box (not the tree) to find the page Editor > Font. Increase the font Size by two points, watch the preview pane change, apply it, then set it back. Then find the Change font size with Ctrl+Mouse Wheel option, turn it on for Active editor, and use it in a file.
📄 View solutionOpen Editor > General > Auto Import and write down the state of the four Kotlin and Java on the fly options. Turn on Add unambiguous imports on the fly for Kotlin, then in a scratch Kotlin file type a line that uses LocalDate.now() and say whether the import line appeared by itself. Then decide whether to keep the setting.
In Editor > Code Style, note the Scheme and the Hard wrap at value. Set Visual guides to 80, 100, apply, and look at a long line in the editor. Then open Editor > Code Style > Kotlin and list the tabs you see there.
Checked in the docs (one web search): the result was JetBrains documentation for IntelliJ IDEA and sister IDEs, not an Android Studio page. It says Sync with OS follows the operating system's light or dark mode and can switch with the day and night schedule, describes Islands Dark as the default dark theme with clear separation of UI sections, and describes a tool window background option for Islands themes only. I read search summaries, not the full pages.
Not verified: the contents of the Theme drop-down and the theme names (taken from my earlier audit notes of your screenshots, not re-seen this chapter); the font family drop-down; the lower parts of Code Folding (Java, Kotlin) and Code Style (Formatter tab and the per-language pages); what Backup and Sync, Experimental and Advanced Settings offer; whether Code Style's Project scheme is stored in a project file; the behaviour of the exercises (I did not run them). The Darcula remark is from general knowledge. Defaults change between releases, so trust your own Settings over this text where they differ.
res/layout folder.