I use eclipse to write android programs as advice by google.
But when I write import android.
it became import android.R.anim;.
automatically.
I would like to use开发者_高级运维 content assist, but this behavior is annoying. How can I modify it?
EDIT:
Go into Eclipse -> Preferences
Select Java -> Editor -> Content Assist
In the box in the bottom "Auto-Activation", uncheck the checkbox "Enable Auto-Activation"
See if this helps you. It will disabled the auto-fill, and you will need to press ctrl+space to activate the auto-fill.
If this does not work, then:
By using Eclipse I'd recommend not writing imports where you are importing android-specific classes. Eclipse is smart enough to suggest the classes you need when you need them, organizing your imports automatically.
The only time I ever write the import statements is when I'm importing classes that I've written myself and when Eclipse can not find them.
Let's say you need the class Bitmap from Android.
In your class-file just write:
private Bitmap myBitmap;
And Eclipse will automatically suggest:
android.graphics.Bitmap
and import the correct class:
import android.graphics.Bitmap;
精彩评论