Links

Friday, August 14, 2015

Scaloid 4.0 is released

Today I release Scaloid 4.0, which includes lots of improvements.

Incompatible changes

Scaloid 4.0 is best with Android API Level 16, while still supports Level 10

Scaloid 4.0 distribution is compiled with Android API Level 16, still retaining compatibility with Level 10. Accessor methods and deprecation warning is based on API Level 16, so you have to carefully check the availability of API if you target lower version of Android. In our experience on building an App for Gingerbread, currently we found no obstruction that prevents building a Scaloid app for older devices.

To compile with Scaloid 4.0, you have to specify build time Android API in project.properties file as android-16 or higher.

LocalServiceConnection

Usual use case of LocalServiceConnection is:

val service = new LocalServiceConnection[MyService]
//...
service {
myService => // do something with myService
}

The implementation of apply() is changed to:

def apply[T](f: S => Unit): Unit = service.fold(onConnected(f))(f)

The block will be executed later if the service is not connected yet. Formally it was just did nothing when the service is not connected yet. This behavior now becomes ifAvailable. Then all the code using apply(...) should be changed to ifAvailable(...).

SArrayAdapter

Constructor parameter of SArrayAdapter is now java.util.List.

spinnerDialog

spinnerDialog returns Future[ProgressDialog].

End of incompatible changes

More convenient press-and-hold action

We provided the press-and-hold action callback from the last release. The sample code below increases the number on the TextView in every 100 milliseconds: