opt
This commit is contained in:
@@ -2,7 +2,6 @@ package com.mogo.tanlu.fragment;
|
||||
|
||||
import android.graphics.Bitmap;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.widget.TextView;
|
||||
@@ -20,6 +19,7 @@ import com.mogo.map.location.IMogoLocationListener;
|
||||
import com.mogo.map.location.MogoLocation;
|
||||
import com.mogo.map.marker.IMogoMarker;
|
||||
import com.mogo.map.marker.IMogoMarkerClickListener;
|
||||
import com.mogo.map.marker.IMogoMarkerManager;
|
||||
import com.mogo.map.model.MogoPoi;
|
||||
import com.mogo.map.search.geo.MogoPoiItem;
|
||||
import com.mogo.map.search.poisearch.IMogoPoiSearchListener;
|
||||
@@ -28,6 +28,7 @@ import com.mogo.map.uicontroller.EnumMapUI;
|
||||
import com.mogo.service.MogoServicePaths;
|
||||
import com.mogo.service.imageloader.IMogoImageLoaderListener;
|
||||
import com.mogo.service.imageloader.IMogoImageloader;
|
||||
import com.mogo.service.map.IMogoMapService;
|
||||
import com.mogo.service.module.IMogoModuleLifecycle;
|
||||
import com.mogo.tanlu.R;
|
||||
import com.mogo.tanlu.video.FullMediaActivity;
|
||||
@@ -37,6 +38,8 @@ import com.mogo.utils.TipToast;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
import com.shuyu.gsyvideoplayer.builder.GSYVideoOptionBuilder;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static com.mogo.tanlu.video.VideoInitKt.initVideo;
|
||||
|
||||
/**
|
||||
@@ -57,7 +60,9 @@ public class TanluCardViewFragment extends MvpFragment<IView, Presenter<IView>>
|
||||
|
||||
//map
|
||||
private IMogoMarker mPoiMarker;
|
||||
private int position = -1;
|
||||
// private int position = -1;
|
||||
private IMogoMarkerManager mMarkerManager;
|
||||
private IMogoMapService mMogoMapService;
|
||||
|
||||
//media
|
||||
private GSYVideoOptionBuilder gsyVideoOptionBuilder = new GSYVideoOptionBuilder();
|
||||
@@ -79,7 +84,6 @@ public class TanluCardViewFragment extends MvpFragment<IView, Presenter<IView>>
|
||||
@Override
|
||||
protected void initViews() {
|
||||
initVideo();
|
||||
position = getArguments().getInt("position");
|
||||
simpleCoverVideoPlayer = findViewById(R.id.video_player_main);
|
||||
autoZoomInImageView = findViewById(R.id.tanlu_photo_imageView);
|
||||
mPreviousTv = findViewById(R.id.tv_previous_res);
|
||||
@@ -104,18 +108,9 @@ public class TanluCardViewFragment extends MvpFragment<IView, Presenter<IView>>
|
||||
|
||||
//图片配置
|
||||
mogoImageloader = (IMogoImageloader) ARouter.getInstance().build(MogoServicePaths.PATH_UTILS_IMAGE_LOADER).navigation();
|
||||
//地图marker
|
||||
mMogoMapService = (IMogoMapService) ARouter.getInstance().build(MogoServicePaths.PATH_SERVICES_MAP).navigation(getActivity());
|
||||
|
||||
//当前定位信息
|
||||
TanluServiceHandler.getPoiSearch().setPoiSearchListener(this);
|
||||
// mLocation = TanluServiceHandler.getLocationClient().getLastKnowLocation();
|
||||
|
||||
TanluServiceHandler.getLocationClient().addLocationListener(new IMogoLocationListener() {
|
||||
@Override
|
||||
public void onLocationChanged(MogoLocation location) {
|
||||
// mLocation = location;
|
||||
Logger.d(TAG, "demo模块定位,定位间隔4s");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -177,9 +172,9 @@ public class TanluCardViewFragment extends MvpFragment<IView, Presenter<IView>>
|
||||
autoZoomInImageView.post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
//放大增量是0.3,放大时间是1000毫秒,放大开始时间是1000毫秒以后
|
||||
//放大增量是0.3,放大时间是1000毫秒,放大开始时间是600毫秒以后
|
||||
autoZoomInImageView.init()
|
||||
.startZoomInByScaleDeltaAndDuration(0.3f, 1000, 1500);
|
||||
.startZoomInByScaleDeltaAndDuration(0.2f, 1000, 500);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -199,6 +194,7 @@ public class TanluCardViewFragment extends MvpFragment<IView, Presenter<IView>>
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
protected Presenter createPresenter() {
|
||||
@@ -209,14 +205,20 @@ public class TanluCardViewFragment extends MvpFragment<IView, Presenter<IView>>
|
||||
//TODO C位事件,如何获取数据,需要有默认数据
|
||||
@Override
|
||||
public void onPerform() {
|
||||
Logger.d(TAG, "tanlu卡片 有效");
|
||||
Logger.d(TAG, "tanlu卡片 有效 ---->");
|
||||
mMarkerManager = mMogoMapService.getMarkerManager(getActivity());
|
||||
List<IMogoMarker> markers = mMarkerManager.getMarkers("CARD_TYPE_ROAD_CODITION");
|
||||
for (int i = 0; i < markers.size(); i++) {
|
||||
markers.get(i).getObject();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
//TODO 离开C位事件
|
||||
@Override
|
||||
public void onDisable() {
|
||||
Logger.e(TAG, "tanlu卡片 无效");
|
||||
Logger.e(TAG, "tanlu卡片 无效 ----->");
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -287,7 +289,6 @@ public class TanluCardViewFragment extends MvpFragment<IView, Presenter<IView>>
|
||||
|
||||
@Override
|
||||
public void onDestroyView() {
|
||||
Logger.w(TAG, "onDestroyView position=" + position);
|
||||
super.onDestroyView();
|
||||
getViewLifecycleOwner().getLifecycle().removeObserver(mPresenter);
|
||||
TanluServiceHandler.getLocationClient().removeLocationListener(this);
|
||||
|
||||
@@ -39,19 +39,18 @@
|
||||
<!--视频播放器和图片播放器-->
|
||||
<RelativeLayout
|
||||
android:id="@+id/media_layout"
|
||||
android:layout_below="@+id/layout_top_view"
|
||||
android:layout_width="400dp"
|
||||
android:layout_height="225dp">
|
||||
android:layout_height="225dp"
|
||||
android:layout_below="@+id/layout_top_view">
|
||||
|
||||
<com.mogo.tanlu.video.SimpleCoverVideoPlayer
|
||||
android:id="@+id/video_player_main"
|
||||
android:visibility="gone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
android:layout_height="match_parent"
|
||||
android:visibility="gone" />
|
||||
|
||||
<com.mogo.tanlu.view.AutoZoomInImageView
|
||||
android:id="@+id/tanlu_photo_imageView"
|
||||
android:src="@drawable/default_image"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
@@ -61,17 +60,17 @@
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="80dp"
|
||||
android:background="@drawable/shape_bg_222533_6px_bottom"
|
||||
android:layout_below="@+id/media_layout">
|
||||
android:layout_below="@+id/media_layout"
|
||||
android:background="@drawable/shape_bg_222533_6px_bottom">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/username_image_video"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:visibility="gone"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:src="@mipmap/ic_launcher" />
|
||||
android:src="@mipmap/ic_launcher"
|
||||
android:visibility="gone" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_username_video"
|
||||
@@ -79,11 +78,11 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:visibility="gone"
|
||||
android:layout_toRightOf="@+id/username_image_video"
|
||||
android:text="你好小智"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="18dp" />
|
||||
android:textSize="18dp"
|
||||
android:visibility="gone" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_information_media_time"
|
||||
@@ -94,9 +93,9 @@
|
||||
android:paddingLeft="15dp"
|
||||
android:paddingRight="17dp"
|
||||
android:text="2019-10-10"
|
||||
android:visibility="gone"
|
||||
android:textColor="@color/color_9A9A9A"
|
||||
android:textSize="16dp" />
|
||||
android:textSize="16dp"
|
||||
android:visibility="gone" />
|
||||
|
||||
|
||||
<TextView
|
||||
@@ -104,10 +103,10 @@
|
||||
android:layout_width="110dp"
|
||||
android:layout_height="45dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:gravity="center_vertical|center_horizontal"
|
||||
android:layout_marginLeft="35dp"
|
||||
android:text="上一个"
|
||||
android:background="@drawable/shape_bg_222533"
|
||||
android:gravity="center_vertical|center_horizontal"
|
||||
android:text="上一个"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="18dp" />
|
||||
|
||||
@@ -116,11 +115,11 @@
|
||||
android:id="@+id/tv_next_res"
|
||||
android:layout_width="110dp"
|
||||
android:layout_height="45dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:gravity="center_vertical|center_horizontal"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginRight="35dp"
|
||||
android:background="@drawable/shape_bg_222533"
|
||||
android:gravity="center_vertical|center_horizontal"
|
||||
android:text="下一个"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="18dp" />
|
||||
|
||||
Reference in New Issue
Block a user