Omnimaga
General Discussion => Technology and Development => Computer Programming => Topic started by: Binder News on May 15, 2011, 01:54:16 am
-
I'm starting this just for general discussion of programming for Android in Java. Discuss away.
-
The SDK is very well done, but the fragments/activities/surfaces/views confuse me a bit.
-
What exactly do you want to know?
-
Well, I guess the issue really comes with when each one is used...I don't fully understand all the functionality of the SDK yet, so I'm still learning about what situations are ideal to really look at using things such as either threads or timers for updating views, and even then whether I should update a regular view or a SurfaceView with callback or all those things. It's really just situational questions about what's the best way to do things...
-
Well, SurfaceViews are used for graphics rendering. My suggestion is to have an entirely separate thread entirely for the purpose of calling
c = surface.lockCanvas();
//draw on Canvas c
surface.unlockAndPost(c);
Regular views are used more for input events an such. For example, I have a regular view that I have extended and turned into a Joystick class. I have that separated from the SurfaceView that I use for rendering.
-
hmm speaking of java and android are you able to program and compile java into java bytecode and run it on android? I have tried to google this and never found the solution.. I would like it if I could do programming on say.. a motorola xoom.
-
As far as I know there isn't a way to write actual apps on the android itself...