You've already forked lazarus-ccr
Small improvements to the example
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2173 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -16,8 +16,10 @@ public class LCLActivity extends Activity
|
|||||||
public LCLSurface(Context context)
|
public LCLSurface(Context context)
|
||||||
{
|
{
|
||||||
super(context);
|
super(context);
|
||||||
|
// Allows View.postInvalidate() to work
|
||||||
|
setWillNotDraw(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override protected void onDraw(Canvas canvas)
|
@Override protected void onDraw(Canvas canvas)
|
||||||
{
|
{
|
||||||
int lWidth = getWidth();
|
int lWidth = getWidth();
|
||||||
@ -43,16 +45,17 @@ public class LCLActivity extends Activity
|
|||||||
// setContentView(tv);
|
// setContentView(tv);
|
||||||
LCLSurface lclsurface = new LCLSurface(this);
|
LCLSurface lclsurface = new LCLSurface(this);
|
||||||
setContentView(lclsurface);
|
setContentView(lclsurface);
|
||||||
|
lclsurface.postInvalidate();
|
||||||
}
|
}
|
||||||
|
|
||||||
// JNI table of functions
|
// JNI table of functions
|
||||||
public native String stringFromJNI();
|
public native String stringFromJNI();
|
||||||
public native int intFromJNI();
|
public native int intFromJNI();
|
||||||
public native int LCLDrawToBitmap(int width, int height, Bitmap bitmap);
|
public native int LCLDrawToBitmap(int width, int height, Bitmap bitmap);
|
||||||
|
|
||||||
public long nativeCodeLoaded=0;
|
public long nativeCodeLoaded=0;
|
||||||
|
|
||||||
static
|
static
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user