Skip to content

Commit

Permalink
* reset the res name if the string name is used and back
Browse files Browse the repository at this point in the history
  • Loading branch information
mikepenz committed Apr 20, 2015
1 parent b79b156 commit 0b9e841
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,13 @@ public T withSelectedIcon(int selectedIconRes) {

public T withName(String name) {
this.name = name;
this.nameRes = -1;
return (T) this;
}

public T withName(int nameRes) {
this.nameRes = nameRes;
this.name = null;
return (T) this;
}

Expand Down Expand Up @@ -315,6 +317,7 @@ public String getName() {
@Override
public void setName(String name) {
this.name = name;
this.nameRes = -1;
}

public int getNameRes() {
Expand All @@ -324,6 +327,7 @@ public int getNameRes() {
@Override
public void setNameRes(int nameRes) {
this.nameRes = nameRes;
this.name = null;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,13 @@ public class SectionDrawerItem implements IDrawerItem, Nameable<SectionDrawerIte

public SectionDrawerItem withName(String name) {
this.name = name;
this.nameRes = -1;
return this;
}

public SectionDrawerItem withName(int nameRes) {
this.nameRes = nameRes;
this.name = null;
return this;
}

Expand Down Expand Up @@ -91,11 +93,13 @@ public int getNameRes() {
@Override
public void setName(String name) {
this.name = name;
this.nameRes = -1;
}

@Override
public void setNameRes(int nameRes) {
this.nameRes = nameRes;
this.name = null;
}

@Override
Expand Down

0 comments on commit 0b9e841

Please sign in to comment.