private void init(ListModeBean navbean) { TTSController.getInstance(mcontext).startSpeaking(); // 获取当前经纬度 geoLat = PreferencesUtil.getStringPreferences(mcontext, "currentlat"); geoLng = PreferencesUtil.getStringPreferences(mcontext, "currentlng"); startGeoLat = Double.parseDouble(geoLat); startGeoLng = Double.parseDouble(geoLng); // 获取目的地经纬度 edoLat = navbean.getElectricLatitude(); edoLng = navbean.getElectricLongitude(); Log.i("fragment", navbean.getElectricName() + edoLat + edoLng); if (!Tools.isEmptyString(edoLat) && !Tools.isEmptyString(edoLng)) { endEdoLat = Double.parseDouble(edoLat.trim()); endEdoLng = Double.parseDouble(edoLng.trim()); NaviLatLng mNaviStart = new NaviLatLng(startGeoLat, startGeoLng); NaviLatLng mNaviEnd = new NaviLatLng(endEdoLat, endEdoLng); mStartPoints.clear(); mEndPoints.clear(); mStartPoints.add(mNaviStart); mEndPoints.add(mNaviEnd); } mRouteCalculatorProgressDialog = new ProgressDialog(mcontext); mRouteCalculatorProgressDialog.setCancelable(true); AMapNavi aMapNavi = AMapNavi.getInstance(mcontext); if (this instanceof AMapNaviListener && aMapNavi != null) { aMapNavi.setAMapNaviListener(this); } }
public backMyListModeListViewAdapter(Context context, List<ListModeBean> data) { this.mdata = data; this.mcontext = context; inflater = LayoutInflater.from(context); pkUserinfo = PreferencesUtil.getStringPreferences(mcontext, "pkUserinfo"); // init(); }