Hello and thanks always for the help.
Right now I am following a tutorial (om android programming)
So for example, say I type something like this
it can happen that the class "Button" is not imported so Android Studio marks it with red.
the tutorial says that to correct this I can point there with my cursor and type ALT+ENTER
well, I have a mac, so I tried basically Option +Enter...
it works sometimes..... and sometimes it doesnt. (Once it gave me some new element (GoogleApiClient) added by google or something)
Anyway. First question: How can you correct this so that the necessary import appears above in my code ?
Also Second Question and actually very basic and important one!
How do you "undo" things on Android studio. I mean there seems to be a "normal" undo and redo button on the menu but they don't undo things on my code!!! They actually -for example if I am in the java code switch to the XML screen or something like that. I can never "undo" if I say deleted a whole function by accident ot things like that. Any help greatly appreciated
Right now I am following a tutorial (om android programming)
So for example, say I type something like this
Code:
private Button mybutton;
it can happen that the class "Button" is not imported so Android Studio marks it with red.
the tutorial says that to correct this I can point there with my cursor and type ALT+ENTER
well, I have a mac, so I tried basically Option +Enter...
it works sometimes..... and sometimes it doesnt. (Once it gave me some new element (GoogleApiClient) added by google or something)
Anyway. First question: How can you correct this so that the necessary import appears above in my code ?
Code:
import android.widget.Button;
Also Second Question and actually very basic and important one!
How do you "undo" things on Android studio. I mean there seems to be a "normal" undo and redo button on the menu but they don't undo things on my code!!! They actually -for example if I am in the java code switch to the XML screen or something like that. I can never "undo" if I say deleted a whole function by accident ot things like that. Any help greatly appreciated