Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Sample Code >

graphics - API Demos

Drawable

ShapeDrawable
Demonstrates creating Drawables in XML.

OpenGL|ES

CameraPreview
Demonstrates capturing the image stream from the camera, drawing to a surface (extending SurfaceView) on a separate thread (extending Thread).
GL SurfaceView
Demonstrates how to perform OpenGL rendering in to a SurfaceView.
Code:
GLSurfaceViewActivity.java
Layout:
hello_world.xml
PolyToPoly
Demonstrates calling the {@link android.graphics.Matrix.html#setPolyToPoly(float[],int,float[],int,int)} method to translate coordinates on a canvas to a new perspective (used to simulate perspective).
DrawPoints
Demonstrates using the {@link android.graphics.Paint} and {@link android.graphics.Canvas} objects to draw random points on the screen, with different colors and strokes.
PathEffects
Demonstrates the use of {@link android.graphics.Path} and various {@link android.graphics.PathEffect} subclasses.
SurfaceView Overlay
Shows how you can place overlays on top of a SurfaceView.
Code:
SurfaceViewOverlay.java, GLSurfaceView.java
Layout:
surface_view_overlay.xml
TouchPaint
Demonstrates the handling of touch screen events to implement a simple painting app.

Subdirectories

Files


 
 
  Published under the terms fo the Apache 2.0 License Design by Interspire