|
@@ -59,7 +59,7 @@ import java.io.File;
|
|
|
import java.io.InputStream;
|
|
import java.io.InputStream;
|
|
|
import java.util.regex.Pattern;
|
|
import java.util.regex.Pattern;
|
|
|
|
|
|
|
|
-public class DetailFragment extends Fragment implements OnClickListener /*
|
|
|
|
|
|
|
+public class DetailFragment extends Fragment implements OnClickListener, ShipMap.ShipMapListener /*
|
|
|
* ,
|
|
* ,
|
|
|
* OnGestureListener
|
|
* OnGestureListener
|
|
|
*/
|
|
*/
|
|
@@ -70,6 +70,25 @@ public class DetailFragment extends Fragment implements OnClickListener /*
|
|
|
private String copiedKey;
|
|
private String copiedKey;
|
|
|
private String copiedVal;
|
|
private String copiedVal;
|
|
|
private View touchedView;
|
|
private View touchedView;
|
|
|
|
|
+
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public void shipMapTryToZoomIn(ShipMap shipMap, boolean zoomIn) {
|
|
|
|
|
+
|
|
|
|
|
+ if (zoomIn) {
|
|
|
|
|
+
|
|
|
|
|
+ LinearLayout.LayoutParams lfLayoutParams = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, 0);
|
|
|
|
|
+ mDetailContainer.setLayoutParams(lfLayoutParams);
|
|
|
|
|
+
|
|
|
|
|
+ } else {
|
|
|
|
|
+
|
|
|
|
|
+ LinearLayout.LayoutParams lfLayoutParams = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, 0,2.0f);
|
|
|
|
|
+ mDetailContainer.setLayoutParams(lfLayoutParams);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ mMapZoomIn = zoomIn;
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
private class GestureListener extends GestureDetector.SimpleOnGestureListener {
|
|
private class GestureListener extends GestureDetector.SimpleOnGestureListener {
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
@@ -313,6 +332,7 @@ public class DetailFragment extends Fragment implements OnClickListener /*
|
|
|
outState.putInt("selectContactPosition",mSelectContactPosition);
|
|
outState.putInt("selectContactPosition",mSelectContactPosition);
|
|
|
outState.putInt("selectTrackingPosition",mSelectTrackingPosition);
|
|
outState.putInt("selectTrackingPosition",mSelectTrackingPosition);
|
|
|
outState.putInt("selectTrackingChild",mSelectTrackingChild);
|
|
outState.putInt("selectTrackingChild",mSelectTrackingChild);
|
|
|
|
|
+ outState.putBoolean("mapZoomIn",mMapZoomIn);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
private void configureMap(ShipMap map) {
|
|
private void configureMap(ShipMap map) {
|
|
@@ -327,8 +347,13 @@ public class DetailFragment extends Fragment implements OnClickListener /*
|
|
|
map.setShowPoe(true);
|
|
map.setShowPoe(true);
|
|
|
map.setShowPod(true);
|
|
map.setShowPod(true);
|
|
|
map.setShowPol(true);
|
|
map.setShowPol(true);
|
|
|
|
|
+
|
|
|
|
|
+ map.setShipMapListener(this);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ private RelativeLayout mDetailContainer;
|
|
|
|
|
+ private boolean mMapZoomIn = false;
|
|
|
|
|
+
|
|
|
@Override
|
|
@Override
|
|
|
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
|
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
|
|
Bundle savedInstanceState)
|
|
Bundle savedInstanceState)
|
|
@@ -344,6 +369,7 @@ public class DetailFragment extends Fragment implements OnClickListener /*
|
|
|
view = inflater.inflate(R.layout.detail_fragment_withmap, null);
|
|
view = inflater.inflate(R.layout.detail_fragment_withmap, null);
|
|
|
mTrackingMap = view.findViewById(R.id.tracking_map);
|
|
mTrackingMap = view.findViewById(R.id.tracking_map);
|
|
|
configureMap(mTrackingMap);
|
|
configureMap(mTrackingMap);
|
|
|
|
|
+ mDetailContainer = view.findViewById(R.id.detail_list_container);
|
|
|
} else {
|
|
} else {
|
|
|
view = inflater.inflate(R.layout.detail_fragment, null);
|
|
view = inflater.inflate(R.layout.detail_fragment, null);
|
|
|
mTrackingMap = null;
|
|
mTrackingMap = null;
|
|
@@ -354,8 +380,12 @@ public class DetailFragment extends Fragment implements OnClickListener /*
|
|
|
mSelectContactPosition = savedInstanceState.getInt("selectContactPosition");
|
|
mSelectContactPosition = savedInstanceState.getInt("selectContactPosition");
|
|
|
mSelectTrackingPosition = savedInstanceState.getInt("selectTrackingPosition");
|
|
mSelectTrackingPosition = savedInstanceState.getInt("selectTrackingPosition");
|
|
|
mSelectTrackingChild = savedInstanceState.getInt("selectTrackingChild");
|
|
mSelectTrackingChild = savedInstanceState.getInt("selectTrackingChild");
|
|
|
|
|
+ mMapZoomIn = savedInstanceState.getBoolean("mapZoomIn");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ if (mTrackingMap != null) {
|
|
|
|
|
+ mTrackingMap.setZoomIn(mMapZoomIn);
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
// if(this.getArguments().getString("action_type").equals("Tracing"))
|
|
// if(this.getArguments().getString("action_type").equals("Tracing"))
|
|
|
// {
|
|
// {
|