1
votes

I have used jQuery Mobile 1.3 for Worklight 5.0.6 development. I find that some of the functionalities such as Transitions, Panels and Popup Menu are not smooth in real device (Samsung Galaxy S3 & Samsung Note II, Android 4.1.1). It is poor and quite lag during display.

As Phonegap framework is used by Worklight ultimately, I have created a same mobile application using Phonegap and the performance is dramatically smoother than that using Worklight...

May I know why is it so and is there any way to improve the UI performance?

Thanks a lot.

Here is the code for the testing app: Worklight, PhoneGap

1
Are you comparing same versions of Cordova / Phonegap with Worklight? Worklight 5.0.6 should be using 2.3.0, if I recall correctly. Assuming you're comparing same versions: I'll be interested in looking at both apps you described (or a simplified version that reproduces the performance woes) if you share them.cnandreu
Yes, I am using 2.3.0 for comparison. Please find the project here: Worklight and PhoneGap. Basically there are two buttons in the header. One is for opening the Panel and another one is for opening the pop-up menu. Many Thanks.red23jordan
Check if hardware acceleration is enabled in your Worklight project, maybe it will help: developer.android.com/guide/topics/graphics/hardware-accel.htmlIdan Adar
Hi Idan, I have tried to add "android:hardwareAccelerated="true" and the result is the same. It is lag during display.red23jordan

1 Answers

4
votes

Quick Fix for this issue:

In your AndroidManifest.xml

  1. Replace <supports-screens ...> node with the following:
    <supports-screens android:largeScreens="true" android:normalScreens="true" android:smallScreens="true" android:resizeable="true" android:anyDensity="true" />

  2. Replace <uses-sdk ...> node with <uses-sdk android:minSdkVersion="9"android:targetSdkVersion="17" /> and move direct after <supports-screens> Node.

  3. Add screenSize to android:configChange attribute under main Activity.

  4. Build against SDK Version which greater than 3.2. (Click properties on your Android project and then click on Android, see screenshot).

Try to install and run your Android application again.