Skip to content

Commit

Permalink
added setInnerView method
Browse files Browse the repository at this point in the history
  • Loading branch information
Alessandro Sperotti committed Apr 20, 2018
1 parent 155bcb7 commit 76fb260
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,7 @@ protected void onFinishInflate() {

card = findViewById(R.id.card);

ViewStub stub = findViewById(R.id.viewStub);
stub.setLayoutResource(innerViewRes);
innerView = stub.inflate();
setInnerView(innerViewRes);

containerView = findViewById(R.id.viewContainer);

Expand Down Expand Up @@ -283,6 +281,12 @@ public void setIcon(int resId){
}
}

private void setInnerView(int resId){
ViewStub stub = findViewById(R.id.viewStub);
stub.setLayoutResource(resId);
innerView = stub.inflate();
}


@Override
public void setOnClickListener(@Nullable OnClickListener l) {
Expand Down

0 comments on commit 76fb260

Please sign in to comment.