- quick testing using me4se instead of having to use the Android emulator for everything
- no limit on number of views nesting
- you can write graphical apps that run on J2SE and Android and take advantage of everything they have in common plus ColorMatrix as me4se adds this class
- You can use the same tool (ThinG) to design the UI for all version of your app
- libraries can have resources bundled in a jar. SwingME uses standard java rescources and not android ones.
- Nice bounce effect on all scrolling areas, even if native Android Lists do not bounce
- Transitions from screen to screen
- ScrollPane supports thumb scroller, for dragging
- ScrollBar is shown only when needed, and fades away
- Lists:
- faster when the renderer is very complex
- optimised, buffered, creates multiple components
- if items are of different size, it does not need to check ALL the sizes to know how big to make the scrollbar
- supports sections
- header+footer (items in the list that are unrelated to the rest of the list and are at the top or bottom)
- supports fading when scrolling
- supports position overlay, show you what section you are in, in the list
- search and filtering out of the box
- sections can be collapsed and expanded
- multiple/single edit mode in lists support out of the box
Here is a guide on building a SwingME app for Android. there may be a better way of doing this, but i have not worked that out yet, so for now this is what i do.
From the File menu select "New" then "Other"
Give your project a name, and tick the minimum Android API level for SwingME 1.6
Include AndroidME as a library project. In your project properties, add the created project under the ‘Libraries’ section of the ‘Android’ category.
Now we need to create new Activity that will run the "AndroidMeActivity". Create a AndroidManifest.xml and put this into there:
1 <?xml version="1.0" encoding="utf-8"?> 2 <manifest xmlns:android="http://schemas.android.com/apk/res/android" 3 package="hello.world" 4 android:versionCode="1" 5 android:versionName="1.0"> 6 <application android:name="net.yura.android.AndroidMeApp" android:icon="@drawable/icon" android:label="@string/app_name" android:theme="@style/android:Theme.Light.NoTitleBar"> 7 <activity android:name="net.yura.android.AndroidMeActivity" 8 android:launchMode="singleTask" 9 android:label="@string/app_name" 10 android:windowSoftInputMode="adjustResize" 11 android:configChanges="orientation|keyboard|keyboardHidden"> 12 <intent-filter> 13 <action android:name="android.intent.action.MAIN" /> 14 <category android:name="android.intent.category.LAUNCHER" /> 15 </intent-filter> 16 </activity> 17 </application> 18 </manifest> 19The way the that AndroidME knows what to start is by looking for a .jad file inside your "assets" dir, this file will be the ONLY file inside your assets dir as all your other app assets will be added as extra source folders in the "Source" tab of "Java Build Path"
Here is an example of what will go inside the jad file, unlike J2ME jad files no additional fields are needed.
MIDlet-1: TestMIDlet,,net.yura.mobile.test.MyMidletYou can specify multiple files that extend Midlet like this:
MIDlet-1: TestMIDlet,,net.yura.mobile.test.MyMidlet MIDlet-2: HelloMIDlet,,net.yura.mobile.test.SimpleMidlet MIDlet-3: AndroidTest,,net.yura.android.TestMIDletThen when the Activity is launched it will present the user with a list of Apps to run