Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Force Android Studio to show light bulb

Say I type the following field

field = "I am field";

In Eclipse as soon as I place the mouse on field it shows me a list of options from which I can select create local variable field.

In Android Studio, the lightbulb is a headache for me. Sometimes it appears quickly, sometimes it takes forever to appear.

Example of lightbulb

Is there a way to force it to appear?

like image 986
Katedral Pillon Avatar asked Apr 24 '15 22:04

Katedral Pillon


2 Answers

Are you talking about using Alt + Enter?

This link might help: https://www.jetbrains.com/idea/help/keyboard-shortcuts-you-cannot-miss.html

Pressing Alt + Enter results in the drop-down menu with correction options in this case:

enter image description here

like image 78
user2511882 Avatar answered Nov 19 '22 19:11

user2511882


  1. In the Android studio Settings/Keymap "shortcut Ctrl+Alt+S"

search for usage of "Alt + Ent" as below image if its not assigned for any action plz go for No. 2

Android studio shortcuts


  1. In the Android studio Settings/Editor/Intentions.

Check whatever you want to show Intention in are checked or not as below photo

Intention


  1. Double check no.1 is working fine and you found usage of "Alt + Ent" shortcut

[You can find the solution on official Jet brains website]

Intellij IDEA keyboard shortcuts

Intention actions

like image 41
Ahmed Saied Avatar answered Nov 19 '22 18:11

Ahmed Saied