Skip to content

Instantly share code, notes, and snippets.

View smaugho's full-sized avatar

Adrián Rivero smaugho

  • Wrocław, Poland
View GitHub Profile
@smaugho
smaugho / DecleX.java
Last active April 26, 2017 22:54
UserFragment Example
@EFragment(R.id.fragment_user)
public class UserFragment extends Fragment {
@Model
@UseModel
@Recollect(validate = true)
User user;
@Click
void next() {
$Recollect(user);
@smaugho
smaugho / DecleX.java
Last active April 26, 2017 22:59
@recollect with @PutOnAction
@Model
@Recollect
@PutOnAction(R.id.saveUser)
User user;
@smaugho
smaugho / DecleX.java
Last active April 26, 2017 23:01
Populate List in DecleX
@Model
@Populate
List<User> users;
@smaugho
smaugho / DecleX.java
Last active April 26, 2017 23:01
Populate and Recollect a Model
@Model
@Populate
@Recollect
@PutOnAction(R.id.saveUser)
User user;
@smaugho
smaugho / DecleX.java
Last active April 26, 2017 23:02
Validate Recollection
@Model
@Populate
@Recollect(validate = true)
@PutOnAction(R.id.saveUser)
User user;
@smaugho
smaugho / DecleX.java
Last active April 26, 2017 23:02
Recollect in DecleX
@Model
@Recollect
User user;
@Click
void saveUser() {
$PutModel(user);
}
@smaugho
smaugho / DecleX.java
Last active April 26, 2017 23:03
AndroidAnnotations Dependency Injection and Views Injection
@Bean
User_ user;
@ViewById
TextView userFirstName;
@ViewById
TextView userLastName;
@ViewById
@smaugho
smaugho / DecleX.java
Last active April 26, 2017 23:04
Populate field in DecleX
@Model
@Populate
User user;
@smaugho
smaugho / DecleX.java
Last active April 26, 2017 23:04
Address Model
@UseModel
class Address {
String street;
String number;
String city;
String country;
}
@smaugho
smaugho / DecleX.java
Last active April 26, 2017 23:08
User Model
@ServerModel(
baseUrl = "http://www.example.com",
get = "user/me"
)
@LocalDBModel
public class User {
@NotEmpty String firstName;
@NotEmpty String lastName;
@Email String email;