MainActivityクラスの外にMyLocationListenerを書くことはできますか?次の例として
MainActivity.class
public class MainActivity extends Activity{
@Override
..onCreate(){
.
.
loclis = new MyLocationListener(this); // Can i use it this way?
//if so, where is the best place to declare this line.
}
}
MyLocationListener.class
public class MyLocationListener implement LocationListener{
..
.//Constructor of MyLocationListener
}
助けてくれてありがとう