Final is like constant Static is a global instance of a variable Public makes a varible,class, or method visable to all Protected makes a varible,class or method visable to a class that extends or inherits the class, or the class containing the protected varibles,methods Private makes a varible,class,mothod only visable/usable to the coontaining class and it' methods.
Default (what happens if you don't label it as public or protected or private) makes the var.,class,method viasable to all in that same package. Ex. if it is defined as or in com.myexample.myprogram.MyClass than MyClass can use it as. Well as any classes in com.myexample.myprogram however com.myexample.myprogram.subpackage.NewClass couldn't see it, use it. You may want to google those things to get a more detailed explaination. The top level class extends an Activity,Service, or Intent (this is an Android thing and not a specific java thing). It is setup in your Manifest file, so it knows there which class it should call under what cicumstance. For example I am writing a program which reads sms messages (which is defined as an intent) and to change the user varible and see reporting in a differnt activity defined in the manifest. The activity is defined so if you click on the icon, it opens, whereas if you recive a sms message, a different set of classes is called. As for you other questions, I haven't really played around with drawing a canvis. Happy coding, -Kitzy On Feb 12, 6:56 pm, BobG <[email protected]> wrote: > My app 'almost' works. Its like a clock (its an auto gauge) with a > resource bitmap as the dial and the needle is another resource that > reads into a canvas, and I can draw it rotated like they do with the > lunar lander example. What I'd like to see is an example that uses the > onKeyDown keyevent.KEYCODE_A to increment a variable, and prints that > variable out using drawText. I'm confused about what is the top level > class. The activity? Then I need another view to draw the dial using > onDraw? Then I need an override to grab the key events, but by now the > member mCount that I declared to hold the count that gets printed out > is out of scope? I'm an Old C Programmer, and I cant quite grok what > needs to be public and protected and final and static. So basically, > if someone could show me this small example that increments a variable > on the A kay and prints it out, I think it would be very helpful. > Thanks in Advance. -- You received this message because you are subscribed to the Google Groups "Android Beginners" group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en

