-
Notifications
You must be signed in to change notification settings - Fork 4
Home
svenmeier edited this page Apr 21, 2012
·
10 revisions
Propoid's power and simplicity is based on a small core which allows you to use properties for your Java objects on Android:
public class Foo extends Propoid {
public final Property<String> bar = property();
public Foo() {
}
}
You can use whatever type you need for your properties, although the following restrictions have to be respected:
- all objects have to extend Propoid
- a default constructor has to be provided
- all fields have to be declared as final Property
Aspects allow you to intercept property access:
new PropertyAspect<String>(foo.bar) {
public String onSet(String value) {
if (value == null) {
throw new IllegalArgumentException();
}
super.onSet(value);
}
};
Based on this core functionality the following modules offer solutions for common problems on Android:
- Propoid-db is an object relation mapper (orm) for working with Sqlite
- Propoid-ui allows binding of properties to views
- Propoid-validation adds validation to your objects
- Propoid-util eases working with content and services