Skip to content

Commit

Permalink
Merge pull request jrvansuita#10 from marbat87/master
Browse files Browse the repository at this point in the history
Fields visibility
  • Loading branch information
jrvansuita authored Feb 20, 2017
2 parents fb9e3c5 + 6cffb7a commit e97804a
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,11 @@ private void bind() {

public void build(AboutBuilder bundle) {
tvName.setText(bundle.getName());
tvName.setVisibility(bundle.getName() == null || bundle.getName().isEmpty() ? GONE : VISIBLE);
tvSubTitle.setText(bundle.getSubTitle());
tvSubTitle.setVisibility(bundle.getSubTitle() == null || bundle.getSubTitle().isEmpty() ? GONE : VISIBLE);
tvBrief.setText(bundle.getBrief());
tvBrief.setVisibility(bundle.getBrief() == null || bundle.getBrief().isEmpty() ? GONE : VISIBLE);
tvAppName.setText(bundle.getAppName());
tvAppTitle.setText(bundle.getAppTitle());

Expand All @@ -109,7 +112,7 @@ public void build(AboutBuilder bundle) {
if (bundle.getBackgroundColor() != 0)
cvHolder.setCardBackgroundColor(bundle.getBackgroundColor());

appHolder.setVisibility(bundle.getAppName().isEmpty() ? GONE : VISIBLE);
appHolder.setVisibility(bundle.getAppName() == null || bundle.getAppName().isEmpty() ? GONE : VISIBLE);

if (appHolder.getVisibility() == VISIBLE)
setDivider(bundle, appHolder);
Expand Down

0 comments on commit e97804a

Please sign in to comment.