Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @BindingAdapter("app:gameButtonBackground")
- public static void gameButtonBackground(View view, Competition competition) {
- if (competition == null) {
- view.setBackground(view.getContext().getResources().getDrawable(R.drawable.pro_game_button));
- } else {
- if (competition.getRemaining_promotion_date_time_in_seconds() < 0) {
- view.setBackgroundResource(R.color.pro_game_text_color);
- } else {
- view.setBackgroundResource(R.color.pro_game_text_color_light);
- }
- }
- }
Add Comment
Please, Sign In to add comment