Android UIandOpenGLThreading

Android UIandOpenGLThreading

Language :
Platform :

Go :

Android app to try Handler between UI and OpenGL threads.

Project Download Contributors


Changes: adding interesting UI bits to feed into a Handler implementation.

Current status: complete and published as Alpha-test app to Play store

Why bother? This is a sandbox example app with Handler methods to play with communications between the UI thread and the OpenGL thread

Play store - downloadable test app - try it here:


Other: This app also incorporates experiments in:

  • Constraint layout
  • ButterKnife
  • SeekBar features
  • Fling (mouse motion - Geeks mostly fling Flying Discs normally)

Build with: Android Studio 2.2.2

See also:

Threading Performance 101. (Android Performance Patterns Season 5)

Gif movie

Demonstrates what this app has implemented. Note that the sampling frequency is low enough so that the spin looks jerky - this is Nyquist in action. Try the app for the real look.

Note: gif movie made with the following tool:


"HelloOpenGLES20" sample app, as located inside the file:
This app forms the base GL operation - and the UI components were added to form the sandbox app by myself.

Speedometer custom view, courtesy of:
compile ''

Android: Understanding OnDrawFrame, FPS and VSync (OpenGL ES 2.0)


What is with the wierd leading "0" in the name? My Nexus 4 does NOT allow sorting apps by installation order, so new installs are mixed in with all the other apps. In self-defense I prepend a digit so that the test app appears first in the order. You do what you gotta to in order to stay on the lee side of insanity.

Release builds

For a release build, you need to add a file to the gradle folder. See this guide:

    Leave a Reply

    Your email address will not be published. Required fields are marked *

    nineteen − eight =