Code can be refactored in many ways in Android Studio. Learn how to rename variables and classes, move classes between packages, and extract code into new functions.
- [Instructor] Android Studio … has powerful refactoring capabilities letting you rename … your IDs, move files around … and extract code into new factors. … I'll show you how to use some of these features … in this project that I created … from the empty activity template. … First, I'll show you how to rename variables … and functions really easily. … In this function, I'll create … a new local variable called myVar … and I'll set its value to a literal string … of hello from Android. … And then I'll output that value to the logcat window … with printlm. … Now, let's say I want to rename that variable. … I'll place my cursor in the variable name … and then use the keyboard shortcut, shift, f6 … and that's the same keyboard shortcut … on both Mac and Windows. … Now, with that little box that appears, … I'll start typing the new name and notice that the reference … for the variable changes at the same time. … The same thing works for functions. … I'll create a function that I'll call saysomething. …
- Installing Android Studio on macOS and Windows
- Creating your first project
- Creating virtual devices for testing
- Version control with GitHub
- Customizing the Android Studio interface
- Managing dependencies
- Generating and editing Kotlin code
- Refactoring and inspecting code
- Using templates
- Analyzing and debugging code
- Managing bitmap and vector images
Skill Level Beginner
What you should know1m 47s
1. Getting Started
2. Get Ready to Develop Apps
3. Use Software Version Control
Clone a GitHub repository3m 35s
4. Explore the User Interface
5. Manage Project Builds and Dependencies
6. Create and Edit Code Files
7. Analyze and Debug Your Code
8. Manage Image Files
Create vector image assets3m 50s
Next steps1m 11s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.