code: public void updateUi() {
          // update the car color to reflect premium status or lack thereof
          ((ImageView) findViewById(R.id.free_or_premium)).setImageResource(mIsPremium ? R.drawable.premium : R.drawable.free);
  
          // "Upgrade" button is only visible if the user is not premium
          findViewById(R.id.upgrade_button).setVisibility(mIsPremium ? View.GONE : View.VISIBLE);
  
          // "Get infinite gas" button is only visible if the user is not subscribed yet
          findViewById(R.id.infinite_gas_button).setVisibility(mSubscribedToInfiniteGas ?
                  View.GONE : View.VISIBLE);
  
          // update gas gauge to reflect tank status
          if (mSubscribedToInfiniteGas) {
              ((ImageView) findViewById(R.id.gas_gauge)).setImageResource(R.drawable.gas_inf);
          } else {
              int index = mTank >= TANK_RES_IDS.length ? TANK_RES_IDS.length - 1 : mTank;
              ((ImageView) findViewById(R.id.gas_gauge)).setImageResource(TANK_RES_IDS[index]);
          }
      }
docs: updates UI to reflect model