android - How do I use MapStateListener? -
Google Maps API V2 has been used in my Android application. I would like to handle touch, drag and unpick on the map using this solution:
But I can not get the reference to create a Mapstate Lastener in the context of the TouchBlabfragment object.
I'm new to Android so please help me solve this problem or another solution to solve my problem. Thank you,
This is my layout:
& lt; Fragment android: id = "@ + id / map" Android: layout_width = "match_parent" Android: layout_height = "match_parent" Android: name = "megacom. Taxigo.driver.android.utils.mapstatelistener.TouchableMapFragment" />
Touch worthy frameframe
should be very simple to use Suppose you have a simple layout file called map.xml
for example:
Now in your activity you need to do the following;
Public Waste Create (Reference Reference) {setContentView (R.layout.map); TouchableMefragment touchmapfragment = (TouchAblmrragragment) Fregagram Manager (). Search BIID (RID map); GoogleMap Map = SpecialMaphragment.Gate (); (My MapStateListener) (Map, touchable mapframement, this) {@Override mapTouched on public zeros (// map touched) @MapRelease Override on Public Zero () {// Posted in Map} @Override on Public Zero MapUnsettled () {// map unsettled} @ Override public null at MapSettled () {// map settled}}; }
When using a MapFragment
, the method can tap to look at something else if the piece is not starting.
Comments
Post a Comment