eagle 小地图导航
This commit is contained in:
@@ -3,6 +3,7 @@ package com.mogo.eagle.core.function.smp;
|
||||
import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
import android.location.Location;
|
||||
import android.os.Bundle;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
@@ -87,8 +88,8 @@ public class SmallMapDirectionView
|
||||
View smpView = LayoutInflater.from(context).inflate(R.layout.module_small_map_view, this);
|
||||
|
||||
mAMapNaviView = (TextureMapView)smpView.findViewById(R.id.aMapNaviView);
|
||||
rlSmallMapBorder = findViewById(R.id.rlSmallMapBorder);
|
||||
rlSmallMapBorder.addView(mAMapNaviView);
|
||||
// rlSmallMapBorder = findViewById(R.id.rlSmallMapBorder);
|
||||
// rlSmallMapBorder.addView(mAMapNaviView);
|
||||
|
||||
initAMapView();
|
||||
|
||||
@@ -280,4 +281,27 @@ public class SmallMapDirectionView
|
||||
}
|
||||
}
|
||||
|
||||
public void onCreateView(Bundle savedInstanceState) {
|
||||
if(mAMapNaviView != null){
|
||||
mAMapNaviView.onCreate(savedInstanceState);
|
||||
}
|
||||
}
|
||||
|
||||
public void onResume() {
|
||||
if(mAMapNaviView != null){
|
||||
mAMapNaviView.onResume();
|
||||
}
|
||||
}
|
||||
|
||||
public void onPause() {
|
||||
if(mAMapNaviView != null){
|
||||
mAMapNaviView.onPause();
|
||||
}
|
||||
}
|
||||
|
||||
public void onDestroy() {
|
||||
if(mAMapNaviView != null){
|
||||
mAMapNaviView.onDestroy();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,6 @@ import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
import com.mogo.eagle.core.function.smp.R;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -34,6 +33,7 @@ public class SmallMapFragment extends Fragment {
|
||||
if (mRootView == null) {
|
||||
mRootView = inflater.inflate(R.layout.module_small_map_fragment, container, false);
|
||||
mSmallMapDirectionView = mRootView.findViewById(R.id.smallMapDirectionView);
|
||||
mSmallMapDirectionView.onCreateView(savedInstanceState);
|
||||
} else {
|
||||
ViewGroup viewGroup = (ViewGroup) mRootView.getParent();
|
||||
if (viewGroup != null) {
|
||||
@@ -55,4 +55,23 @@ public class SmallMapFragment extends Fragment {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
mSmallMapDirectionView.onResume();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPause() {
|
||||
super.onPause();
|
||||
mSmallMapDirectionView.onPause();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
super.onDestroy();
|
||||
mSmallMapDirectionView.onDestroy();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user