title: Disable a button based on Retrofit response
body: <p>I want to check boolean value that come from server. If boolean is true, I want to disable button click. Otherwise, can click button. I add all data from server to <em>rest</em> using Retrofit.</p>
  
  <p><strong>@ api</strong></p>
  
  <pre><code>"bookmarked": true
  </code></pre>
  
  <p><strong>@ Restaurant Object</strong></p>
  
  <pre><code>private boolean bookmarked;
  
      public boolean isBookmarked() {
          return bookmarked;
      }
      public void setBookmarked(boolean bookmarked) {
          this.bookmarked = bookmarked;
      }
  </code></pre>
  
  <p><strong>@ onCreate()</strong></p>
  
  <pre><code>Restaurant rest;
  Button btn;
  
      @Override
      public void success(Restaurant restaurant, Response response) {
          rest = restaurant;
      }
  
      if (rest.isBookmarked()) {
          btn.setOnClickListener(null);
      }
  </code></pre>