From caad03f788a0fcc9b01da634a4e124325a85a3ee Mon Sep 17 00:00:00 2001 From: sekelsenmat Date: Mon, 28 Nov 2011 07:29:20 +0000 Subject: [PATCH] Small improvements to the example git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2173 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- .../android/src/com/pascal/lcltest/LCLActivity.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/examples/androidlclv2/android/src/com/pascal/lcltest/LCLActivity.java b/examples/androidlclv2/android/src/com/pascal/lcltest/LCLActivity.java index 06a234a42..47a0f534f 100755 --- a/examples/androidlclv2/android/src/com/pascal/lcltest/LCLActivity.java +++ b/examples/androidlclv2/android/src/com/pascal/lcltest/LCLActivity.java @@ -16,8 +16,10 @@ public class LCLActivity extends Activity public LCLSurface(Context context) { super(context); + // Allows View.postInvalidate() to work + setWillNotDraw(false); } - + @Override protected void onDraw(Canvas canvas) { int lWidth = getWidth(); @@ -43,16 +45,17 @@ public class LCLActivity extends Activity // setContentView(tv); LCLSurface lclsurface = new LCLSurface(this); setContentView(lclsurface); + lclsurface.postInvalidate(); } // JNI table of functions public native String stringFromJNI(); public native int intFromJNI(); public native int LCLDrawToBitmap(int width, int height, Bitmap bitmap); - + public long nativeCodeLoaded=0; - - static + + static { try {