scaloid是一个Android的开发库。使用Scala让代码更加简洁,清晰。
For example, the code block shown below:
val button = new Button(context) button.setText("Greet") button.setOnClickListener(new OnClickListener() { def onClick(v: View) { Toast.makeText(context, "Hello!", Toast.LENGTH_SHORT).show() } }) layout.addView(button)
is reduced to:
SButton("Greet", toast("Hello!"))
UI Layout without XML
Layout context
Styles for programmers
Automatic layout converter
Lifecycle management
Asynchronous task processing
Implicit conversions
Shorter listeners
Database cursor
Traits
Smarter logging
Improved getters/setters
Classes
Concise dialog builder
Beauty ArrayAdapter
Dynamically Preferences Read in blog
Binding services concisely Read in blog