Skip to content

Commit

Permalink
fix: Hide contact and bio fields in organizer details if null
Browse files Browse the repository at this point in the history
  • Loading branch information
ShridharGoel committed Sep 1, 2019
1 parent 075169c commit de8204f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions app/src/main/res/layout/organizer_detail_layout.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

<import type="com.eventyay.organizer.utils.DateUtils" />

<import type="android.text.TextUtils"/>

<variable
name="user"
type="com.eventyay.organizer.data.user.User" />
Expand Down Expand Up @@ -106,7 +108,7 @@
android:gravity="center_vertical"
android:padding="@dimen/spacing_small"
android:text='@{ user.contact }'
android:visibility='@{user.contact.equals("") ? View.GONE : View.VISIBLE}' />
android:visibility='@{ TextUtils.isEmpty(user.contact) ? View.GONE : View.VISIBLE }' />

<LinearLayout
android:layout_width="wrap_content"
Expand Down Expand Up @@ -142,7 +144,7 @@
android:gravity="center_vertical"
android:padding="@dimen/spacing_small"
android:text='@{ user.details }'
android:visibility='@{user.details.equals("") ? View.GONE : View.VISIBLE}' />
android:visibility='@{ TextUtils.isEmpty(user.details) ? View.GONE : View.VISIBLE}' />

</LinearLayout>

Expand Down

0 comments on commit de8204f

Please sign in to comment.