Guest User

Untitled

a guest
Jul 18th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. @BindingAdapter("app:gameButtonBackground")
  2. public static void gameButtonBackground(View view, Competition competition) {
  3. if (competition == null) {
  4. view.setBackground(view.getContext().getResources().getDrawable(R.drawable.pro_game_button));
  5. } else {
  6. if (competition.getRemaining_promotion_date_time_in_seconds() < 0) {
  7. view.setBackgroundResource(R.color.pro_game_text_color);
  8. } else {
  9. view.setBackgroundResource(R.color.pro_game_text_color_light);
  10. }
  11. }
  12. }
Add Comment
Please, Sign In to add comment