Forum > CustomDrawn

CustomDrawn on Android 5.0

(1/3) > >>


I just want to ask if you have tried CustomDrawn components on Android 5?

My sample project works on 4.x but not on 5.0.
If I remove all customdrawn components and units, then the app works also on 5.0. ( at least I can see an empty form and it does not close/crash itself :-)




Yes I succesfully ran in Android 5.0 a project containing CustomDrawn components : your own TestAndroid program shipped with LazToApk, which contains only CDButtons from this package.

However, this was several months ago. At this time there was a bug in LazToApk and I was unable to make any other project (and I sent you a mail and gave up).

Now the bug is fixed (THANKS !), but like you I can't run anything on Android 5.0  (I have no other version).

So, It is probably not the Android version responsible for the trouble, but it could be the Android API used (I use currently API21) or possibly CustomDrawn components which have been improved ?

I can't say more but hope this helps a little...

Best regards

Question : how did you managed to remove all CD components and uses ?

Starting from you TestAndroid program, I can remove everything but in the .lpr remains :

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---uses [b] customdrawnint,[/b]  Interfaces,  Forms,  Essaimain; exports  Java_com_pascal_lclproject_LCLActivity_LCLOnTouch name 'Java_com_pascal_essai_LCLActivity_LCLOnTouch',  Java_com_pascal_lclproject_LCLActivity_LCLDrawToBitmap name 'Java_com_pascal_essai_LCLActivity_LCLDrawToBitmap',  Java_com_pascal_lclproject_LCLActivity_LCLOnCreate name 'Java_com_pascal_essai_LCLActivity_LCLOnCreate',  Java_com_pascal_lclproject_LCLActivity_LCLOnMessageBoxFinished name 'Java_com_pascal_essai_LCLActivity_LCLOnMessageBoxFinished',  Java_com_pascal_lclproject_LCLActivity_LCLOnKey name 'Java_com_pascal_essai_LCLActivity_LCLOnKey',  Java_com_pascal_lclproject_LCLActivity_LCLOnTimer name 'Java_com_pascal_essai_LCLActivity_LCLOnTimer',  Java_com_pascal_lclproject_LCLActivity_LCLOnConfigurationChanged name 'Java_com_pascal_essai_LCLActivity_LCLOnConfigurationChanged',  Java_com_pascal_lclproject_LCLActivity_LCLOnSensorChanged name 'Java_com_pascal_essai_LCLActivity_LCLOnSensorChanged',  Java_com_pascal_lclproject_LCLActivity_LCLOnMenuAction name 'Java_com_pascal_essai_LCLActivity_LCLOnMenuAction',  JNI_OnLoad name 'JNI_OnLoad',  JNI_OnUnload name 'JNI_OnUnload';  

I can't remove "use customdrawnint" without removing all exports.
Removing them all or none, I still get the same message on Android 5 : the application stopped.

Could you upload here a minimal project without CD, working on Android 5 ?



here is the sample project without CustomDrawn components which runs on Android 5 Simulator.



Thanks for the sample.
It is not very different of mine, you have only kept more uses referencing CustomDrawn units...

I can't run the emulator (probably not enough memory) but after I copy and install the project4.apk sucessfully built by LazToApk, on a tablet running Android 5.01, the same thing happens : "program was stopped".

Anyone knows if there is a log or some way to know the reason for this message ?

The only thing I found is that the AndroidManifest.xml contains binary characters, and this is surprising for an xml...

Best regards


[0] Message Index

[#] Next page

Go to full version