Baitha is a library designed to make Scala development on Android easier and more fun. It leverages some of Scala’s features such as mix-ins and implicit conversions to make Android development with Scala a bit more idiomatic.
Baitha is still under heavy development. Some of its current features include:
- AlertDialogBuilder
-
An wrapper around Android’s
AlertDialog.Builder
class that provides some implicit conversions and a mini-DSL. - BuildMode
-
A trait that makes converting between debug/production code easier.
- EnhancedViews
-
Provides some implicit conversions to make adding listeners as functions.
- Logger
-
A replacement logging interface inspired by RoboGuice.
- SdkVersions
-
Offers conditional execution depending on the runtime version of the Android platform.
- TypedColumn and TypedCursorWrapper
-
An easier way to get data out of a cursor.
Baitha was originally designed to be used as an Android library project. Unfortunately, due to breaking changes from the Android SDK, SBT, and the SBT android-plugin, Scala-based library projects are not supported at this time.
However, because Baitha does not contain any other libraries, resources, or assets, it is possible to use it as a binary-only library using SBT’s library management mechanism.
In order to use Baitha in your project, you will need to add a new resolver to
your project. Baitha’s snapshots may be found at
http://sattvik.github.com/baitha/snapshots
. To add this to your project, you
will need to add the resolver as follows:
resolvers += "Baitha snapshots" at "http://sattvik.github.com/baitha/snapshots"
Next, you will need to add the dependency, using something like:
0ibraryDependencies += "com.sattvik" %% "baitha" % "0.1.1-SNAPSHOT",
As this project is very new, there is no process yet for contributing to the code. For now, your best bet is to open an issue or submit a pull request.
Copyright © 2011-2012 Sattvik Software & Technology Resources, Ltd. Co. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.