This commit is contained in:
lixiaopeng
2020-08-13 15:32:32 +08:00
parent 296bf7382f
commit f5ac8eb6c6
2 changed files with 114 additions and 112 deletions

View File

@@ -42,6 +42,7 @@ import com.mogo.module.v2x.utils.animation.AnimationResources;
import com.mogo.module.v2x.utils.animation.V2XAnimationManager;
import com.mogo.module.v2x.view.SurroundingEventView;
import com.mogo.module.v2x.view.SurroundingMarginDecoration;
import com.mogo.module.v2x.view.V2XNetworkLoadingView;
import com.mogo.service.IMogoServiceApis;
import com.mogo.service.MogoServicePaths;
import com.mogo.utils.WorkThreadHandler;
@@ -73,8 +74,7 @@ public class V2XSurroundingFragment extends MvpFragment<SurroundingEventView, Su
private SurroundingEventPresenter surroundingEventPresenter;
private List<SurroundingConstruction> poiInfosList = new ArrayList<>();
private IMogoServiceApis mApis;
private V2XAnimationManager mV2XAnimationManager;
private ImageView mloadingImage;
private V2XNetworkLoadingView mloadingImage;
@Override
@@ -93,7 +93,6 @@ public class V2XSurroundingFragment extends MvpFragment<SurroundingEventView, Su
@Override
protected void initViews() {
Log.d(TAG, "initViews --------> ");
mV2XAnimationManager = new V2XAnimationManager();
mRecyclerView = findViewById(R.id.surrounding_recycleview);
mTotalTv = findViewById(R.id.tv_brief);
mTopLayout = findViewById(R.id.layout_top);
@@ -154,8 +153,9 @@ public class V2XSurroundingFragment extends MvpFragment<SurroundingEventView, Su
* 获取和刷新数据
*/
private void initData() {
mV2XAnimationManager.animationWithTarget(mloadingImage, AnimationResources.loadingRes, 100);
mV2XAnimationManager.start();
mTopLayout.setVisibility(View.GONE);
mRecyclerView.setVisibility(View.GONE);
mloadingImage.start();
surroundingEventPresenter.getSurroundingEventData();
}
@@ -164,8 +164,7 @@ public class V2XSurroundingFragment extends MvpFragment<SurroundingEventView, Su
*/
@Override
public void showSurroudingData(List<MarkerExploreWay> exploreWayList) {
mV2XAnimationManager.stop();
mloadingImage.setVisibility(View.GONE);
mloadingImage.stop();
if (exploreWayList != null && exploreWayList.size() > 0) {
//展示数据
mTopLayout.setVisibility(View.VISIBLE);