

In this section, you’ll explore some of the Android Studio features which simplify the refactoring overhead to a few keystrokes, letting you refactor with confidence! Using Shortcuts to Move Code Around However, if you offload all the steps involved to the IDE and let it execute the refactoring task as an automated process, it becomes a piece of cake.

If your only option was to refactor your code by hand using a simple text editor, you’d be right. Your spontaneous reaction to refactoring might be that it’s too much work and leads to unintended bugs in the codebase. If not, fire up Android Studio and select Open an existing Android Studio project from the Welcome screen, then choose the top-level project folder for the starter project you downloaded. If you already have Android Studio 3.4.1 or later open, click File ▸ Import Project and select the top-level project folder you downloaded. To get started with this tutorial, click the Download Materials button at the top or bottom of the page to download the starter project.

For Windows and Linux, you’ll find the shortcuts to use either in the animated gifs or written out in the tutorial, where necessary. Note: Inside Android Studio, the set keyboard shortcuts correspond to the default MacOSX key mapping.
