summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/ui/GLRootView.java
diff options
context:
space:
mode:
authorOwen Lin <owenlin@google.com>2010-03-18 08:28:07 +0800
committerOwen Lin <owenlin@google.com>2010-03-30 15:54:59 +0800
commitc557947a5897106421fec68b082539317e4b25d0 (patch)
tree92f8095d59bca5ddbaaea95985753f1dc3793c8e /src/com/android/camera/ui/GLRootView.java
parent3eed8999c9fd92600c74225b671a2f03d7dd51d4 (diff)
downloadLegacyCamera-c557947a5897106421fec68b082539317e4b25d0.zip
LegacyCamera-c557947a5897106421fec68b082539317e4b25d0.tar.gz
LegacyCamera-c557947a5897106421fec68b082539317e4b25d0.tar.bz2
Improve GLListView UI.
1. Hide the scrollbar several seconds later. 2. Support fling operation now Change-Id: I5ab22c91f5781ae3bc4b5aa779407ee374eddaa4
Diffstat (limited to 'src/com/android/camera/ui/GLRootView.java')
-rw-r--r--src/com/android/camera/ui/GLRootView.java23
1 files changed, 17 insertions, 6 deletions
diff --git a/src/com/android/camera/ui/GLRootView.java b/src/com/android/camera/ui/GLRootView.java
index 966043d..f8869a6 100644
--- a/src/com/android/camera/ui/GLRootView.java
+++ b/src/com/android/camera/ui/GLRootView.java
@@ -6,6 +6,9 @@ import android.graphics.Matrix;
import android.graphics.PixelFormat;
import android.opengl.GLSurfaceView;
import android.opengl.GLU;
+import android.os.Handler;
+import android.os.HandlerThread;
+import android.os.Looper;
import android.os.Process;
import android.os.SystemClock;
import android.util.AttributeSet;
@@ -69,11 +72,20 @@ public class GLRootView extends GLSurfaceView
private int mFlags = FLAG_NEED_LAYOUT;
private long mAnimationTime;
+
private Thread mGLThread;
+ // TODO: move this part (handler) into GLSurfaceView
+ private final Looper mLooper;
+
public GLRootView(Context context) {
- super(context);
+ this(context, null);
+ }
+
+ public GLRootView(Context context, AttributeSet attrs) {
+ super(context, attrs);
initialize();
+ mLooper = Looper.getMainLooper();
}
void registerLaunchedAnimation(Animation animation) {
@@ -115,11 +127,6 @@ public class GLRootView extends GLSurfaceView
mFreeTransform.push(freeTransformation);
}
- public GLRootView(Context context, AttributeSet attrs) {
- super(context, attrs);
- initialize();
- }
-
public Transformation getTransformation() {
return mTransformation;
}
@@ -517,4 +524,8 @@ public class GLRootView extends GLSurfaceView
texture.setTexCoordSize(
(float) width / newWidth, (float) height / newHeight);
}
+
+ protected Looper getTimerLooper() {
+ return mLooper;
+ }
}