Skip to content
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:

Clone this wiki locally