Merge remote-tracking branch 'origin/dev_1.1.2' into dev_1.1.2
This commit is contained in:
@@ -12,7 +12,7 @@ public interface IMogoMarkerClickListener {
|
||||
* 事件是否继续往下传递
|
||||
*
|
||||
* @param marker
|
||||
* @return true - 时间已经处理完毕不继续往下传,否则继续往下传
|
||||
* @return true - 事件已经处理完毕不继续往下传,否则继续往下传
|
||||
*/
|
||||
boolean onMarkerClicked( IMogoMarker marker );
|
||||
}
|
||||
|
||||
@@ -14,6 +14,8 @@ import com.mogo.service.intent.IMogoIntentListener;
|
||||
import com.mogo.service.intent.IMogoIntentManager;
|
||||
import com.mogo.service.statusmanager.IMogoStatusChangedListener;
|
||||
import com.mogo.service.statusmanager.StatusDescriptor;
|
||||
import com.mogo.utils.AppUtils;
|
||||
import com.mogo.utils.CommonUtils;
|
||||
import com.mogo.utils.TipToast;
|
||||
import com.mogo.utils.UiThreadHandler;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
@@ -35,6 +37,8 @@ public class SchemeIntent implements IMogoStatusChangedListener {
|
||||
|
||||
public static final String TYPE_NAVI = "navi";
|
||||
|
||||
public static final String TYPE_LAUNCH = "launch";
|
||||
|
||||
private IMogoServiceApis mApis;
|
||||
private Context mContext;
|
||||
|
||||
@@ -84,10 +88,10 @@ public class SchemeIntent implements IMogoStatusChangedListener {
|
||||
handleSwitch2Action( target );
|
||||
break;
|
||||
case "/main/share":
|
||||
Logger.d(TAG,"收到打开分享框的scheme,准备打开分享框");
|
||||
Logger.d( TAG, "收到打开分享框的scheme,准备打开分享框" );
|
||||
Map< String, Object > properties = new HashMap<>();
|
||||
properties.put( "from", "1" );
|
||||
mApis.getAnalyticsApi().track("v2x_share_click", properties);
|
||||
mApis.getAnalyticsApi().track( "v2x_share_click", properties );
|
||||
mApis.getShareManager().showShareDialog();
|
||||
break;
|
||||
default:
|
||||
@@ -115,6 +119,10 @@ public class SchemeIntent implements IMogoStatusChangedListener {
|
||||
case TYPE_NAVI:
|
||||
handleNaviIntent( target );
|
||||
break;
|
||||
case TYPE_LAUNCH:
|
||||
handleLaunchIntent( target );
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -145,6 +153,15 @@ public class SchemeIntent implements IMogoStatusChangedListener {
|
||||
}
|
||||
}
|
||||
|
||||
private void handleLaunchIntent( Uri uri ) {
|
||||
String type = uri.getQueryParameter( "channelType" );
|
||||
Map< String, Object > properties = new HashMap<>();
|
||||
properties.put( "appname", CommonUtils.getAppName( mContext ) );
|
||||
properties.put( "appversion", CommonUtils.getVersionName( mContext ) );
|
||||
properties.put( "from", type );
|
||||
mApis.getAnalyticsApi().track( "appenterfront", properties );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStatusChanged( StatusDescriptor descriptor, boolean isTrue ) {
|
||||
if ( descriptor == StatusDescriptor.MAIN_PAGE_RESUME ) {
|
||||
|
||||
@@ -17,6 +17,6 @@ public class EmptyIntentHandler implements IntentHandler {
|
||||
|
||||
@Override
|
||||
public void handle( Context context, Intent intent ) {
|
||||
Logger.w( TAG, "空实现." );
|
||||
Logger.w( TAG, "空实现. %s", intent.getAction() );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,16 @@
|
||||
package com.mogo.module.v2x.adapter;
|
||||
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import androidx.recyclerview.widget.RecyclerView.ViewHolder;
|
||||
|
||||
import com.mogo.module.common.entity.V2XHistoryScenarioData;
|
||||
import com.mogo.module.common.entity.V2XMessageEntity;
|
||||
import com.mogo.module.v2x.R;
|
||||
import com.mogo.module.v2x.adapter.holder.V2XScenarioHistoryIllegalParkVH;
|
||||
import com.mogo.module.v2x.adapter.holder.V2XScenarioHistoryOtherSeekHelpVH;
|
||||
import com.mogo.module.v2x.adapter.holder.V2XScenarioHistoryRoadEventVH;
|
||||
@@ -16,7 +20,7 @@ import java.util.ArrayList;
|
||||
/**
|
||||
* @author donghongyu
|
||||
*/
|
||||
public class V2XScenarioHistoryAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
|
||||
public class V2XScenarioHistoryAdapter extends RecyclerView.Adapter<ViewHolder> {
|
||||
|
||||
private ArrayList<V2XHistoryScenarioData> mV2XHistoryScenarioData;
|
||||
|
||||
@@ -28,8 +32,8 @@ public class V2XScenarioHistoryAdapter extends RecyclerView.Adapter<RecyclerView
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
RecyclerView.ViewHolder holder;
|
||||
public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
ViewHolder holder;
|
||||
switch (viewType) {
|
||||
//道路事件详情
|
||||
case V2XMessageEntity.V2XTypeEnum.ALERT_ROAD_WARNING:
|
||||
@@ -43,35 +47,57 @@ public class V2XScenarioHistoryAdapter extends RecyclerView.Adapter<RecyclerView
|
||||
case V2XMessageEntity.V2XTypeEnum.ALERT_SEEK_WARNING:
|
||||
holder = new V2XScenarioHistoryOtherSeekHelpVH(parent);
|
||||
break;
|
||||
//没有更多的数据的Footer
|
||||
default:
|
||||
holder = new V2XScenarioHistoryRoadEventVH(parent);
|
||||
View footerView = LayoutInflater.from(parent.getContext())
|
||||
.inflate(R.layout.footer_nomore_view, parent, false);
|
||||
holder = new FooterViewHolder(footerView);
|
||||
break;
|
||||
}
|
||||
|
||||
return holder;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
|
||||
if (holder instanceof V2XScenarioHistoryRoadEventVH) {
|
||||
((V2XScenarioHistoryRoadEventVH) holder).initView(mV2XHistoryScenarioData.get(position));
|
||||
}
|
||||
if (holder instanceof V2XScenarioHistoryIllegalParkVH) {
|
||||
((V2XScenarioHistoryIllegalParkVH) holder).initView(mV2XHistoryScenarioData.get(position));
|
||||
}
|
||||
if (holder instanceof V2XScenarioHistoryOtherSeekHelpVH) {
|
||||
((V2XScenarioHistoryOtherSeekHelpVH) holder).initView(mV2XHistoryScenarioData.get(position));
|
||||
public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
|
||||
if (position < mV2XHistoryScenarioData.size()) {
|
||||
if (holder instanceof V2XScenarioHistoryRoadEventVH) {
|
||||
((V2XScenarioHistoryRoadEventVH) holder).initView(mV2XHistoryScenarioData.get(position));
|
||||
}
|
||||
if (holder instanceof V2XScenarioHistoryIllegalParkVH) {
|
||||
((V2XScenarioHistoryIllegalParkVH) holder).initView(mV2XHistoryScenarioData.get(position));
|
||||
}
|
||||
if (holder instanceof V2XScenarioHistoryOtherSeekHelpVH) {
|
||||
((V2XScenarioHistoryOtherSeekHelpVH) holder).initView(mV2XHistoryScenarioData.get(position));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemViewType(int position) {
|
||||
return mV2XHistoryScenarioData.get(position).getScenarioType();
|
||||
if (position < mV2XHistoryScenarioData.size()) {
|
||||
return mV2XHistoryScenarioData.get(position).getScenarioType();
|
||||
} else {
|
||||
// 没有更多的Footer
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return mV2XHistoryScenarioData == null ? 0 : mV2XHistoryScenarioData.size();
|
||||
// 多添加一个Footer
|
||||
return mV2XHistoryScenarioData == null ? 0 : mV2XHistoryScenarioData.size() + 1;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Footer 视图
|
||||
*/
|
||||
static class FooterViewHolder extends RecyclerView.ViewHolder {
|
||||
public FooterViewHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -5,8 +5,6 @@ import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Button;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
@@ -24,11 +22,10 @@ import com.mogo.module.v2x.listener.AdapterCallback;
|
||||
import com.mogo.module.v2x.network.V2XRefreshCallback;
|
||||
import com.mogo.module.v2x.network.V2XShareNetworkModel;
|
||||
import com.mogo.module.v2x.presenter.ShareEventsPresenter;
|
||||
import com.mogo.module.v2x.utils.animation.V2XAnimationManager;
|
||||
import com.mogo.module.v2x.utils.animation.AnimationResources;
|
||||
import com.mogo.module.v2x.view.V2XNetworkLoadingView;
|
||||
import com.mogo.utils.CheckUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.concurrent.CountDownLatch;
|
||||
|
||||
public class V2XShareEventsFragment extends MvpFragment implements AdapterCallback {
|
||||
|
||||
@@ -37,13 +34,10 @@ public class V2XShareEventsFragment extends MvpFragment implements AdapterCallba
|
||||
private V2XShareEventAdapter adapter;
|
||||
private ArrayList dataArrayList = new ArrayList();
|
||||
private int pageNum = 1;
|
||||
final CountDownLatch countDownLatch = new CountDownLatch(1);
|
||||
private V2XShareNetworkModel v2XShareNetworkModel;
|
||||
|
||||
//动画
|
||||
private ImageView loadingImageView;
|
||||
private V2XAnimationManager v2XAnimationManager;
|
||||
private Button reloadBUtton;
|
||||
private V2XNetworkLoadingView loadingView;
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
@@ -53,7 +47,6 @@ public class V2XShareEventsFragment extends MvpFragment implements AdapterCallba
|
||||
@Override
|
||||
protected void initViews() {
|
||||
v2XShareNetworkModel = new V2XShareNetworkModel(getContext());
|
||||
v2XAnimationManager = new V2XAnimationManager();
|
||||
initRecyclerView();
|
||||
initData();
|
||||
}
|
||||
@@ -72,11 +65,11 @@ public class V2XShareEventsFragment extends MvpFragment implements AdapterCallba
|
||||
LinearLayoutManager linearLayoutManager =
|
||||
new LinearLayoutManager(getActivity(), LinearLayoutManager.VERTICAL, false);
|
||||
recyclerView.setLayoutManager(linearLayoutManager);
|
||||
loadingView = mRootView.findViewById(R.id.network_loading_imageview);
|
||||
}
|
||||
|
||||
private void initData() {
|
||||
loadingImageView = mRootView.findViewById(R.id.loading_imageview);
|
||||
v2XAnimationManager.animationWithTarget(loadingImageView, AnimationResources.loadingRes, 100);
|
||||
loadingView.start();
|
||||
getShareEventResponse();
|
||||
}
|
||||
|
||||
@@ -84,6 +77,9 @@ public class V2XShareEventsFragment extends MvpFragment implements AdapterCallba
|
||||
* 获取热心指数,分享列表等分享内容
|
||||
* */
|
||||
private void getShareEventResponse() {
|
||||
if (CheckUtils.isNetworkConnected(getContext()) == false) {
|
||||
Log.d(TAG, "网络异常");
|
||||
}
|
||||
v2XShareNetworkModel.getShareEventResponse(pageNum, 10, new V2XRefreshCallback() {
|
||||
@Override
|
||||
public void onSuccess(Object result) {
|
||||
@@ -102,8 +98,10 @@ public class V2XShareEventsFragment extends MvpFragment implements AdapterCallba
|
||||
|
||||
@Override
|
||||
public void onFail(String msg) {
|
||||
loadingError(true);
|
||||
// loadingError(true);
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
@@ -148,40 +146,17 @@ public class V2XShareEventsFragment extends MvpFragment implements AdapterCallba
|
||||
dataArrayList.add(item);
|
||||
}
|
||||
adapter.notifyDataSetChanged();
|
||||
v2XAnimationManager.stop();
|
||||
animatioonAcction(View.INVISIBLE);
|
||||
}
|
||||
|
||||
/*
|
||||
* error界面
|
||||
* */
|
||||
private void loadingError(boolean error) {
|
||||
reloadBUtton = mRootView.findViewById(R.id.loading_error);
|
||||
if (error) {
|
||||
reloadBUtton.setVisibility(View.VISIBLE);
|
||||
reloadBUtton.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
v2XShareNetworkModel.getShareEventList(pageNum, 10, new V2XRefreshCallback() {
|
||||
@Override
|
||||
public void onSuccess(Object result) {
|
||||
loadSuccessWithShareEventList(result);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFail(String msg) {
|
||||
|
||||
}
|
||||
});
|
||||
reloadBUtton.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
});
|
||||
private void animatioonAcction(int visible) {
|
||||
if (visible == View.VISIBLE) {
|
||||
loadingView.start();
|
||||
} else {
|
||||
|
||||
loadingView.stop();
|
||||
}
|
||||
v2XAnimationManager.stop();
|
||||
}
|
||||
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
protected ShareEventsPresenter createPresenter() {
|
||||
@@ -191,9 +166,9 @@ public class V2XShareEventsFragment extends MvpFragment implements AdapterCallba
|
||||
|
||||
@Override
|
||||
public void loadMoreShareEventList() {
|
||||
Log.d(TAG,"page--"+pageNum);
|
||||
v2XAnimationManager.start();
|
||||
pageNum+=1;
|
||||
Log.d(TAG, "page--" + pageNum);
|
||||
animatioonAcction(View.VISIBLE);
|
||||
pageNum += 1;
|
||||
v2XShareNetworkModel.getShareEventList(pageNum, 10, new V2XRefreshCallback() {
|
||||
@Override
|
||||
public void onSuccess(Object result) {
|
||||
|
||||
@@ -9,9 +9,12 @@ import android.text.style.AbsoluteSizeSpan;
|
||||
import android.text.style.ForegroundColorSpan;
|
||||
import android.text.style.StyleSpan;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.animation.AccelerateInterpolator;
|
||||
import android.view.animation.LinearInterpolator;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
@@ -35,6 +38,8 @@ import com.mogo.module.v2x.adapter.V2XSurroundingAdapter;
|
||||
import com.mogo.module.v2x.entity.panel.SurroundingConstruction;
|
||||
import com.mogo.module.v2x.listener.SurroundingItemClickListener;
|
||||
import com.mogo.module.v2x.presenter.SurroundingEventPresenter;
|
||||
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.service.IMogoServiceApis;
|
||||
@@ -45,11 +50,11 @@ import com.mogo.utils.logger.Logger;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import static android.view.View.OVER_SCROLL_NEVER;
|
||||
import static com.mogo.module.v2x.V2XConst.MODULE_NAME;
|
||||
|
||||
/**
|
||||
* 周边事件
|
||||
@@ -68,6 +73,9 @@ 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;
|
||||
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
@@ -75,9 +83,17 @@ public class V2XSurroundingFragment extends MvpFragment<SurroundingEventView, Su
|
||||
return R.layout.module_event_panel_fragment_surrounding;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
super.onCreateView(inflater, container, savedInstanceState);
|
||||
return mRootView;
|
||||
}
|
||||
|
||||
@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);
|
||||
@@ -85,6 +101,7 @@ public class V2XSurroundingFragment extends MvpFragment<SurroundingEventView, Su
|
||||
mTopFreshTv = findViewById(R.id.tv_top_refresh);
|
||||
mShareTv = findViewById(R.id.tv_main_share);
|
||||
mFreshTv = findViewById(R.id.tv_main_refresh);
|
||||
mloadingImage = mRootView.findViewById(R.id.loading_iv);
|
||||
mTopFreshTv.setOnClickListener(this);
|
||||
mShareTv.setOnClickListener(this);
|
||||
mFreshTv.setOnClickListener(this);
|
||||
@@ -92,7 +109,7 @@ public class V2XSurroundingFragment extends MvpFragment<SurroundingEventView, Su
|
||||
mRecyclerView.setHasFixedSize(true);
|
||||
mRecyclerView.setOverScrollMode(OVER_SCROLL_NEVER);
|
||||
GridLayoutManager layoutManage = new GridLayoutManager(getContext(), 2);
|
||||
int spacingInPixels = getContext().getResources().getDimensionPixelSize(R.dimen.module_v2x_surrounding_item_size);
|
||||
int spacingInPixels = getContext().getResources().getDimensionPixelSize(R.dimen.module_v2x_surrounding_item_bottom_right_textsize);
|
||||
mRecyclerView.addItemDecoration(new SurroundingMarginDecoration(spacingInPixels));
|
||||
mRecyclerView.setLayoutManager(layoutManage);
|
||||
|
||||
@@ -137,6 +154,8 @@ public class V2XSurroundingFragment extends MvpFragment<SurroundingEventView, Su
|
||||
* 获取和刷新数据
|
||||
*/
|
||||
private void initData() {
|
||||
mV2XAnimationManager.animationWithTarget(mloadingImage, AnimationResources.loadingRes, 100);
|
||||
mV2XAnimationManager.start();
|
||||
surroundingEventPresenter.getSurroundingEventData();
|
||||
}
|
||||
|
||||
@@ -145,6 +164,8 @@ public class V2XSurroundingFragment extends MvpFragment<SurroundingEventView, Su
|
||||
*/
|
||||
@Override
|
||||
public void showSurroudingData(List<MarkerExploreWay> exploreWayList) {
|
||||
mV2XAnimationManager.stop();
|
||||
mloadingImage.setVisibility(View.GONE);
|
||||
if (exploreWayList != null && exploreWayList.size() > 0) {
|
||||
//展示数据
|
||||
mTopLayout.setVisibility(View.VISIBLE);
|
||||
@@ -191,10 +212,55 @@ public class V2XSurroundingFragment extends MvpFragment<SurroundingEventView, Su
|
||||
|
||||
private List<SurroundingConstruction> handleMapToList(Map<String, SurroundingConstruction> map) {
|
||||
Collection<? extends SurroundingConstruction> valueCollection = map.values();
|
||||
List<SurroundingConstruction> valueList = new ArrayList<>(valueCollection);
|
||||
List<SurroundingConstruction> list = new ArrayList<>(valueCollection);
|
||||
List<SurroundingConstruction> resultSurroundingList = new ArrayList<>();
|
||||
List<SurroundingConstruction> outSurroundingList = new ArrayList<>();
|
||||
|
||||
Log.d(TAG, "handleMapToList valueList.size() = " + valueList.size());
|
||||
return valueList;
|
||||
if (list != null && list.size() > 0) {
|
||||
List<String> prioritySorts = prioritySort();
|
||||
for (String poiType : prioritySorts) {
|
||||
for (SurroundingConstruction construction : list) {
|
||||
if (!prioritySorts.contains(construction.getPoiType())) {
|
||||
outSurroundingList.add(construction);
|
||||
continue;
|
||||
} else if (poiType.equals(construction.getPoiType())) {
|
||||
resultSurroundingList.add(construction);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (outSurroundingList != null && outSurroundingList.size() > 0) {
|
||||
resultSurroundingList.addAll(outSurroundingList);
|
||||
}
|
||||
|
||||
Log.d(TAG, "handleMapToList resultSurroundingList.size() = " + resultSurroundingList.size());
|
||||
return resultSurroundingList;
|
||||
}
|
||||
|
||||
public static List<String> prioritySort() {
|
||||
List<String> poiTypes = new LinkedList<>();
|
||||
|
||||
// 封路
|
||||
poiTypes.add("10003");
|
||||
// 结冰
|
||||
poiTypes.add("10011");
|
||||
// 浓雾
|
||||
poiTypes.add("10010");
|
||||
// 交通检查
|
||||
poiTypes.add("10002");
|
||||
// 交通事故
|
||||
poiTypes.add("10013");
|
||||
// 拥堵
|
||||
poiTypes.add("10007");
|
||||
// 道路施工
|
||||
poiTypes.add("10006");
|
||||
// 积水
|
||||
poiTypes.add("10008");
|
||||
//实时路况
|
||||
poiTypes.add("10015");
|
||||
|
||||
return poiTypes;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -245,7 +311,7 @@ public class V2XSurroundingFragment extends MvpFragment<SurroundingEventView, Su
|
||||
mogoMarker.startScaleAnimation(1.2f, 1, 1.2f, 1, 100, new LinearInterpolator(), null);
|
||||
}
|
||||
});
|
||||
mogoMarker.setOwner(MODULE_NAME);
|
||||
mogoMarker.setOwner(markerShowEntity.getMarkerType());
|
||||
mogoMarker.setObject(markerShowEntity);
|
||||
}
|
||||
}, i * 100L);
|
||||
@@ -268,7 +334,7 @@ public class V2XSurroundingFragment extends MvpFragment<SurroundingEventView, Su
|
||||
* @param exploreWayList
|
||||
*/
|
||||
private void showBonndsRoadtion(List<MarkerExploreWay> exploreWayList) {
|
||||
Logger.e(TAG, "showBonndsRoadtion exploreWayList.size() = " + exploreWayList.size());
|
||||
Logger.d(TAG, "showBonndsRoadtion exploreWayList.size() = " + exploreWayList.size());
|
||||
Rect rect = new Rect(
|
||||
(int) getContext().getResources().getDimension(R.dimen.module_v2x_map_left),
|
||||
(int) getContext().getResources().getDimension(R.dimen.module_v2x_map_top),
|
||||
|
||||
@@ -62,12 +62,12 @@ public class V2XRoadEventScenario extends AbsV2XScenario<V2XRoadEventEntity> imp
|
||||
V2XRoadEventEntity v2XRoadEventEntity = v2XMessageEntity.getContent();
|
||||
if (v2XRoadEventEntity != null) {
|
||||
//只上报事故
|
||||
if (v2XRoadEventEntity.getPoiType() != null && v2XRoadEventEntity.getPoiType().equals(MarkerPoiTypeEnum.FOURS_ACCIDENT)) {
|
||||
// V2XServiceManager.getMoGoStatusManager().setUploadingStatus(ServiceConst.CARD_TYPE_ROAD_CONDITION, true);
|
||||
TanluUploadParams params = new TanluUploadParams(v2XRoadEventEntity.getPoiType(),
|
||||
IMogoTanluProvider.UPLOAD_FROM_STRATEGY_ACCIDENT_AUTO);
|
||||
V2XServiceManager.getTanluManager().uploadRoadCondition(params);
|
||||
}
|
||||
// if (v2XRoadEventEntity.getPoiType() != null && v2XRoadEventEntity.getPoiType().equals(MarkerPoiTypeEnum.FOURS_ACCIDENT)) {
|
||||
//// V2XServiceManager.getMoGoStatusManager().setUploadingStatus(ServiceConst.CARD_TYPE_ROAD_CONDITION, true);
|
||||
// TanluUploadParams params = new TanluUploadParams(v2XRoadEventEntity.getPoiType(),
|
||||
// IMogoTanluProvider.UPLOAD_FROM_STRATEGY_ACCIDENT_AUTO);
|
||||
// V2XServiceManager.getTanluManager().uploadRoadCondition(params);
|
||||
// }
|
||||
|
||||
if (v2XMessageEntity.isShowState()) {
|
||||
if (!isSameScenario(v2XMessageEntity)) {
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
package com.mogo.module.v2x.view;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.mogo.module.v2x.R;
|
||||
import com.mogo.module.v2x.utils.animation.AnimationResources;
|
||||
import com.mogo.module.v2x.utils.animation.V2XAnimationManager;
|
||||
|
||||
public class V2XNetworkLoadingView extends RelativeLayout {
|
||||
|
||||
private ImageView loadView;
|
||||
private TextView textView;
|
||||
private V2XAnimationManager v2XAnimationManager;
|
||||
|
||||
|
||||
public V2XNetworkLoadingView(Context context) {
|
||||
|
||||
super(context);
|
||||
}
|
||||
|
||||
public V2XNetworkLoadingView(Context context, @Nullable AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
LayoutInflater.from(context).inflate(R.layout.v2x_network_loading_item, this);
|
||||
initView();
|
||||
setLoadingImage(AnimationResources.loadingRes);
|
||||
}
|
||||
|
||||
public V2XNetworkLoadingView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
}
|
||||
|
||||
public void initView() {
|
||||
v2XAnimationManager = new V2XAnimationManager();
|
||||
loadView = findViewById(R.id.loading_imageview);
|
||||
textView = findViewById(R.id.loading_text);
|
||||
}
|
||||
|
||||
public void setLoadingText(String text) {
|
||||
if (textView != null) {
|
||||
textView.setText(text);
|
||||
}
|
||||
}
|
||||
|
||||
public void setLoadingImage(int[] resources) {
|
||||
v2XAnimationManager.animationWithTarget(loadView, resources, 100);
|
||||
}
|
||||
|
||||
public void start() {
|
||||
if (v2XAnimationManager != null) {
|
||||
v2XAnimationManager.start();
|
||||
this.setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
|
||||
public void stop() {
|
||||
if (v2XAnimationManager != null) {
|
||||
v2XAnimationManager.stop();
|
||||
this.setVisibility(GONE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_102"
|
||||
android:layout_marginEnd="@dimen/dp_102"
|
||||
android:paddingTop="@dimen/dp_56"
|
||||
android:paddingBottom="@dimen/dp_56">
|
||||
|
||||
<View
|
||||
android:id="@+id/viewLinStart"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="1px"
|
||||
android:background="#979797"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/tvNoMoreDataTrip"
|
||||
app:layout_constraintEnd_toStartOf="@+id/tvNoMoreDataTrip"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/tvNoMoreDataTrip" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvNoMoreDataTrip"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_32"
|
||||
android:layout_marginEnd="@dimen/dp_32"
|
||||
android:text="没有更多记录了"
|
||||
android:textColor="#99FFFFFF"
|
||||
android:textSize="@dimen/dp_26"
|
||||
app:layout_constraintEnd_toStartOf="@+id/viewLinEnd"
|
||||
app:layout_constraintStart_toEndOf="@+id/viewLinStart"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<View
|
||||
android:id="@+id/viewLinEnd"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="1px"
|
||||
android:background="#979797"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/tvNoMoreDataTrip"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/tvNoMoreDataTrip"
|
||||
app:layout_constraintTop_toTopOf="@+id/tvNoMoreDataTrip" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -10,29 +10,30 @@
|
||||
<RelativeLayout
|
||||
android:id="@+id/layout_top"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="35px"
|
||||
android:visibility="visible">
|
||||
android:layout_height="@dimen/module_v2x_surrounding_top_height"
|
||||
android:visibility="gone">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_brief"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="20px"
|
||||
android:textSize="18px"
|
||||
android:textColor="@color/white" />
|
||||
android:layout_marginLeft="@dimen/module_v2x_surrounding_margin_left"
|
||||
android:text="周围5公里,共15条交通信息"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/module_v2x_surrounding_top_textsize" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_top_refresh"
|
||||
android:layout_width="90px"
|
||||
android:layout_height="36px"
|
||||
android:layout_width="@dimen/module_v2x_surrounding_top_bt_width"
|
||||
android:layout_height="@dimen/module_v2x_surrounding_top_bt_height"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_marginRight="20px"
|
||||
android:layout_marginRight="@dimen/module_v2x_surrounding_margin_left"
|
||||
android:background="@drawable/bg_v2x_refresh"
|
||||
android:gravity="center"
|
||||
android:text="@string/v2x_surrounding_refresh"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="18px"
|
||||
android:textSize="@dimen/module_v2x_surrounding_top_textsize"
|
||||
android:textStyle="bold" />
|
||||
</RelativeLayout>
|
||||
|
||||
@@ -41,11 +42,11 @@
|
||||
android:id="@+id/list_layout_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="10px"
|
||||
android:layout_marginLeft="10px"
|
||||
android:layout_marginRight="10px"
|
||||
android:layout_marginBottom="20px"
|
||||
android:layout_below="@+id/layout_top">
|
||||
android:layout_below="@+id/layout_top"
|
||||
android:layout_marginLeft="@dimen/module_v2x_surrounding_root_margin_left"
|
||||
android:layout_marginTop="@dimen/module_v2x_surrounding_empty_tv_margin_top"
|
||||
android:layout_marginRight="@dimen/module_v2x_surrounding_root_margin_left"
|
||||
android:layout_marginBottom="@dimen/module_v2x_surrounding_margin_left">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/surrounding_recycleview"
|
||||
@@ -64,10 +65,10 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_empty"
|
||||
android:layout_width="194px"
|
||||
android:layout_height="194px"
|
||||
android:layout_width="@dimen/module_v2x_surrounding_empty_image_height"
|
||||
android:layout_height="@dimen/module_v2x_surrounding_empty_image_height"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="59px"
|
||||
android:layout_marginTop="@dimen/module_v2x_surrounding_empty_iv_margin_top"
|
||||
android:src="@drawable/mogo_image_blank_nor" />
|
||||
|
||||
<TextView
|
||||
@@ -76,11 +77,11 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/iv_empty"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="15px"
|
||||
android:layout_marginTop="@dimen/module_v2x_surrounding_empty_tv_margin_top"
|
||||
android:gravity="center_horizontal"
|
||||
android:text="周边5公里,暂无交通事件"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="18px"
|
||||
android:textSize="@dimen/module_v2x_surrounding_top_textsize"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
@@ -92,41 +93,48 @@
|
||||
android:layout_marginTop="1px"
|
||||
android:gravity="center_horizontal"
|
||||
android:text="你可以试着分享一个事件给其他车主"
|
||||
android:textColor="@color/transparent_white_30"
|
||||
android:textSize="18px"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/module_v2x_surrounding_top_textsize"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_main_share"
|
||||
android:layout_width="150px"
|
||||
android:layout_height="48px"
|
||||
android:layout_width="@dimen/module_v2x_surrounding_empty_bt_width"
|
||||
android:layout_height="@dimen/module_v2x_surrounding_empty_bt_height"
|
||||
android:layout_below="@+id/tv_main_empty_2"
|
||||
android:layout_marginLeft="70px"
|
||||
android:layout_marginTop="32px"
|
||||
android:layout_marginLeft="@dimen/module_v2x_surrounding_empty_bt_maigin_left"
|
||||
android:layout_marginTop="@dimen/module_v2x_surrounding_empty_bt_margin_top"
|
||||
android:background="@drawable/bg_v2x_go_to_share"
|
||||
android:gravity="center"
|
||||
android:text="@string/v2x_surrounding_go_to_share"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="18px"
|
||||
android:textSize="@dimen/module_v2x_surrounding_top_textsize"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_main_refresh"
|
||||
android:layout_width="150px"
|
||||
android:layout_height="48px"
|
||||
android:layout_width="@dimen/module_v2x_surrounding_empty_bt_width"
|
||||
android:layout_height="@dimen/module_v2x_surrounding_empty_bt_height"
|
||||
android:layout_below="@+id/tv_main_empty_2"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginTop="32px"
|
||||
android:layout_marginRight="70px"
|
||||
android:layout_marginTop="@dimen/module_v2x_surrounding_empty_bt_margin_top"
|
||||
android:layout_marginRight="@dimen/module_v2x_surrounding_empty_bt_maigin_left"
|
||||
android:background="@drawable/bg_v2x_refresh"
|
||||
android:gravity="center"
|
||||
android:text="@string/v2x_surrounding_refresh"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="18px"
|
||||
android:textSize="@dimen/module_v2x_surrounding_top_textsize"
|
||||
android:textStyle="bold" />
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/loading_iv"
|
||||
android:layout_width="200px"
|
||||
android:layout_height="200px"
|
||||
android:layout_centerInParent="true"
|
||||
android:visibility="gone"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
|
||||
@@ -2,25 +2,25 @@
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/layout_root"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="173px">
|
||||
android:layout_height="@dimen/module_v2x_surrounding_item_height">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_event_bg"
|
||||
android:scaleType="center"
|
||||
android:scaleType="fitXY"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="130px" />
|
||||
android:layout_height="@dimen/module_v2x_surrounding_item_image_height" />
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_below="@+id/iv_event_bg"
|
||||
android:background="@drawable/bg_v2x_event_surrounding_item_bottom"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="43px">
|
||||
android:layout_height="@dimen/module_v2x_surrounding_item_bottom">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_event_type"
|
||||
android:layout_width="26px"
|
||||
android:layout_height="26px"
|
||||
android:layout_marginLeft="10px"
|
||||
android:layout_width="@dimen/module_v2x_surrounding_item_bottom_image_height"
|
||||
android:layout_height="@dimen/module_v2x_surrounding_item_bottom_image_height"
|
||||
android:layout_marginLeft="@dimen/module_v2x_surrounding_item_marigin_left"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:src="@drawable/icon_default_black_logo" />
|
||||
@@ -31,8 +31,8 @@
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_toRightOf="@+id/iv_event_type"
|
||||
android:layout_marginLeft="8px"
|
||||
android:textSize="20px"
|
||||
android:layout_marginLeft="@dimen/module_v2x_surrounding_item_marigin_bottom_left"
|
||||
android:textSize="@dimen/module_v2x_surrounding_item_bottom_left_textsize"
|
||||
android:textColor="@color/white"
|
||||
android:text="求助" />
|
||||
|
||||
@@ -41,9 +41,9 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginRight="12px"
|
||||
android:layout_marginRight="@dimen/module_v2x_surrounding_item_marigin_left"
|
||||
android:layout_centerVertical="true"
|
||||
android:textSize="16px"
|
||||
android:textSize="@dimen/module_v2x_surrounding_item_bottom_right_textsize"
|
||||
android:textColor="@color/transparent_white_30"
|
||||
android:text="23条" />
|
||||
</RelativeLayout>
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#10121E"
|
||||
android:clickable="true"
|
||||
android:paddingStart="@dimen/dp_30"
|
||||
android:paddingEnd="@dimen/dp_30"
|
||||
android:visibility="gone"
|
||||
|
||||
@@ -85,7 +85,8 @@
|
||||
android:gravity="center_horizontal|top"
|
||||
android:text="车友认同次数"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="16px"/>
|
||||
android:textSize="16px"
|
||||
android:paddingBottom="22px"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" >
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/road_case_share_list"
|
||||
@@ -11,26 +11,21 @@
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:overScrollMode="never"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" >
|
||||
</androidx.recyclerview.widget.RecyclerView>
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"></androidx.recyclerview.widget.RecyclerView>
|
||||
|
||||
<Button
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/loading_error"
|
||||
android:layout_centerInParent="true"
|
||||
android:text="重新加载"
|
||||
android:visibility="gone"
|
||||
android:textSize="30sp">
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_centerInParent="true">
|
||||
|
||||
</Button>
|
||||
<com.mogo.module.v2x.view.V2XNetworkLoadingView
|
||||
android:id="@+id/network_loading_imageview"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true">
|
||||
|
||||
<ImageView
|
||||
android:layout_height="200px"
|
||||
android:layout_width="200px"
|
||||
android:id="@+id/loading_imageview"
|
||||
android:layout_centerInParent="true" >
|
||||
</ImageView>
|
||||
</com.mogo.module.v2x.view.V2XNetworkLoadingView>
|
||||
</RelativeLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/loading_liner_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/loading_imageview"
|
||||
android:layout_width="200px"
|
||||
android:layout_height="200px"
|
||||
android:layout_centerInParent="true"
|
||||
android:background="@drawable/v_to_x_loading_car0000" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/loading_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/loading_text"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_gravity="top|center"
|
||||
android:paddingTop="25px"
|
||||
android:alpha="0.7"
|
||||
android:text="正在获取信息…"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="18px" />
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
@@ -6,8 +6,8 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivEmptyView"
|
||||
android:layout_width="@dimen/dp_390"
|
||||
android:layout_height="@dimen/dp_390"
|
||||
android:layout_width="@dimen/dp_355"
|
||||
android:layout_height="@dimen/dp_355"
|
||||
android:layout_marginTop="@dimen/dp_120"
|
||||
android:src="@drawable/icon_blank_history_event"
|
||||
app:layout_constraintBottom_toTopOf="@+id/tvTrip"
|
||||
|
||||
@@ -23,4 +23,32 @@
|
||||
|
||||
<dimen name="module_v2x_history_event_icon_size">80px</dimen>
|
||||
|
||||
<dimen name="module_v2x_surrounding_item_bottom_size">6px</dimen>
|
||||
<dimen name="module_v2x_map_left">550px</dimen>
|
||||
<dimen name="module_v2x_map_top">200px</dimen>
|
||||
<dimen name="module_v2x_map_right">200px</dimen>
|
||||
<dimen name="module_v2x_map_bottom">100px</dimen>
|
||||
<dimen name="module_v2x_surrounding_top_height">35px</dimen>
|
||||
<dimen name="module_v2x_surrounding_top_bt_width">90px</dimen>
|
||||
<dimen name="module_v2x_surrounding_top_bt_height">36px</dimen>
|
||||
<dimen name="module_v2x_surrounding_empty_iv_margin_top">58px</dimen>
|
||||
<dimen name="module_v2x_surrounding_empty_tv_margin_top">15px</dimen>
|
||||
<dimen name="module_v2x_surrounding_empty_bt_width">150px</dimen>
|
||||
<dimen name="module_v2x_surrounding_empty_bt_height">48px</dimen>
|
||||
<dimen name="module_v2x_surrounding_empty_bt_margin_top">32px</dimen>
|
||||
<dimen name="module_v2x_surrounding_empty_bt_maigin_left">70px</dimen>
|
||||
<dimen name="module_v2x_surrounding_root_margin_left">10px</dimen>
|
||||
<dimen name="module_v2x_surrounding_margin_left">20px</dimen>
|
||||
<dimen name="module_v2x_surrounding_empty_image_height">200px</dimen>
|
||||
<dimen name="module_v2x_surrounding_item_height">173px</dimen>
|
||||
<dimen name="module_v2x_surrounding_item_image_height">130px</dimen>
|
||||
<dimen name="module_v2x_surrounding_item_bottom">43px</dimen>
|
||||
<dimen name="module_v2x_surrounding_item_bottom_image_height">26px</dimen>
|
||||
<dimen name="module_v2x_surrounding_item_marigin_left">12px</dimen>
|
||||
<dimen name="module_v2x_surrounding_item_marigin_bottom_left">8px</dimen>
|
||||
|
||||
<dimen name="module_v2x_surrounding_top_textsize">18px</dimen>
|
||||
<dimen name="module_v2x_surrounding_item_bottom_left_textsize">20px</dimen>
|
||||
<dimen name="module_v2x_surrounding_item_bottom_right_textsize">16px</dimen>
|
||||
|
||||
</resources>
|
||||
|
||||
@@ -29,5 +29,28 @@
|
||||
<dimen name="module_v2x_map_top">200px</dimen>
|
||||
<dimen name="module_v2x_map_right">200px</dimen>
|
||||
<dimen name="module_v2x_map_bottom">100px</dimen>
|
||||
<dimen name="module_v2x_surrounding_top_height">35px</dimen>
|
||||
<dimen name="module_v2x_surrounding_top_bt_width">90px</dimen>
|
||||
<dimen name="module_v2x_surrounding_top_bt_height">36px</dimen>
|
||||
<dimen name="module_v2x_surrounding_empty_iv_margin_top">58px</dimen>
|
||||
<dimen name="module_v2x_surrounding_empty_tv_margin_top">15px</dimen>
|
||||
<dimen name="module_v2x_surrounding_empty_bt_width">150px</dimen>
|
||||
<dimen name="module_v2x_surrounding_empty_bt_height">48px</dimen>
|
||||
<dimen name="module_v2x_surrounding_empty_bt_margin_top">32px</dimen>
|
||||
<dimen name="module_v2x_surrounding_empty_bt_maigin_left">70px</dimen>
|
||||
<dimen name="module_v2x_surrounding_root_margin_left">10px</dimen>
|
||||
<dimen name="module_v2x_surrounding_margin_left">20px</dimen>
|
||||
<dimen name="module_v2x_surrounding_empty_image_height">200px</dimen>
|
||||
<dimen name="module_v2x_surrounding_item_height">173px</dimen>
|
||||
<dimen name="module_v2x_surrounding_item_image_height">130px</dimen>
|
||||
<dimen name="module_v2x_surrounding_item_bottom">43px</dimen>
|
||||
<dimen name="module_v2x_surrounding_item_bottom_image_height">26px</dimen>
|
||||
<dimen name="module_v2x_surrounding_item_marigin_left">12px</dimen>
|
||||
<dimen name="module_v2x_surrounding_item_marigin_bottom_left">8px</dimen>
|
||||
|
||||
<dimen name="module_v2x_surrounding_top_textsize">18px</dimen>
|
||||
<dimen name="module_v2x_surrounding_item_bottom_left_textsize">20px</dimen>
|
||||
<dimen name="module_v2x_surrounding_item_bottom_right_textsize">16px</dimen>
|
||||
|
||||
|
||||
</resources>
|
||||
|
||||
@@ -26,11 +26,31 @@
|
||||
<dimen name="module_v2x_history_event_icon_size">40px</dimen>
|
||||
|
||||
<dimen name="module_v2x_surrounding_item_bottom_size">6px</dimen>
|
||||
<dimen name="module_v2x_surrounding_item_size">16px</dimen>
|
||||
|
||||
<dimen name="module_v2x_map_left">550px</dimen>
|
||||
<dimen name="module_v2x_map_top">200px</dimen>
|
||||
<dimen name="module_v2x_map_right">200px</dimen>
|
||||
<dimen name="module_v2x_map_bottom">100px</dimen>
|
||||
<dimen name="module_v2x_surrounding_top_height">35px</dimen>
|
||||
<dimen name="module_v2x_surrounding_top_bt_width">90px</dimen>
|
||||
<dimen name="module_v2x_surrounding_top_bt_height">36px</dimen>
|
||||
<dimen name="module_v2x_surrounding_empty_iv_margin_top">58px</dimen>
|
||||
<dimen name="module_v2x_surrounding_empty_tv_margin_top">15px</dimen>
|
||||
<dimen name="module_v2x_surrounding_empty_bt_width">150px</dimen>
|
||||
<dimen name="module_v2x_surrounding_empty_bt_height">48px</dimen>
|
||||
<dimen name="module_v2x_surrounding_empty_bt_margin_top">32px</dimen>
|
||||
<dimen name="module_v2x_surrounding_empty_bt_maigin_left">70px</dimen>
|
||||
<dimen name="module_v2x_surrounding_root_margin_left">10px</dimen>
|
||||
<dimen name="module_v2x_surrounding_margin_left">20px</dimen>
|
||||
<dimen name="module_v2x_surrounding_empty_image_height">200px</dimen>
|
||||
<dimen name="module_v2x_surrounding_item_height">173px</dimen>
|
||||
<dimen name="module_v2x_surrounding_item_image_height">130px</dimen>
|
||||
<dimen name="module_v2x_surrounding_item_bottom">43px</dimen>
|
||||
<dimen name="module_v2x_surrounding_item_bottom_image_height">26px</dimen>
|
||||
<dimen name="module_v2x_surrounding_item_marigin_left">12px</dimen>
|
||||
<dimen name="module_v2x_surrounding_item_marigin_bottom_left">8px</dimen>
|
||||
|
||||
<dimen name="module_v2x_surrounding_top_textsize">18px</dimen>
|
||||
<dimen name="module_v2x_surrounding_item_bottom_left_textsize">20px</dimen>
|
||||
<dimen name="module_v2x_surrounding_item_bottom_right_textsize">16px</dimen>
|
||||
</resources>
|
||||
|
||||
@@ -8,10 +8,14 @@ import android.view.WindowManager;
|
||||
import com.mogo.commons.AbsMogoApplication;
|
||||
import com.mogo.commons.debug.DebugConfig;
|
||||
import com.mogo.module.common.wm.WindowManagerView;
|
||||
import com.mogo.utils.CommonUtils;
|
||||
import com.mogo.utils.LaunchUtils;
|
||||
import com.mogo.utils.ResourcesHelper;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public
|
||||
/**
|
||||
* @author congtaowang
|
||||
@@ -40,6 +44,7 @@ class AutoNaviIntentHandler {
|
||||
}
|
||||
|
||||
private WindowManagerView mWindowManagerView;
|
||||
private Map< String, Object > mProperties = new HashMap<>();
|
||||
|
||||
public synchronized void release() {
|
||||
sInstance = null;
|
||||
@@ -95,6 +100,12 @@ class AutoNaviIntentHandler {
|
||||
} else {
|
||||
LaunchUtils.launchByPkg( context, "com.mogo.launcher.app" );
|
||||
}
|
||||
if ( mProperties.isEmpty() ) {
|
||||
mProperties.put( "appname", CommonUtils.getAppName( context ) );
|
||||
mProperties.put( "appversion", CommonUtils.getVersionName( context ) );
|
||||
mProperties.put( "from", 9 );
|
||||
}
|
||||
MogoWidgetManger.getInstance().getApis().getAnalyticsApi().track( "appenterfront", mProperties );
|
||||
} catch ( Exception e ) {
|
||||
Logger.e( TAG, e, "error." );
|
||||
}
|
||||
@@ -102,6 +113,7 @@ class AutoNaviIntentHandler {
|
||||
}
|
||||
try {
|
||||
mWindowManagerView.show();
|
||||
MogoWidgetManger.getInstance().getApis().getAnalyticsApi().track( "NAVI_button_show", null );
|
||||
} catch ( Exception e ) {
|
||||
Logger.e( TAG, e, "error." );
|
||||
}
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.4 KiB |
@@ -1,9 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item>
|
||||
<shape>
|
||||
<gradient android:angle="180" android:endColor="#5CC1FF" android:startColor="#256BFF" />
|
||||
<corners android:radius="@dimen/module_widgets_app_entrance_corner_size" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.4 KiB |
@@ -3,11 +3,12 @@
|
||||
android:id="@+id/module_widgets_app_entrance_root"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/module_widgets_app_entrance_bkg"
|
||||
android:background="@drawable/module_widgets_app_entrance_img_bkg"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="@dimen/module_widgets_app_entrance_size"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/module_widgets_app_entrance_size"
|
||||
android:gravity="center"
|
||||
android:text="@string/module_widgets_app_entrance_text"
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
<dimen name="module_widgets_app_entrance_textSize">20px</dimen>
|
||||
<dimen name="module_widgets_app_entrance_padding">15px</dimen>
|
||||
<dimen name="module_widgets_app_entrance_corner_size">2px</dimen>
|
||||
<dimen name="module_widgets_app_entrance_y">112px</dimen>
|
||||
<dimen name="module_widgets_app_entrance_x">929px</dimen>
|
||||
<dimen name="module_widgets_app_entrance_y">505px</dimen>
|
||||
<dimen name="module_widgets_app_entrance_x">501px</dimen>
|
||||
<dimen name="module_widgets_app_entrance_paddingTop">10px</dimen>
|
||||
<dimen name="module_widgets_app_entrance_paddingLeft">15px</dimen>
|
||||
<dimen name="module_widgets_app_entrance_size">71px</dimen>
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
<dimen name="module_widgets_app_entrance_textSize">20px</dimen>
|
||||
<dimen name="module_widgets_app_entrance_padding">15px</dimen>
|
||||
<dimen name="module_widgets_app_entrance_corner_size">2px</dimen>
|
||||
<dimen name="module_widgets_app_entrance_y">112px</dimen>
|
||||
<dimen name="module_widgets_app_entrance_x">929px</dimen>
|
||||
<dimen name="module_widgets_app_entrance_y">505px</dimen>
|
||||
<dimen name="module_widgets_app_entrance_x">501px</dimen>
|
||||
<dimen name="module_widgets_app_entrance_paddingTop">10px</dimen>
|
||||
<dimen name="module_widgets_app_entrance_paddingLeft">15px</dimen>
|
||||
<dimen name="module_widgets_app_entrance_size">71px</dimen>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<resources>
|
||||
<string name="app_name">mogo-module-service</string>
|
||||
<string name="module_widgets_app_entrance_text">辅助\n驾驶</string>
|
||||
<string name="module_widgets_app_entrance_text">切换辅助驾驶</string>
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user