mirror of https://github.com/tasks/tasks
Convert MapFragment to Kotlin
parent
c2af267ca3
commit
29fdba597b
@ -1,33 +0,0 @@
|
|||||||
package org.tasks.location;
|
|
||||||
|
|
||||||
import androidx.annotation.Nullable;
|
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
|
||||||
import java.util.List;
|
|
||||||
import org.tasks.data.Place;
|
|
||||||
|
|
||||||
public interface MapFragment {
|
|
||||||
|
|
||||||
void init(AppCompatActivity activity, MapFragmentCallback callback, boolean dark);
|
|
||||||
|
|
||||||
@Nullable MapPosition getMapPosition();
|
|
||||||
|
|
||||||
void movePosition(MapPosition mapPosition, boolean animate);
|
|
||||||
|
|
||||||
void setMarkers(List<Place> places);
|
|
||||||
|
|
||||||
void disableGestures();
|
|
||||||
|
|
||||||
void showMyLocation();
|
|
||||||
|
|
||||||
void onPause();
|
|
||||||
|
|
||||||
void onResume();
|
|
||||||
|
|
||||||
void onDestroy();
|
|
||||||
|
|
||||||
interface MapFragmentCallback {
|
|
||||||
void onMapReady(MapFragment mapFragment);
|
|
||||||
|
|
||||||
void onPlaceSelected(Place place);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -0,0 +1,29 @@
|
|||||||
|
package org.tasks.location
|
||||||
|
|
||||||
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
|
import org.tasks.data.Place
|
||||||
|
|
||||||
|
interface MapFragment {
|
||||||
|
fun init(activity: AppCompatActivity, callback: MapFragmentCallback, dark: Boolean)
|
||||||
|
|
||||||
|
val mapPosition: MapPosition?
|
||||||
|
|
||||||
|
fun movePosition(mapPosition: MapPosition, animate: Boolean)
|
||||||
|
|
||||||
|
fun setMarkers(places: List<Place>)
|
||||||
|
|
||||||
|
fun disableGestures()
|
||||||
|
|
||||||
|
fun showMyLocation()
|
||||||
|
|
||||||
|
fun onPause()
|
||||||
|
|
||||||
|
fun onResume()
|
||||||
|
|
||||||
|
fun onDestroy()
|
||||||
|
|
||||||
|
interface MapFragmentCallback {
|
||||||
|
fun onMapReady(mapFragment: MapFragment)
|
||||||
|
fun onPlaceSelected(place: Place)
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue