La JavaDoc au survol d'un objet, méthode, classe, annotation

La doc au survol (sans faire CTRL + Q), android studio description method on over

File > Settings > Editor > General > Show quick doc on mouse move.

View method information in Android Studio

Pour créer des blocs, statements

Une fois TABulé, commencez à saisir, par exemple :

inn	if not null - block
ifn	if null - block
iter	it will figure out the most likely variable you want to iterate over and generate a for loop for it
inst	check object type with instanceof block
itco	Iterate over collection
itit	Iterate over Iterator
itli	Iterate over List
iten	Iterate over Enumerator
foreach	Create a for each loop
fori	Create iteration loop
itar	Iterate elements of array
ittok	Iterate tokens from String
itve	Iterate element of Vector
ritar	Iterate elelemts of array in reverse order
psf	public static final block
thr	throw new block

Quels sont les paramètres possibles ?

CTRL + P dans les () de la méthode

Auto cast

CTRL + SHIFT + SPACE, une fois le type, la variable, l'affection et la ( saisie : "EditText e = ("

EditText e = (
// CTRL + SHIFT + SPACE,
EditText e = (EditText)

Commenter du code

  • CTRL + / pour commenter par ligne avec //
  • CTRL + SHIFT + / pour commenter par paragraphe avec /* */

La création et nommage de variable : CTRL + ALT + V

monObjet.getListMyElement();
// en sélectionnant l'expression (avec la souris ou avec CTRL + W), puis CTRL + ALT + V, on obtient la déclaration d'une nouvelle variable
List<MyElement> listMyElement = monObjet.getListMyElement();

IDEA: “Assign statement to new local variable”?

Où est ce utilisé ? find usage

ALT + F7 sur votre expression

Formater, réindenter le code : CTRL + ALT + L

Dans le menu "Code" :

  • CTRL + ALT + L : Reformat Code
  • CTRL + ALT + I : Auto-Ident Lines
  • CTRL + ALT + O : Optimize Imports

Choisir la vue

CTRL + TAB

Implémenter les méhodes

  • CRTL + I
  • CRTL + O

Changer la case en majuscule/minuscule toggle upper/lower case - Shortcut for Capitalizing in Android Studio

  • CTRL + SHIFT + U

Les raccourcis clavier d'Android Studio