This commit is contained in:
wangcongtao
2020-01-07 17:56:33 +08:00
parent dca01fe24b
commit c69a959b6a
177 changed files with 1457 additions and 650 deletions

View File

@@ -6,17 +6,10 @@ import android.view.View;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.alibaba.android.arouter.launcher.ARouter;
import com.mogo.commons.mvp.MvpFragment;
import com.mogo.map.IMogoMap;
import com.mogo.map.IMogoUiSettings;
import com.mogo.map.MogoLatLng;
import com.mogo.map.MogoMapView;
import com.mogo.map.location.IMogoLocationClient;
import com.mogo.map.location.MogoLocation;
import com.mogo.map.uicontroller.IMogoMapUIController;
import com.mogo.service.MogoServicePaths;
import com.mogo.service.map.IMogoMapService;
/**
* @author congtaowang
@@ -31,20 +24,6 @@ public class MapFragment extends MvpFragment< MapView, MapPresenter > implements
private MogoMapView mMogoMapView;
private IMogoMap mMogoMap;
private View mSearch;
private View mHome;
private View mCompany;
private View mUploadRoadCondition;
private View mVRMode;
private View mMove2CurrentLocation;
private IMogoMapService mService;
private IMogoMapUIController mMApUIController;
private IMogoLocationClient mMogoLocationClient;
@Override
protected int getLayoutId() {
return R.layout.module_map_fragment_map;
@@ -55,39 +34,6 @@ public class MapFragment extends MvpFragment< MapView, MapPresenter > implements
mMogoMapView = findViewById( R.id.module_map_id_map );
mMogoMap = mMogoMapView.getMap();
mMogoMap.getUIController().showMyLocation( true );
findViewById(R.id.module_map_id_search).setOnClickListener(new View.OnClickListener() {
@Override public void onClick(View v) {
ARouter.getInstance().build(MogoModulePaths.PATH_MODULE_NAV_ACTIVITY).navigation(getActivity());
}
});
mSearch = findViewById( R.id.module_map_id_search );
mSearch.setOnClickListener( view -> {
} );
mHome = findViewById( R.id.module_map_id_home );
mHome.setOnClickListener( view -> {
} );
mCompany = findViewById( R.id.module_map_id_company );
mCompany.setOnClickListener( view -> {
} );
mUploadRoadCondition = findViewById( R.id.module_map_id_upload_road_condition );
mUploadRoadCondition.setOnClickListener( view -> {
} );
mVRMode = findViewById( R.id.module_map_id_vr_mode );
mVRMode.setOnClickListener( view -> {
} );
mMove2CurrentLocation = findViewById( R.id.module_map_id_move2_current_location );
mMove2CurrentLocation.setOnClickListener( view -> {
final MogoLocation location = mMogoLocationClient.getLastKnowLocation();
if ( location != null ) {
mMApUIController.moveToCenter( new MogoLatLng( location.getLatitude(), location.getLongitude() ) );
}
} );
}
@NonNull
@@ -103,9 +49,6 @@ public class MapFragment extends MvpFragment< MapView, MapPresenter > implements
mMogoMapView.onCreate( savedInstanceState );
}
initMapView();
mService = ( IMogoMapService ) ARouter.getInstance().build( MogoServicePaths.PATH_SERVICES_MAP ).navigation( getContext() );
mMApUIController = mService.getMapUIController();
mMogoLocationClient = mService.getLocationClient( getContext() );
}
@Override

Binary file not shown.

Before

Width:  |  Height:  |  Size: 737 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 831 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

View File

@@ -1,9 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape>
<corners android:radius="@dimen/dp_16" />
<solid android:color="#3F4057" />
</shape>
</item>
</selector>

View File

@@ -1,9 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape>
<gradient android:angle="90" android:endColor="#5CC1FF" android:startColor="#256BFF" />
<corners android:radius="@dimen/dp_16" />
</shape>
</item>
</selector>

View File

@@ -9,120 +9,4 @@
android:layout_width="match_parent"
android:layout_height="match_parent" />
<TextView
android:id="@+id/module_map_id_search"
android:layout_width="wrap_content"
android:layout_height="@dimen/dp_90"
android:layout_marginLeft="@dimen/dp_32"
android:layout_marginTop="@dimen/dp_2"
android:background="@drawable/module_map_dw_common_corner_bkg"
android:drawableLeft="@drawable/module_map_ic_search"
android:drawablePadding="@dimen/dp_16"
android:gravity="center_vertical"
android:paddingLeft="@dimen/dp_26"
android:paddingRight="@dimen/dp_26"
android:text="@string/module_map_str_search_hint"
android:textColor="#99FFFFFF"
android:textSize="@dimen/dp_32"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_32"
android:layout_marginTop="@dimen/dp_2"
android:background="@drawable/module_map_dw_common_corner_bkg"
android:gravity="center_vertical"
android:paddingLeft="@dimen/dp_22"
android:paddingTop="@dimen/dp_17"
android:paddingRight="@dimen/dp_22"
android:paddingBottom="@dimen/dp_17"
app:layout_constraintLeft_toRightOf="@+id/module_map_id_search"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:id="@+id/module_map_id_home"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/module_map_ic_home" />
<View
android:layout_width="@dimen/dp_2"
android:layout_height="@dimen/dp_54"
android:layout_marginLeft="@dimen/dp_21"
android:layout_marginRight="@dimen/dp_21"
android:background="#1ED8D8D8" />
<ImageView
android:id="@+id/module_map_id_company"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/module_map_ic_company" />
</LinearLayout>
<LinearLayout
android:id="@+id/module_map_id_operation_panel"
android:layout_width="@dimen/dp_90"
android:layout_height="wrap_content"
android:layout_marginRight="@dimen/dp_32"
android:layout_marginBottom="@dimen/dp_33"
android:background="@drawable/module_map_dw_common_corner_bkg"
android:gravity="center"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintRight_toRightOf="parent">
<RelativeLayout
android:id="@+id/module_map_id_vr_mode"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_92"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:src="@drawable/module_map_ic_move2_current_location"
android:text="实景"
android:textColor="#CCFFFFFF"
android:textSize="@dimen/dp_24" />
<View
android:layout_width="@dimen/dp_48"
android:layout_height="@dimen/dp_2"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:background="#1ED8D8D8" />
</RelativeLayout>
<LinearLayout
android:id="@+id/module_map_id_move2_current_location"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_90"
android:gravity="center">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/module_map_ic_move2_current_location" />
</LinearLayout>
</LinearLayout>
<TextView
android:id="@+id/module_map_id_upload_road_condition"
android:layout_width="@dimen/dp_90"
android:layout_height="@dimen/dp_90"
android:layout_marginBottom="@dimen/dp_40"
android:background="@drawable/module_map_dw_upload_road_condition_bkg"
android:gravity="center"
android:text="@string/module_map_str_upload_road_condition"
android:textColor="#FFFFFF"
android:textSize="@dimen/dp_24"
app:layout_constraintBottom_toTopOf="@+id/module_map_id_operation_panel"
app:layout_constraintRight_toRightOf="@+id/module_map_id_operation_panel"
app:layout_goneMarginBottom="@dimen/dp_32"
app:layout_goneMarginRight="@dimen/dp_32" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -1,5 +1,3 @@
<resources>
<string name="app_name">mogo-module-map</string>
<string name="module_map_str_search_hint">搜索目的地</string>
<string name="module_map_str_upload_road_condition">上报\n路况</string>
</resources>