title: Want to use GoogleMaps - OnMyLocationChangeListener but can't implement it? Any other options
body: <p>I want to utilize Google Maps, OnlocationChangeListener but because I've already implemented</p>
  
  <p><code>implements DatePickerFragment.OnDATEClickListener{</code> </p>
  
  <p>And as the above needs to remain implemented, this is making implementing OnlocationChangeListener very difficult. Also the  <code>onLocationchangelistener</code> code currently extends <code>fragmentActivity</code> whereas my current code <code>extends  fragment</code> which creates further problems.</p>
  
  <p><strong>The problem is:</strong> I can't extend or implement anything else as I'm already implementing and extending. Which means I can't get OnlocationChangeListener to work</p>
  
  <p>Do you know of any work around?</p>
  
  <p>(To allow me to implement <code>DatePickerFragment.OnDATEClickListener</code> whilst also implementing Google's <code>OnlocationChangeListener</code>. Whilst also having my code continue to extend fragment rather than fragmentactivity)</p>
  
  <p><strong>My Current Code:</strong></p>
  
  <pre><code>public class HomeFragment extends Fragment implements DatePickerFragment.OnDATEClickListener{
  
      public HomeFragment(){}
  
      @Override
      public View onCreateView(LayoutInflater inflater, ViewGroup container,
              Bundle savedInstanceState) {
  
          View rootView = inflater.inflate(R.layout.fragment_home, container, false);
  
          return rootView;
      }
  }
  </code></pre>
  
  <p><strong>Google Maps Location Change Listener Code:</strong></p>
  
  <pre><code>    public class MainActivity extends FragmentActivity implements OnMyLocationChangeListener {
  
          GoogleMap googleMap;
  
          @Override
          protected void onCreate(Bundle savedInstanceState) {
              super.onCreate(savedInstanceState);
              setContentView(R.layout.activity_main);
  
              // Getting Google Play availability status
              int status = GooglePlayServicesUtil.isGooglePlayServicesAvailable(getBaseContext());
  
              // Showing status
              if(status!=ConnectionResult.SUCCESS){ // Google Play Services are not available         
                  int requestCode = 10;
                  Dialog dialog = GooglePlayServicesUtil.getErrorDialog(status, this, requestCode);
                  dialog.show();
  
              }else { // Google Play Services are available   
  
                  // Getting reference to the SupportMapFragment of activity_main.xml
                  SupportMapFragment fm = (SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map);
  
                  // Getting GoogleMap object from the fragment
                  googleMap = fm.getMap();
  
                  // Enabling MyLocation Layer of Google Map
                  googleMap.setMyLocationEnabled(true);           
  
                  // Setting event handler for location change
                  googleMap.setOnMyLocationChangeListener(this);      
  
              }
  
          }
  
  
          @Override
          public boolean onCreateOptionsMenu(Menu menu) {
              // Inflate the menu; this adds items to the action bar if it is present.
              getMenuInflater().inflate(R.menu.activity_main, menu);
              return true;
          }
  
  
          @Override
          public void onMyLocationChange(Location location) {
  
  //Location stuff
  
          }
      }
  </code></pre>