In the post "Apply animations on layout changes using LayoutTransition" apply animation for deveice with API level 11 or higher. To apply Android 3.0 animation API on old devices, NineOldAndroids is an alternative.
remark: NineOldAndroids doesn't have LayoutTransition currently
NineOldAndroids is a Android library for using the Honeycomb (Android 3.0) animation API on all versions of the platform back to 1.0!
Animation prior to Honeycomb was very limited in what it could accomplish so in Android 3.x a new API was written. With only a change in imports, we are able to use a large subset of the new-style animation with exactly the same API.
This library also includes support for animating rotation, translation, alpha, and scale on platforms prior to Honeycomb!
Detect touch event in Processing for Android
Last exercise demonstrate the basic "Hello World of Processing for Android". This exercise show to to detect touch event, by implement surfaceTouchEvent() method.
import android.view.MotionEvent;
boolean showEvent = false;
int evAction;
int evX, evY;
void setup()
{
size(displayWidth, displayHeight);
background(0);
stroke(255);
strokeWeight(3);
}
void draw()
{
if(showEvent){
text("Action: " + str(evAction), 10, 50);
ellipse(evX, evY, 10, 10);
showEvent = false;
}
}
public boolean surfaceTouchEvent(MotionEvent event)
{
evAction = event.getAction();
evX = mouseX;
evY = mouseY;
showEvent = true;
return super.surfaceTouchEvent(event);
}
When Android Meets Maps, Google I/O 2013 video
Build intuitive and compelling mobile map apps with the Google Maps Android API. This session will demonstrate innovative ways to integrate maps and Android sensors with Google services on Android. We will explore concepts on visualizing contextual, personalized and timely information.
Related: A simple example using Google Maps Android API v2
Hello World of Processing for Android
With Download and install Processing software and Setup Processing for Android development, we can noe prepare our first Hello World using Processing for Android.
- Start Processing and switch to Android Mode, by selection on the top-right pull-down box.
Enter the code:
With Android device connected, you can save and Run on Device under Sketch menu selection.
Next:
- Detect touch event in Processing for Android
- Another example code: Processing on desktop vs Processing for Android
- Start Processing and switch to Android Mode, by selection on the top-right pull-down box.
Enter the code:
void setup()
{
size(displayWidth, displayHeight);
background(0);
}
void draw()
{
fill(204, 102, 0);
rect(30, 20, 55, 55);
text("hello Android + Processing", 100, 100);
}
With Android device connected, you can save and Run on Device under Sketch menu selection.
Next:
- Detect touch event in Processing for Android
- Another example code: Processing on desktop vs Processing for Android
Setup Processing for Android development
Processing for Android project is aim to make it foolishly easy to create Android apps using the Processing API.
To setup Processing development tool for Android development, you have to install Android Developer Tools (ADT) in your system in advance.
Also you have to configure your Android SDK Manager to install Android 2.3.3 (API 10) - in Eclipse for Android Developer Tools, select Window -> Android SDK Manager:
otherwise you will have error of Unable to resolve project target 'android-10' when compile your Processing sketch.
- Download and install Processing software
Setup Processing for Android development:
Start Processing software:
- in Ubuntu, open Terminal, switch to your installed directory of Processing, type the command:
$./processing
- Select Add Mode in the Top-Right pull-down box.
- Select Android Mode, and click Install.
- You will be asked to select Android SDK installed location, click Yes.
- In the next dialog, select your installed location of Android SDK.
In my case of running on Ubuntu 13.04 with Xubuntu desktop, I cannot open sub-directory of Android in Folders box by clicking on Android, but I can direct enter Android/sdk/ in Selection box.
- Now you can switch to Android Mode in Top-Right pop-down box.
Next:
- Hello World of Processing for Android
- Another example code: Processing on desktop vs Processing for Android
To setup Processing development tool for Android development, you have to install Android Developer Tools (ADT) in your system in advance.
Also you have to configure your Android SDK Manager to install Android 2.3.3 (API 10) - in Eclipse for Android Developer Tools, select Window -> Android SDK Manager:
otherwise you will have error of Unable to resolve project target 'android-10' when compile your Processing sketch.
- Download and install Processing software
Setup Processing for Android development:
Start Processing software:
- in Ubuntu, open Terminal, switch to your installed directory of Processing, type the command:
$./processing
- Select Add Mode in the Top-Right pull-down box.
- Select Android Mode, and click Install.
- You will be asked to select Android SDK installed location, click Yes.
- In the next dialog, select your installed location of Android SDK.
In my case of running on Ubuntu 13.04 with Xubuntu desktop, I cannot open sub-directory of Android in Folders box by clicking on Android, but I can direct enter Android/sdk/ in Selection box.
- Now you can switch to Android Mode in Top-Right pop-down box.
Next:
- Hello World of Processing for Android
- Another example code: Processing on desktop vs Processing for Android
Download and install Processing software
Processing is an open source programming language and environment for people who want to create images, animations, and interactions. Initially developed to serve as a software sketchbook and to teach fundamentals of computer programming within a visual context, Processing also has evolved into a tool for generating finished professional work. Today, there are tens of thousands of students, artists, designers, researchers, and hobbyists who use Processing for learning, prototyping, and production.
To download and install is very straightforward:
Visit http://processing.org/, select Download, download the Mac, Windows, or Linux version, depending on what machine you have.
Reference: Getting Started
Next:
- Setup Processing for Android development
- Hello World of Processing for Android
To download and install is very straightforward:
Visit http://processing.org/, select Download, download the Mac, Windows, or Linux version, depending on what machine you have.
Reference: Getting Started
Next:
- Setup Processing for Android development
- Hello World of Processing for Android
الاشتراك في:
الرسائل (Atom)















