0

I like to implement Mandelbrot fractal application for learning Android. I have seen some example, In which the application extends "android.view.View" interface.( not "android.app.Activity" interface). In eclipse, with Android 3.2, How can I create a project which extends "android.view.View" interface?

See this. Color gradient for Mandelbrot Android application doesn't work

thank you, Regards, Robo

Community
  • 1
  • 1
RoboAlex
  • 4,895
  • 6
  • 31
  • 37

1 Answers1

1

It is not possible. View corresponds to GUI element like button or text field. Activity is a part of application that is responsible for displaying a GUI and managing its lifecycle. You can visit the Developer Guide for further explanation.

In the example you provided the View was definitely a part of layout of some Activity.

By the way, Activity and View aren't interfaces, the are classes. The interface word has a special meaning in Java: it is a declaration of operations that can be performed on the object that implements the interface but the actual implementation should be provided by the class of the object

Darth Beleg
  • 2,657
  • 24
  • 26
  • Yes..We have to create another class to implement "android.view" in addition to main class which extends "android.activity". – RoboAlex Dec 19 '11 at 16:26