Skip to content

Commit

Permalink
Changing the example item subtitle
Browse files Browse the repository at this point in the history
  • Loading branch information
thiagokimo committed Sep 7, 2015
1 parent 7d5c7fe commit 2450701
Show file tree
Hide file tree
Showing 11 changed files with 38 additions and 23 deletions.
13 changes: 4 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
#Base

This is a base Android architecture that I most "agree" in the moment. The main objective of this repository is to show developers
how I would organize my Android code in future projects.
Base is a library that provides you a base architecture for your Android MVP's.

For more details of this library click [here](#url)

##Coming soon
- RxPresenter
The main objective of this repository is to show developers
how I would architect my Android code in future projects.

##Developed by

* Thiago Rocha - http://kimo.io - <[email protected]>
For more details of this library click [here](#url)

##License

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@
public class ExampleEntity extends BaseEntity {

private String name;
private int age;
private String title;

public ExampleEntity(String name, int age) {
public ExampleEntity(String name, String title) {
this.name = name;
this.age = age;
this.title = title;
}

public String getName() {
return name;
}

public int getAge() {
return age;
public String getTitle() {
return title;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public List<ExampleEntity> perform() {
List<ExampleEntity> items = new ArrayList<>();

for(int i = 0; i < 100; i++) {
items.add(new ExampleEntity(Faker.with(context).Name.firstName(), Faker.with(context).Number.positiveDigit()));
items.add(new ExampleEntity(Faker.with(context).Name.firstName(), Faker.with(context).Name.title()));
}

return items;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ public ExampleModel toModel(ExampleEntity entity) {
ExampleModel model = new ExampleModel();

model.setName(entity.getName());
model.setProfession(entity.getTitle());

return model;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

public class ExampleModel extends BaseModel {
private String name;
private String profession;

public String getName() {
return name;
Expand All @@ -12,4 +13,12 @@ public String getName() {
public void setName(String name) {
this.name = name;
}

public String getProfession() {
return profession;
}

public void setProfession(String profession) {
this.profession = profession;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public View getView(int position, View convertView, ViewGroup parent) {
TextView subtitle = (TextView) convertView.findViewById(R.id.subtitle);

title.setText(model.getName());
subtitle.setText(model.getModelId()+"");
subtitle.setText(model.getProfession());

return convertView;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@
public class ExampleEntity extends BaseEntity {

private String name;
private int age;
private String title;

public ExampleEntity(String name, int age) {
public ExampleEntity(String name, String title) {
this.name = name;
this.age = age;
this.title = title;
}

public String getName() {
return name;
}

public int getAge() {
return age;
public String getTitle() {
return title;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public List<ExampleEntity> perform() {
List<ExampleEntity> items = new ArrayList<>();

for(int i = 0; i < 100; i++) {
items.add(new ExampleEntity(Faker.with(context).Name.firstName(), Faker.with(context).Number.positiveDigit()));
items.add(new ExampleEntity(Faker.with(context).Name.firstName(), Faker.with(context).Name.title()));
}

return items;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ public ExampleModel toModel(ExampleEntity entity) {
ExampleModel model = new ExampleModel();

model.setName(entity.getName());
model.setProfession(entity.getTitle());

return model;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

public class ExampleModel extends BaseModel {
private String name;
private String profession;

public String getName() {
return name;
Expand All @@ -12,4 +13,12 @@ public String getName() {
public void setName(String name) {
this.name = name;
}

public String getProfession() {
return profession;
}

public void setProfession(String profession) {
this.profession = profession;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public View getView(int position, View convertView, ViewGroup parent) {
TextView subtitle = (TextView) convertView.findViewById(R.id.subtitle);

title.setText(model.getName());
subtitle.setText(model.getModelId()+"");
subtitle.setText(model.getProfession());

return convertView;
}
Expand Down

0 comments on commit 2450701

Please sign in to comment.