0

For example, When I want to create a reference type of TextView :

TextView tv;

I receive an error which tells me to import android.widget.TextView.

Now, I know how the whole Import packages concept works, but I always wondered how does the Content Assist of eclipse displays the TextView Class of android BEFORE I imported it to my project? how it knows it even exists and how it know it exists in android.widget.TextView.

Thanks!

4

2 回答 2

0

This is because you must have installed the Android SDK in eclipse. And as part of the sdk that class is available to eclipse and it provides it as part of code assist.

于 2013-07-10T14:30:58.857 回答
0

because you have already imported the android library into your project. you can try this: open project properties -> click Java Build Path -> choose Libraries -> remove android library. then content assist will not work.

于 2013-07-10T14:40:19.953 回答