opt
This commit is contained in:
@@ -1,19 +1,14 @@
|
||||
package com.mogo.module.extensions.entrance;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.mogo.commons.mvp.MvpFragment;
|
||||
import com.mogo.commons.mvp.Presenter;
|
||||
import com.mogo.map.MogoLatLng;
|
||||
import com.mogo.map.location.IMogoLocationClient;
|
||||
import com.mogo.map.location.MogoLocation;
|
||||
@@ -25,6 +20,7 @@ import com.mogo.module.common.MogoModulePaths;
|
||||
import com.mogo.module.extensions.R;
|
||||
import com.mogo.module.extensions.navi.NaviInfoView;
|
||||
import com.mogo.service.MogoServicePaths;
|
||||
import com.mogo.service.fragmentmanager.FragmentDescriptor;
|
||||
import com.mogo.service.fragmentmanager.IMogoFragmentManager;
|
||||
import com.mogo.service.map.IMogoMapService;
|
||||
|
||||
@@ -64,35 +60,35 @@ public class EntranceFragment extends MvpFragment< EntranceView, EntrancePresent
|
||||
|
||||
@Override
|
||||
protected void initViews() {
|
||||
fragmentManager = (IMogoFragmentManager) ARouter.getInstance().build(MogoServicePaths.PATH_FRAGMENT_MANAGER).navigation();
|
||||
fragmentManager = ( IMogoFragmentManager ) ARouter.getInstance().build( MogoServicePaths.PATH_FRAGMENT_MANAGER ).navigation();
|
||||
|
||||
mCommonAddress = findViewById( R.id.module_map_id_common_address );
|
||||
mCommonAddress = findViewById( R.id.module_entrance_id_common_address );
|
||||
|
||||
mSearch = findViewById( R.id.module_map_id_search );
|
||||
mSearch = findViewById( R.id.module_entrance_id_search );
|
||||
|
||||
Fragment fragment = (Fragment) ARouter.getInstance().build(MogoModulePaths.PATH_FRAGMENT_SEARCH).navigation();
|
||||
Fragment fragment = ( Fragment ) ARouter.getInstance().build( MogoModulePaths.PATH_FRAGMENT_SEARCH ).navigation();
|
||||
|
||||
mSearch.setOnClickListener( view -> {
|
||||
fragmentManager.push(fragment,MogoModulePaths.PATH_FRAGMENT_SEARCH);
|
||||
fragmentManager.push( new FragmentDescriptor.Builder().fragment( fragment ).tag( MogoModulePaths.PATH_FRAGMENT_SEARCH ).notifyMainModule( true ).build() );
|
||||
} );
|
||||
|
||||
mHome = findViewById( R.id.module_map_id_home );
|
||||
mHome = findViewById( R.id.module_entrance_id_home );
|
||||
mHome.setOnClickListener( view -> {
|
||||
} );
|
||||
|
||||
mCompany = findViewById( R.id.module_map_id_company );
|
||||
mCompany = findViewById( R.id.module_entrance_id_company );
|
||||
mCompany.setOnClickListener( view -> {
|
||||
} );
|
||||
|
||||
mUploadRoadCondition = findViewById( R.id.module_map_id_upload_road_condition );
|
||||
mUploadRoadCondition = findViewById( R.id.module_entrance_id_upload_road_condition );
|
||||
mUploadRoadCondition.setOnClickListener( view -> {
|
||||
} );
|
||||
|
||||
mVRMode = findViewById( R.id.module_map_id_vr_mode );
|
||||
mVRMode = findViewById( R.id.module_entrance_id_vr_mode );
|
||||
mVRMode.setOnClickListener( view -> {
|
||||
} );
|
||||
|
||||
mMove2CurrentLocation = findViewById( R.id.module_map_id_move2_current_location );
|
||||
mMove2CurrentLocation = findViewById( R.id.module_entrance_id_move2_current_location );
|
||||
mMove2CurrentLocation.setOnClickListener( view -> {
|
||||
final MogoLocation location = mMogoLocationClient.getLastKnowLocation();
|
||||
if ( location != null ) {
|
||||
@@ -100,8 +96,8 @@ public class EntranceFragment extends MvpFragment< EntranceView, EntrancePresent
|
||||
}
|
||||
} );
|
||||
|
||||
mNaviInfo = findViewById( R.id.module_map_id_navi_info_panel );
|
||||
mExitNavi = findViewById( R.id.module_map_id_exit_navi );
|
||||
mNaviInfo = findViewById( R.id.module_entrance_id_navi_info_panel );
|
||||
mExitNavi = findViewById( R.id.module_entrance_id_exit_navi );
|
||||
mExitNavi.setOnClickListener( view -> {
|
||||
if ( mMogoNavi != null ) {
|
||||
mMogoNavi.stopNavi();
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_pressed="false">
|
||||
<shape>
|
||||
<corners android:bottomLeftRadius="@dimen/dp_16" android:bottomRightRadius="@dimen/dp_16" />
|
||||
<solid android:color="#3F4057" />
|
||||
</shape>
|
||||
</item>
|
||||
<item android:state_pressed="true">
|
||||
<shape>
|
||||
<corners android:bottomLeftRadius="@dimen/dp_16" android:bottomRightRadius="@dimen/dp_16" />
|
||||
<solid android:color="#7F3F4057" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
||||
@@ -1,9 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item>
|
||||
<item android:state_pressed="false">
|
||||
<shape>
|
||||
<corners android:radius="@dimen/dp_16" />
|
||||
<solid android:color="#3F4057" />
|
||||
</shape>
|
||||
</item>
|
||||
<item android:state_pressed="true">
|
||||
<shape>
|
||||
<corners android:radius="@dimen/dp_16" />
|
||||
<solid android:color="#cc3F4057" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
||||
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_pressed="false">
|
||||
<shape>
|
||||
<corners android:bottomLeftRadius="@dimen/dp_16" android:topLeftRadius="@dimen/dp_16" />
|
||||
<solid android:color="#3F4057" />
|
||||
</shape>
|
||||
</item>
|
||||
<item android:state_pressed="true">
|
||||
<shape>
|
||||
<corners android:bottomLeftRadius="@dimen/dp_16" android:topLeftRadius="@dimen/dp_16" />
|
||||
<solid android:color="#7F3F4057" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
||||
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_pressed="false">
|
||||
<shape>
|
||||
<corners android:bottomRightRadius="@dimen/dp_16" android:topRightRadius="@dimen/dp_16" />
|
||||
<solid android:color="#3F4057" />
|
||||
</shape>
|
||||
</item>
|
||||
<item android:state_pressed="true">
|
||||
<shape>
|
||||
<corners android:bottomRightRadius="@dimen/dp_16" android:topRightRadius="@dimen/dp_16" />
|
||||
<solid android:color="#7F3F4057" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
||||
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_pressed="false">
|
||||
<shape>
|
||||
<corners android:topLeftRadius="@dimen/dp_16" android:topRightRadius="@dimen/dp_16" />
|
||||
<solid android:color="#3F4057" />
|
||||
</shape>
|
||||
</item>
|
||||
<item android:state_pressed="true">
|
||||
<shape>
|
||||
<corners android:topLeftRadius="@dimen/dp_16" android:topRightRadius="@dimen/dp_16" />
|
||||
<solid android:color="#7F3F4057" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
||||
@@ -1,9 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item>
|
||||
<item android:state_pressed="false">
|
||||
<shape>
|
||||
<gradient android:angle="90" android:endColor="#5CC1FF" android:startColor="#256BFF" />
|
||||
<corners android:radius="@dimen/dp_16" />
|
||||
</shape>
|
||||
</item>
|
||||
<item android:state_pressed="true">
|
||||
<shape>
|
||||
<gradient android:angle="90" android:endColor="#7F5CC1FF" android:startColor="#7F256BFF" />
|
||||
<corners android:radius="@dimen/dp_16" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
||||
@@ -5,7 +5,7 @@
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/module_map_id_search"
|
||||
android:id="@+id/module_entrance_id_search"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_90"
|
||||
android:layout_marginLeft="@dimen/dp_32"
|
||||
@@ -24,42 +24,55 @@
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/module_map_id_common_address"
|
||||
android:id="@+id/module_entrance_id_common_address"
|
||||
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: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_constraintLeft_toRightOf="@+id/module_entrance_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" />
|
||||
<RelativeLayout
|
||||
android:id="@+id/module_entrance_id_home"
|
||||
android:layout_width="@dimen/dp_100"
|
||||
android:layout_height="@dimen/dp_90"
|
||||
android:background="@drawable/module_map_dw_left_corner_bkg">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:src="@drawable/module_map_ic_home" />
|
||||
|
||||
<View
|
||||
android:layout_width="@dimen/dp_2"
|
||||
android:layout_height="@dimen/dp_54"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:background="#1ED8D8D8" />
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/module_entrance_id_company"
|
||||
android:layout_width="@dimen/dp_100"
|
||||
android:layout_height="@dimen/dp_90"
|
||||
android:background="@drawable/module_map_dw_right_corner_bkg"
|
||||
android:gravity="center">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/module_map_ic_company" />
|
||||
</LinearLayout>
|
||||
|
||||
<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>
|
||||
|
||||
<com.mogo.module.extensions.navi.NaviInfoView
|
||||
android:id="@+id/module_map_id_navi_info_panel"
|
||||
android:id="@+id/module_entrance_id_navi_info_panel"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/dp_32"
|
||||
@@ -69,21 +82,21 @@
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/module_map_id_operation_panel"
|
||||
android:id="@+id/module_entrance_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_60"
|
||||
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:id="@+id/module_entrance_id_vr_mode"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_92"
|
||||
android:background="@drawable/module_map_dw_top_corner_bkg"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
@@ -104,9 +117,10 @@
|
||||
</RelativeLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/module_map_id_move2_current_location"
|
||||
android:id="@+id/module_entrance_id_move2_current_location"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_90"
|
||||
android:background="@drawable/module_map_dw_bottom_corner_bkg"
|
||||
android:gravity="center">
|
||||
|
||||
<ImageView
|
||||
@@ -116,9 +130,8 @@
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/module_map_id_upload_road_condition"
|
||||
android:id="@+id/module_entrance_id_upload_road_condition"
|
||||
android:layout_width="@dimen/dp_90"
|
||||
android:layout_height="@dimen/dp_90"
|
||||
android:layout_marginBottom="@dimen/dp_40"
|
||||
@@ -127,13 +140,13 @@
|
||||
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_constraintBottom_toTopOf="@+id/module_entrance_id_operation_panel"
|
||||
app:layout_constraintRight_toRightOf="@+id/module_entrance_id_operation_panel"
|
||||
app:layout_goneMarginBottom="@dimen/dp_32"
|
||||
app:layout_goneMarginRight="@dimen/dp_32" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/module_map_id_exit_navi"
|
||||
android:id="@+id/module_entrance_id_exit_navi"
|
||||
android:layout_width="@dimen/dp_200"
|
||||
android:layout_height="@dimen/dp_90"
|
||||
android:layout_marginLeft="@dimen/dp_32"
|
||||
|
||||
Reference in New Issue
Block a user