Activity in Android
Normally, a Java p'rogram starts from an object, then that object will create some开发者_开发百科 GUI objects (window) and call the "Show" method
So, is there any way to do the same thing in Android, since, by default in Android, a program runs from an object created by a class which extended from Activity class?
So, is there any way to do the same thing in Android, since, by default in Android, a program runs from an object created by a class which extended from Activity class?
No, sorry. Writing Android applications is a bit more like writing a servlet in that respect. When you write a servlet, you do not write a main()
method, because what you are writing is really a plugin to a larger framework. Similarly, writing an Android application is really writing a series of plugins to a larger framework, so you do not write a main()
method in Android, either.
精彩评论