Android Studio Tips and Tricks [SUBSCRIBER]

栏目: IT技术 · 发布时间: 4年前

Code Refactoring

Learn how to convert older Java code to Kotlin using Android Studio, compare and show more code on a screen by splitting your screen horizontally or vertically and how to add actions on the Toolbar.

Learn how to rename files, fields, methods or classes. Rename a variable once and it will be changed through out your project. Discover how to Change Method Signatures: Change parameters and return types.

Extracting

3:32

Learn how to extract variables, methods, and parameters and easily create variables and methods from repeated code.

Trim down your bloated app by getting rid of unused files: find images that are no longer used and make your app smaller.

Stay up to date by learning how to convert your project and migrate to Androidx.

Using Android Studio to Navigate Your Codebase

Learn how to search through all of your files easily for any kind of text. Search in your whole project, a specific directory or a module. Use regular expressions or just match on case or by word.

In this episode learn how to navigate back and forth between files by showing a popup of your most recently used files. Also, discover how to use a keyboard shortcut to show the current classes methods and properties.

Use this keyboard shortcut to search actions in addition to files. If you have to remember one command, this is it.

Use this keyboard shortcut to search all usages of a method. This is one of the more useful commands as you can find where a method is being used throughout your code.

Mastering the Android Studio Editor

Learn how to easily move, duplicate and delete lines and methods. Edit the same word on multiple lines.

Use Android Studio to help fix your code. With Quick Fix, Android Studio will suggest solutions to your problems.

Reformat either your selection or the whole file to match your code style with a quick shortcut: learn various different ways of formatting code.

If you ever need to work on different problems with a different set of files, contexts will allow you to save many different sets.

Plugins: Power-Ups for Android Studio

Install this plugin to help you become a keyboard Ninja: learn how using menus causes a hint to show how you would call this command using the keyboard.

Learn how to use this plugin to create Kotlin data classes from JSON. If you already have examples of the data you receive, you can easily create all your model classes.

Miscellaneous Tricks

Learn what templates are and how to use current Kotlin templates. Then, learn how to create your own templates and which variables you can use.

Learn how to review and restore past changes to a file. Local History can be a life-safer: if you've ever accidentally reverted a file or changed it, Local History will show all the changes made to the file and allow you to put back any previous changes.


以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

深入浅出强化学习:原理入门

深入浅出强化学习:原理入门

郭宪、方勇纯 / 电子工业出版社 / 2018-1 / 79

《深入浅出强化学习:原理入门》用通俗易懂的语言深入浅出地介绍了强化学习的基本原理,覆盖了传统的强化学习基本方法和当前炙手可热的深度强化学习方法。开篇从最基本的马尔科夫决策过程入手,将强化学习问题纳入到严谨的数学框架中,接着阐述了解决此类问题最基本的方法——动态规划方法,并从中总结出解决强化学习问题的基本思路:交互迭代策略评估和策略改善。基于这个思路,分别介绍了基于值函数的强化学习方法和基于直接策略......一起来看看 《深入浅出强化学习:原理入门》 这本书的介绍吧!

在线进制转换器
在线进制转换器

各进制数互转换器

SHA 加密
SHA 加密

SHA 加密工具

HEX CMYK 转换工具
HEX CMYK 转换工具

HEX CMYK 互转工具