title: Change the visibility of a button when location==null
body: <p>In method onCreate i have button:</p>
  
  <pre><code>    connection.setOnClickListener(new View.OnClickListener() {
  
          public void onClick(View view) {
  
              {
                     GoogleApiClient.connect();
              }
  </code></pre>
  
  <p>and at the very bottom android studio generated:</p>
  
  <pre><code>@Override
  
  public void onConnected(Bundle bundle) 
      {
  
      if (ActivityCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED &amp;&amp; ActivityCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
          return;
  
      }
  
      Location location = LocationServices.FusedLocationApi.getLastLocation(GoogleApiClient);
  
      if (location == null) 
      {
  
                  LocationServices.FusedLocationApi.requestLocationUpdates(GoogleApiClient, LocationRequest, (LocationListener) this);
  
      }
  </code></pre>
  
  <p>And now i describe my problem:
  Trying to hide my connection button when location == null, and 'else' unhide.</p>
  
  <p>i found on stack this method:</p>
  
  <pre><code>button.setEnabled(false/true);
  </code></pre>
  
  <p>but i don't now where i should place this method</p>
  
  <p>What to do to make it work?</p>