Guest User

Untitled

a guest
Jun 22nd, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.01 KB | None | 0 0
  1. <TextView
  2. android:id="@+id/profileLblTtv"
  3. android:layout_width="270dp"
  4. android:layout_height="wrap_content"
  5. android:textStyle="bold"
  6. android:text="@string/profile_photo_gr"
  7. android:gravity="center"
  8. android:layout_marginTop="15dp"
  9. android:visibility="@{viewmodel.kalase(), default=gone}"
  10. app:layout_constraintTop_toBottomOf="@+id/reqfldsTtv"
  11. app:layout_constraintLeft_toLeftOf="parent"
  12. app:layout_constraintRight_toRightOf="parent" />
  13.  
  14. @Bindable
  15. public int kalase() {
  16. return userRole != null && userRole.getId() != 0 ? View.VISIBLE : View.GONE;
  17. }
  18.  
  19. UserRole userRole;
  20.  
  21. public void setUserRole(UserRole userRole) {
  22. this.userRole = userRole;
  23. notifyPropertyChanged(BR.userRole);
  24. }
  25.  
  26. @Bindable
  27. public int getUserRole() {
  28. return userRole != null && userRole.getId() != 0 ? View.VISIBLE : View.GONE;
  29. }
Add Comment
Please, Sign In to add comment