Reputation: 35
import android.text.EditText;
I can't import anything, when I press ALT + Enter
it appeared create test instead of import class, variable and all that. How to import the syntax above?
Upvotes: 1
Views: 2021
Reputation: 26961
Windows/Linux
To import you can use Ctrl+Alt+O which ask for each thing, after you have to press Alt+Enter to accept it.
If you want to change this behaviour to organize all imports go to File
-> Settings
-> Editor
-> General
-> Auto Import
-> Java
and:
change Insert imports on paste
for All
check Add unambigious imports on the fly
Mac
To import you can use +Alt+O which ask for each thing, after you have to press
+Enter to accept it.
To change all behaviour are same steps but location is in Android studio
> Properties
...
Upvotes: 1