add window manager dialog
This commit is contained in:
@@ -9,9 +9,20 @@ import android.view.View;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.mogo.commons.debug.DebugConfig;
|
||||
import com.mogo.map.MogoLatLng;
|
||||
import com.mogo.map.search.geo.IMogoGeoSearch;
|
||||
import com.mogo.map.search.geo.IMogoGeoSearchListener;
|
||||
import com.mogo.map.search.geo.MogoGeocodeResult;
|
||||
import com.mogo.map.search.geo.MogoRegeocodeResult;
|
||||
import com.mogo.map.search.geo.query.MogoRegeocodeQuery;
|
||||
import com.mogo.module.common.dialog.WMDialog;
|
||||
import com.mogo.module.service.MarkerServiceHandler;
|
||||
import com.mogo.module.service.MogoServiceProvider;
|
||||
import com.mogo.module.service.R;
|
||||
import com.mogo.service.entrance.ButtonIndex;
|
||||
import com.mogo.utils.TipToast;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
import com.mogo.utils.network.utils.GsonUtil;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
@@ -71,10 +82,10 @@ public class MockIntentHandler implements IntentHandler {
|
||||
button11.setVisibility( View.VISIBLE );
|
||||
button11.setBackgroundColor( Color.RED );
|
||||
button11.setOnClickListener( view -> {
|
||||
Intent intent1 = new Intent( );
|
||||
Intent intent1 = new Intent();
|
||||
intent1.setAction( Intent.ACTION_VIEW );
|
||||
intent1.addFlags( Intent.FLAG_ACTIVITY_NEW_TASK );
|
||||
intent1.setData( Uri.parse("wechathelper://com.zhidao.wechathelper/main/transform?type=navi&lon=116.327007&lat=39.977639&from=os2.0") );
|
||||
intent1.setData( Uri.parse( "wechathelper://com.zhidao.wechathelper/main/transform?type=navi&lon=116.327007&lat=39.977639&from=os2.0" ) );
|
||||
try {
|
||||
view.setOnClickListener( null );
|
||||
view.getContext().startActivity( intent1 );
|
||||
@@ -89,6 +100,37 @@ public class MockIntentHandler implements IntentHandler {
|
||||
float bearing = intent.getFloatExtra( "bearing", 0 );
|
||||
MarkerServiceHandler.getMapUIController().changeBearing( bearing );
|
||||
break;
|
||||
case 9:
|
||||
new WMDialog.Builder( context )
|
||||
.setOkButton( "确认", ( dlg, which ) -> {
|
||||
dlg.dismiss();
|
||||
} )
|
||||
.setCancelButton( "取消", ( dlg, which ) -> {
|
||||
dlg.dismiss();
|
||||
} )
|
||||
.setContent( "内容内容内容内容内容内容内容内容" )
|
||||
.build()
|
||||
.show();
|
||||
break;
|
||||
case 10:
|
||||
IMogoGeoSearch geoSearch = MarkerServiceHandler.getMapService().getGeoSearch( context );
|
||||
geoSearch.setGeoSearchListener( new IMogoGeoSearchListener() {
|
||||
@Override
|
||||
public void onRegeocodeSearched( MogoRegeocodeResult regeocodeResult ) {
|
||||
Logger.d( TAG, GsonUtil.jsonFromObject( regeocodeResult ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onGeocodeSearched( MogoGeocodeResult geocodeResult ) {
|
||||
|
||||
}
|
||||
} );
|
||||
MogoRegeocodeQuery query = new MogoRegeocodeQuery();
|
||||
query.setLatlngType( "autonavi" );
|
||||
query.setPoint( new MogoLatLng( intent.getFloatExtra( "lat", 39.917366f ), intent.getFloatExtra( "lon", 116.39962f ) ) );
|
||||
query.setRadius( 1000 );
|
||||
geoSearch.getFromLocationAsyn( query );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user