Showing posts with label faq. Show all posts
Showing posts with label faq. Show all posts

Wednesday, February 17, 2010

Where is the Color class?

Same case with Point2D, Java's usual Color class which should be under java.awt package could be found under Android's android.graphics package.

They needed to remove some functionality of the class thus came need to replace the usual Color class. Methods such as brighter and darker were removed.

JASAfA's Color class
Progress with JASAfA has been going smoothly. ActionScript's Color class is called which is accessible under ColorTransform flash.geom package. Likewise, JASAfA's Color class is accessible under droid.geom package.

Friday, February 12, 2010

Alternative to Point2D

Given that AWT is not supported in Android API, the Point2D class, which is useful for writing 2D graphics, is missing either.

Point2D is traditionally accessible under java.awt.geom package but not dependent on the AWT framework so why was it not included in Android API? The answer is, Android have Point and PointF classes. Although among the two, PointF is my personal favorite.

Other Point class alternative
I've introduced JASAfA earlier, which happens to have another Point class which works like its ActionScript-counterpart. JASAfA's Point class is accessible under droid.geom package.

Thursday, February 4, 2010

3 Things You Need To Know About Android SDK

Android uses Dalvik
Dalvik Virtual Machine is a minimalistic implementation of the Java platform. Android apps are written in Java programming language but it is being compiled to a format that Dalvik could understand -- the DEX file, or the Dalvik EXecutable. This DEX format is the output of compiling Java .CLASS files -- not Java source codes.

J2ME won't run on Android
Your J2ME experience will be relevant to writing Android apps, but your J2ME apps won't run on Android. Dalvik VM implements a different set of Java API for mobile -- think of Java and J++ as you think of J2ME and Dalvik.

SDK uses Qemu
Qemu is a virtual machine that emulates a real machine and boots up a guest operating system inside your computer -- in this case, it's the Android OS that gets executed. This basically answers why after pressing Ctrl+F11 on Eclipse, the emulator takes so long to display your running your app and sometimes unresponsive.