My Favorite Android Studio Shortcut: Generate Code!

Published: 25 September 2017
on channel: Future Studio
2,887
61

In this Android Studio Note video you'll learn my favorite Android Studio shortcut: generate code. It saves you so much time from writing boring boilerplate code.

Mac: command+N
Windows: alt+ins

Tip: turn on subtitles to deal with my accent. A full transcript is also available below.

Watch the playlist with all Notes here: ►   • Notes  

----------------------------------------

Future Studio is helping 5,000+ users daily to solve Android and Node.js problems with 320+ written tutorials and videos. We’re on a mission to provide new in-depth content every week.

Checkout 320+ technical in-depth tutorials:
►https://futurestud.io

Subscribe for two new videos every week:
►https://www.youtube.com/c/FutureStudi...

----------------------------------------

Follow us on social media to get updates on new content:
►  / futurestud_io  
►  / futurestudiouniversity  
►https://plus.google.com/+FutureStudio...

----------------------------------------

Full transcript:

Hey, what is up everyone? Norman from futurestud.io University here and welcome to another video in our Android Studio note series. In less than five minutes you'll learn a little trick to increase your productivity every single day.

Today, we've the generate code menu. This saves you a lot of time of manual work. For example, if you have this little class, this little POJO class, and now you want to create a constructor for it. You can hit the shortcut, which is command+N for Mac OS users, or Alt+Insert for Windows users, and you can hit for example constructor. You can say "you don't want any [parameters]" and it has an empty constructor. You didn't need to type anything. It'll do everything automatically for you. If you need all three [parameters], you select all three and you've a constructor for everything.

Even more powerful are the getter and setter options. For example, if I want a getter and setter for all three [fields]. Let's select all three and it has everything generated for me. This saves you so much time if you have to write a lot of POJO classes, so please be aware of this option. If you have custom naming you can even configure the naming settings in the settings. So that's not an excuse!

There are even more actions, for example, you can use the toString() method and it'll generate a toString() method for you.

Please look at the options, it'll save you so much time over the next few months aaaaannnd that's it.

Thank you for watching! If you didn't know about this option before, give this video a thumbs up and make it rock.


Watch video My Favorite Android Studio Shortcut: Generate Code! online without registration, duration hours minute second in high quality. This video was added by user Future Studio 25 September 2017, don't forget to share it with your friends and acquaintances, it has been viewed on our site 2,887 once and liked it 61 people.