Merge remote-tracking branch 'origin/dev_1.1.2' into dev_1.1.2

This commit is contained in:
董宏宇
2020-08-07 19:47:58 +08:00
16 changed files with 393 additions and 457 deletions

View File

@@ -443,8 +443,8 @@ public class DateTimeUtils {
* @param timestamp 时间戳
* @return
*/
public static String getTimeText( long timestamp) {
SimpleDateFormat format = new SimpleDateFormat(yyyy_Nian_MM_Yue_dd_Ri, Locale.US);
public static String getTimeText( long timestamp, String dateFormat) {
SimpleDateFormat format = new SimpleDateFormat(dateFormat, Locale.US);
String strStart = format.format(new Date(timestamp));
return strStart;
}

View File

@@ -4,14 +4,15 @@ import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import com.amap.api.maps.model.Text;
import com.mogo.module.common.entity.MarkerExploreWay;
import com.mogo.module.common.entity.MarkerPoiTypeEnum;
import com.mogo.module.v2x.R;
import com.mogo.module.v2x.entity.panel.SurroundingResponse;
import java.util.List;
@@ -20,13 +21,16 @@ import java.util.List;
* @description 周边
* @since 2020/7/29
*/
public class SurroundingEventAdapter extends RecyclerView.Adapter<SurroundingEventViewHolder>{
private List<SurroundingResponse.ResultBean.PoiInfosBean> mPoiInfosList;
public class SurroundingEventAdapter extends RecyclerView.Adapter<SurroundingEventViewHolder> {
private List<MarkerExploreWay> mPoiInfosList;
private Context mContext;
private TextView mAddressTv;
private ImageView mBgImageView;
private ImageView mTypeImageView;
private TextView mTypeTv;
private TextView mTotalTv;
public SurroundingEventAdapter(Context context, List<SurroundingResponse.ResultBean.PoiInfosBean> poiInfosList) {
public SurroundingEventAdapter(Context context, List<MarkerExploreWay> poiInfosList) {
mContext = context;
mPoiInfosList = poiInfosList;
}
@@ -46,12 +50,31 @@ public class SurroundingEventAdapter extends RecyclerView.Adapter<SurroundingEve
@Override
public void onBindViewHolder(@NonNull SurroundingEventViewHolder holder, int position) {
final SurroundingResponse.ResultBean.PoiInfosBean poiInfosBean = mPoiInfosList.get(position);
if (poiInfosBean == null) {
final MarkerExploreWay exploreWay = mPoiInfosList.get(position);
if (exploreWay == null) {
return;
}
// mAddressTv = holder.itemView.findViewById(R.id.tv_information);
mBgImageView = holder.itemView.findViewById(R.id.iv_event_bg);
mTypeImageView = holder.itemView.findViewById(R.id.iv_event_type);
mTypeTv = holder.itemView.findViewById(R.id.tv_poitype);
mTotalTv = holder.itemView.findViewById(R.id.tv_info_total);
mTypeTv.setText(getTypeName(exploreWay.getPoiType()));
// mTotalTv.setText(exploreWay.);
//数据绑定 TODO
// RequestOptions requestOptions = new RequestOptions()
// .placeholder(R.drawable.tanlu_normal_image)
// .error(R.drawable.tanlu_normal_image)
// .fallback(R.drawable.tanlu_normal_image);
// Glide.with(mContext)
// .load(imageUrl)
// .apply(requestOptions)
// .into(mBgImageView);
}
@Override
@@ -59,4 +82,42 @@ public class SurroundingEventAdapter extends RecyclerView.Adapter<SurroundingEve
return mPoiInfosList == null ? 0 : mPoiInfosList.size();
}
private String getTypeName(String type) {
String typeName = "";
switch (type) {
case MarkerPoiTypeEnum.TRAFFIC_CHECK:
typeName = "交通检查";
break;
case MarkerPoiTypeEnum.ROAD_CLOSED:
typeName = "封路";
break;
case MarkerPoiTypeEnum.FOURS_ROAD_WORK:
typeName = "道路施工";
break;
case MarkerPoiTypeEnum.FOURS_BLOCK_UP:
typeName = "道路拥堵";
break;
case MarkerPoiTypeEnum.FOURS_PONDING:
typeName = "道路积水";
break;
case MarkerPoiTypeEnum.FOURS_ICE:
typeName = "路面结冰";
break;
case MarkerPoiTypeEnum.FOURS_FOG:
typeName = "出现浓雾";
break;
case MarkerPoiTypeEnum.FOURS_ACCIDENT:
typeName = "交通事故";
break;
case MarkerPoiTypeEnum.FOURS_LIVING:
typeName = "实时路况";
break;
default:
typeName = "实时路况";
break;
}
return typeName;
}
}

View File

@@ -119,7 +119,7 @@ public class V2XShareEventAdapter extends RecyclerView.Adapter<RecyclerView.View
if (data != null) {
String poitype = data.getPoiType();
String address = data.getUploadAddress();
String time = DateTimeUtils.getTimeText(data.getUploadTimestamp());
String time = DateTimeUtils.getTimeText(data.getUploadTimestamp(),DateTimeUtils.M_Yue_d_Ri);
String likeNum = String.valueOf(data.getLikeNum());
String notLikeNum = String.valueOf(data.getNotLikeNum());
if (poitype != null) {

View File

@@ -0,0 +1,32 @@
package com.mogo.module.v2x.entity.panel;
import com.mogo.module.common.entity.MarkerExploreWay;
import java.io.Serializable;
import java.util.List;
/**
* @author lixiaopeng
* @description 构造数据
* @since 2020/8/7
*/
public class SurroundingConstructionData implements Serializable {
private String poiType;
private List<MarkerExploreWay> construtList;
public String getPoiType() {
return poiType;
}
public void setPoiType(String poiType) {
this.poiType = poiType;
}
public List<MarkerExploreWay> getConstrutList() {
return construtList;
}
public void setConstrutList(List<MarkerExploreWay> construtList) {
this.construtList = construtList;
}
}

View File

@@ -1,6 +1,8 @@
package com.mogo.module.v2x.entity.panel;
import com.google.gson.annotations.SerializedName;
import com.mogo.commons.data.BaseData;
import com.mogo.module.common.entity.MarkerExploreWay;
import java.util.List;
@@ -11,9 +13,8 @@ import java.util.List;
*/
public class SurroundingResponse extends BaseData {
/**
* code : 0
* msg : success
* result : {"total":1,"poiInfos":[{"coordinates":[116.410712,39.96833],"uploadTimestamp":1596003623000,"timeout":1596090023000,"uploadAddress":"","distance":0,"dbId":"738038266231427072","poiType":"10002","sn":"VN000017","userId":0,"userName":"伤心狼","userHead":"https://yycp-static-1255510688.cos.ap-beijing.myqcloud.com/defaultUserHeadImg/VN000016.jpg","likeNum":1,"uploadType":2,"uploadUser":"","imgUrl":"","content":"封路了","gasStationId":"","gasStationName":"","gasImg":"","gasPrices":"","endDate":"2020-07-30 14:20:23","fabulous":false,"direction":90,"virtualLikeNum":"","status":1,"sourceType":"10002","hitId":"Odo6mXMBEXitzfRvznNL","userType":2,"data":""}]}
* msg : null
* result : {"exploreWay":[{"infoId":"740635251747942400","type":"CARD_TYPE_ROAD_CONDITION","location":{"lon":116.370207,"lat":39.968394,"angle":180,"address":"测试直播"},"canLive":false,"fileType":1,"addr":"测试直播","generateTime":1596622804859,"cityName":"","distance":717,"userInfo":{"sn":"E841CC2018PZD20408","userId":0,"userName":"零下的雨008","userHead":"http://yycp-static-1255510688.cos.ap-beijing.myqcloud.com/sso-server-image/1592473692394.jpeg"},"items":[{"url":"http://petchfile-1255510688.cos.ap-beijing.myqcloud.com/sso-server-image/1594952448035.mp4?sign=q-sign-algorithm%3Dsha1%26q-ak%3DAKIDCWfcNwD5PXVWLxwejccR3Tiz5zhIkx0T%26q-sign-time%3D1596701407%3B1596708607%26q-key-time%3D1596701407%3B1596708607%26q-header-list%3D%26q-url-param-list%3D%26q-signature%3D465089a3c078ed60c395cb65d41f61b28e9a3397","thumbnail":"http://petchfile-1255510688.cos.ap-beijing.myqcloud.com/sso-server-image/1594952453342.jpg?sign=q-sign-algorithm%3Dsha1%26q-ak%3DAKIDCWfcNwD5PXVWLxwejccR3Tiz5zhIkx0T%26q-sign-time%3D1596701407%3B1596708607%26q-key-time%3D1596701407%3B1596708607%26q-header-list%3D%26q-url-param-list%3D%26q-signature%3D6f36b4c945197737f8576e42a5c599ed3d150a4a"}],"uploadType":"2","poiType":"10011"}]}
*/
private ResultBean result;
@@ -26,322 +27,14 @@ public class SurroundingResponse extends BaseData {
}
public static class ResultBean {
/**
* total : 1
* poiInfos : [{"coordinates":[116.410712,39.96833],"uploadTimestamp":1596003623000,"timeout":1596090023000,"uploadAddress":"","distance":0,"dbId":"738038266231427072","poiType":"10002","sn":"VN000017","userId":0,"userName":"伤心狼","userHead":"https://yycp-static-1255510688.cos.ap-beijing.myqcloud.com/defaultUserHeadImg/VN000016.jpg","likeNum":1,"uploadType":2,"uploadUser":"","imgUrl":"","content":"封路了","gasStationId":"","gasStationName":"","gasImg":"","gasPrices":"","endDate":"2020-07-30 14:20:23","fabulous":false,"direction":90,"virtualLikeNum":"","status":1,"sourceType":"10002","hitId":"Odo6mXMBEXitzfRvznNL","userType":2,"data":""}]
*/
private int total;
private List<PoiInfosBean> poiInfos;
private List<MarkerExploreWay> exploreWay;
public int getTotal() {
return total;
public List<MarkerExploreWay> getExploreWay() {
return exploreWay;
}
public void setTotal(int total) {
this.total = total;
}
public List<PoiInfosBean> getPoiInfos() {
return poiInfos;
}
public void setPoiInfos(List<PoiInfosBean> poiInfos) {
this.poiInfos = poiInfos;
}
public static class PoiInfosBean {
/**
* coordinates : [116.410712,39.96833]
* uploadTimestamp : 1596003623000
* timeout : 1596090023000
* uploadAddress :
* distance : 0
* dbId : 738038266231427072
* poiType : 10002
* sn : VN000017
* userId : 0
* userName : 伤心狼
* userHead : https://yycp-static-1255510688.cos.ap-beijing.myqcloud.com/defaultUserHeadImg/VN000016.jpg
* likeNum : 1
* uploadType : 2
* uploadUser :
* imgUrl :
* content : 封路了
* gasStationId :
* gasStationName :
* gasImg :
* gasPrices :
* endDate : 2020-07-30 14:20:23
* fabulous : false
* direction : 90
* virtualLikeNum :
* status : 1
* sourceType : 10002
* hitId : Odo6mXMBEXitzfRvznNL
* userType : 2
* data :
*/
private long uploadTimestamp;
private long timeout;
private String uploadAddress;
private int distance;
private String dbId;
private String poiType;
private String sn;
private int userId;
private String userName;
private String userHead;
private int likeNum;
private int uploadType;
private String uploadUser;
private String imgUrl;
private String content;
private String gasStationId;
private String gasStationName;
private String gasImg;
private String gasPrices;
private String endDate;
private boolean fabulous;
private int direction;
private String virtualLikeNum;
private int status;
private String sourceType;
private String hitId;
private int userType;
private String data;
private List<Double> coordinates;
public long getUploadTimestamp() {
return uploadTimestamp;
}
public void setUploadTimestamp(long uploadTimestamp) {
this.uploadTimestamp = uploadTimestamp;
}
public long getTimeout() {
return timeout;
}
public void setTimeout(long timeout) {
this.timeout = timeout;
}
public String getUploadAddress() {
return uploadAddress;
}
public void setUploadAddress(String uploadAddress) {
this.uploadAddress = uploadAddress;
}
public int getDistance() {
return distance;
}
public void setDistance(int distance) {
this.distance = distance;
}
public String getDbId() {
return dbId;
}
public void setDbId(String dbId) {
this.dbId = dbId;
}
public String getPoiType() {
return poiType;
}
public void setPoiType(String poiType) {
this.poiType = poiType;
}
public String getSn() {
return sn;
}
public void setSn(String sn) {
this.sn = sn;
}
public int getUserId() {
return userId;
}
public void setUserId(int userId) {
this.userId = userId;
}
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public String getUserHead() {
return userHead;
}
public void setUserHead(String userHead) {
this.userHead = userHead;
}
public int getLikeNum() {
return likeNum;
}
public void setLikeNum(int likeNum) {
this.likeNum = likeNum;
}
public int getUploadType() {
return uploadType;
}
public void setUploadType(int uploadType) {
this.uploadType = uploadType;
}
public String getUploadUser() {
return uploadUser;
}
public void setUploadUser(String uploadUser) {
this.uploadUser = uploadUser;
}
public String getImgUrl() {
return imgUrl;
}
public void setImgUrl(String imgUrl) {
this.imgUrl = imgUrl;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public String getGasStationId() {
return gasStationId;
}
public void setGasStationId(String gasStationId) {
this.gasStationId = gasStationId;
}
public String getGasStationName() {
return gasStationName;
}
public void setGasStationName(String gasStationName) {
this.gasStationName = gasStationName;
}
public String getGasImg() {
return gasImg;
}
public void setGasImg(String gasImg) {
this.gasImg = gasImg;
}
public String getGasPrices() {
return gasPrices;
}
public void setGasPrices(String gasPrices) {
this.gasPrices = gasPrices;
}
public String getEndDate() {
return endDate;
}
public void setEndDate(String endDate) {
this.endDate = endDate;
}
public boolean isFabulous() {
return fabulous;
}
public void setFabulous(boolean fabulous) {
this.fabulous = fabulous;
}
public int getDirection() {
return direction;
}
public void setDirection(int direction) {
this.direction = direction;
}
public String getVirtualLikeNum() {
return virtualLikeNum;
}
public void setVirtualLikeNum(String virtualLikeNum) {
this.virtualLikeNum = virtualLikeNum;
}
public int getStatus() {
return status;
}
public void setStatus(int status) {
this.status = status;
}
public String getSourceType() {
return sourceType;
}
public void setSourceType(String sourceType) {
this.sourceType = sourceType;
}
public String getHitId() {
return hitId;
}
public void setHitId(String hitId) {
this.hitId = hitId;
}
public int getUserType() {
return userType;
}
public void setUserType(int userType) {
this.userType = userType;
}
public String getData() {
return data;
}
public void setData(String data) {
this.data = data;
}
public List<Double> getCoordinates() {
return coordinates;
}
public void setCoordinates(List<Double> coordinates) {
this.coordinates = coordinates;
}
public void setExploreWay(List<MarkerExploreWay> exploreWay) {
this.exploreWay = exploreWay;
}
}
}

View File

@@ -11,31 +11,43 @@ import androidx.annotation.Nullable;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.alibaba.android.arouter.launcher.ARouter;
import com.mogo.commons.mvp.MvpFragment;
import com.mogo.map.marker.IMogoMarker;
import com.mogo.map.marker.MogoMarkersHandler;
import com.mogo.module.common.entity.MarkerExploreWay;
import com.mogo.module.common.entity.MarkerPoiTypeEnum;
import com.mogo.module.v2x.R;
import com.mogo.module.v2x.adapter.SurroundingEventAdapter;
import com.mogo.module.v2x.entity.panel.SurroundingConstructionData;
import com.mogo.module.v2x.entity.panel.SurroundingResponse;
import com.mogo.module.v2x.presenter.SurroundingEventPresenter;
import com.mogo.module.v2x.view.SurroundingEventView;
import com.mogo.service.IMogoServiceApis;
import com.mogo.service.MogoServicePaths;
import com.mogo.service.map.IMogoMapService;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import static android.view.View.OVER_SCROLL_NEVER;
/**
* 周边事件
*/
public class SurroundingEventFragment extends MvpFragment<SurroundingEventView, SurroundingEventPresenter> implements SurroundingEventView {
public class SurroundingEventFragment extends MvpFragment<SurroundingEventView, SurroundingEventPresenter> implements SurroundingEventView, View.OnClickListener {
private static final String TAG = "SurroundingFragment";
private RecyclerView mRecyclerView;
private TextView mTotalTv;
private RelativeLayout mEmptyLayout;
private TextView mShareTv;
private TextView mFreshTv;
private SurroundingEventAdapter mAdapter;
private SurroundingEventPresenter surroundingEventPresenter;
private List<SurroundingResponse.ResultBean.PoiInfosBean> poiInfosList = new ArrayList<>();
private List<MarkerExploreWay> poiInfosList = new ArrayList<>();
private IMogoServiceApis mApis;
@Override
protected int getLayoutId() {
@@ -44,19 +56,21 @@ public class SurroundingEventFragment extends MvpFragment<SurroundingEventView,
@Override
protected void initViews() {
Log.d("liyz", "initViews --------> ");
Log.d(TAG, "initViews --------> ");
mRecyclerView = findViewById(R.id.surrounding_recycleview);
mTotalTv = findViewById(R.id.tv_brief);
mEmptyLayout = findViewById(R.id.layout_empty_data_show);
mShareTv = findViewById(R.id.tv_main_share);
mFreshTv = findViewById(R.id.tv_main_refresh);
mShareTv.setOnClickListener(this);
mFreshTv.setOnClickListener(this);
mRecyclerView.setHasFixedSize(true);
mRecyclerView.setOverScrollMode(OVER_SCROLL_NEVER);
GridLayoutManager layoutManage = new GridLayoutManager(getContext(), 1);
GridLayoutManager layoutManage = new GridLayoutManager(getContext(), 2);
mRecyclerView.setLayoutManager(layoutManage);
mAdapter = new SurroundingEventAdapter(getActivity(), poiInfosList); //TODO
mAdapter = new SurroundingEventAdapter(getActivity(), poiInfosList);
mRecyclerView.setAdapter(mAdapter);
initData();
@@ -73,8 +87,25 @@ public class SurroundingEventFragment extends MvpFragment<SurroundingEventView,
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
surroundingEventPresenter = new SurroundingEventPresenter(getContext(), this);
Log.d("liyz", "onViewCreated ---------");
mApis = (IMogoServiceApis) ARouter.getInstance().build(MogoServicePaths.PATH_SERVICE_APIS).navigation(getContext());
Log.d(TAG, "onViewCreated ---------");
}
@Override
public void onClick(View v) {
int id = v.getId();
if (id == R.id.tv_main_share) {
//TODO 分享, 弹出框面板消失,出现分享弹框
V2XEventPanelFragment fragment = new V2XEventPanelFragment();
fragment.hidePanel();
if (mApis != null && mApis.getShareManager() != null) {
mApis.getShareManager().showShareDialog();
}
} else if (id == R.id.tv_main_refresh) { //刷新
initData();
}
}
/**
@@ -85,29 +116,67 @@ public class SurroundingEventFragment extends MvpFragment<SurroundingEventView,
}
/**
* 展示列表数据 TODO
* 展示列表数据
*/
@Override
public void showSurroudingData(SurroundingResponse data) {
if (data.getResult() != null) {
SurroundingResponse.ResultBean resultBean = data.getResult();
if (resultBean != null && resultBean.getPoiInfos() != null && resultBean.getPoiInfos().size() > 0) {
mRecyclerView.setVisibility(View.VISIBLE);
mEmptyLayout.setVisibility(View.GONE);
public void showSurroudingData(List<MarkerExploreWay> exploreWayList) {
Log.d(TAG, "showSurroudingData -------1--");
if (exploreWayList != null && exploreWayList.size() > 0) {
Log.d(TAG, "showSurroudingData -----2----");
//对数据进行分类
handleCategoricalData(exploreWayList);
poiInfosList.clear();
poiInfosList.addAll(resultBean.getPoiInfos());
mAdapter.notifyDataSetChanged();
} else {
mRecyclerView.setVisibility(View.GONE);
mEmptyLayout.setVisibility(View.VISIBLE);
}
//展示数据
mRecyclerView.setVisibility(View.VISIBLE);
mEmptyLayout.setVisibility(View.GONE);
poiInfosList.clear();
poiInfosList.addAll(exploreWayList);
mAdapter.notifyDataSetChanged();
//总条数
mTotalTv.setText(exploreWayList.size() + "");
} else {
Log.d(TAG, "showSurroudingData -------3---");
mRecyclerView.setVisibility(View.GONE);
mEmptyLayout.setVisibility(View.VISIBLE);
}
}
private List<SurroundingConstructionData> mConstructionList = new ArrayList<>();
//TODO
private List<SurroundingConstructionData> handleCategoricalData(List<MarkerExploreWay> list) {
List<SurroundingConstructionData> tempExploreWayList = new ArrayList<>();
Log.d(TAG, "handleCategoricalData -------1---");
for (int i = 0; i < list.size(); i++) {
MarkerExploreWay exploreWay = list.get(i);
SurroundingConstructionData constructionData = new SurroundingConstructionData();
List<MarkerExploreWay> tempConstrutList = new ArrayList<>();
if (exploreWay.getPoiType().equals(MarkerPoiTypeEnum.FOURS_LIVING)) { //实时路况
tempConstrutList.add(exploreWay);
constructionData.setPoiType(MarkerPoiTypeEnum.FOURS_LIVING);
constructionData.setConstrutList(tempConstrutList);
tempExploreWayList.add(constructionData);
} else if (exploreWay.getPoiType().equals(MarkerPoiTypeEnum.FOURS_ACCIDENT)) {
tempConstrutList.add(exploreWay);
constructionData.setPoiType(MarkerPoiTypeEnum.FOURS_ACCIDENT);
constructionData.setConstrutList(tempConstrutList);
tempExploreWayList.add(constructionData);
}
}
Log.d(TAG, "handleCategoricalData tempExploreWayList.size() = " + tempExploreWayList.size());
return tempExploreWayList;
}
@Override
public void onDestroy() {
super.onDestroy();

View File

@@ -131,7 +131,7 @@ public interface V2XApiService {
*
* */
@Headers({"Content-Type:application/json", "Accept:application/json"})
@POST("/deva/car/poi/no/queryNovelty/v1")
@POST("/deva/car/path/no/getLauncherSnapshotDataResponse/v1")
Observable<SurroundingResponse> getSurroundingEventList(@Query("sn") String sn, @Body RequestBody jsonStr);
/**

View File

@@ -78,15 +78,16 @@ public class SurroundingEventPresenter extends Presenter<SurroundingEventView> {
@Override
public void onSuccess(SurroundingResponse data) {
super.onSuccess(data);
if (data != null) {
mView.showSurroudingData(data);
Log.e("SurroundingFragment", "onSuccess ------ ");
if (data != null && data.getResult() != null) {
mView.showSurroudingData(data.getResult().getExploreWay());
}
}
@Override
public void onError(String message, int code) {
super.onError(message, code);
Log.e(TAG, "onError message = " + message + " >>> code = " + code);
Log.e("SurroundingFragment", "onError message = " + message + " >>> code = " + code);
}
});

View File

@@ -1,8 +1,11 @@
package com.mogo.module.v2x.view;
import com.mogo.commons.mvp.IView;
import com.mogo.module.common.entity.MarkerExploreWay;
import com.mogo.module.v2x.entity.panel.SurroundingResponse;
import java.util.List;
/**
* @author lixiaopeng
* @description
@@ -10,5 +13,5 @@ import com.mogo.module.v2x.entity.panel.SurroundingResponse;
*/
public interface SurroundingEventView extends IView {
void showSurroudingData(SurroundingResponse data);
void showSurroudingData(List<MarkerExploreWay> exploreWayList);
}

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:radius="24px" />
<solid android:color="@color/live_video_background_color" />
</shape>

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:radius="24px" />
<gradient
android:endColor="#256BFF"
android:startColor="#5CC1FF" />
</shape>

View File

@@ -2,37 +2,39 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:androud="http://schemas.android.com/apk/res-auto"
android:id="@+id/clPanelContainer"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/live_video_background_color">
android:layout_width="642px"
android:layout_height="532px"
android:background="@color/surrounding_card_background">
<!--顶部layout-->
<RelativeLayout
android:id="@+id/layout_top"
android:layout_width="match_parent"
android:layout_height="80dp">
android:layout_height="60dp"
android:visibility="visible">
<TextView
android:id="@+id/tv_brief"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="400px"
android:layout_centerVertical="true"
android:layout_marginLeft="20px"
android:textSize="18px"
android:text="周边5公里共有23条数据 "
android:textColor="#ffffff" />
android:textColor="@color/white" />
<TextView
android:id="@+id/tv_top_refresh"
android:layout_width="150px"
android:layout_height="50px"
android:layout_marginLeft="50px"
android:layout_toRightOf="@+id/tv_brief"
android:layout_width="90px"
android:layout_height="36px"
android:layout_alignParentRight="true"
android:layout_centerInParent="true"
android:background="@drawable/bg_v2x_event_live_show"
android:layout_marginRight="20px"
android:background="@drawable/bg_v2x_refresh"
android:gravity="center"
android:text="刷新"
android:textColor="@color/live_video_background_color"
android:textSize="12px"
android:textColor="@color/white"
android:textSize="18px"
android:textStyle="bold" />
</RelativeLayout>
@@ -58,54 +60,68 @@
android:gravity="center_horizontal"
android:visibility="gone">
<TextView
android:id="@+id/tv_main_empty_1"
android:layout_width="match_parent"
<ImageView
android:id="@+id/iv_empty"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="30px"
android:layout_marginTop="59px"
android:src="@drawable/icon_default_black_logo" />
<TextView
android:id="@+id/tv_main_empty_1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/iv_empty"
android:layout_centerHorizontal="true"
android:layout_marginTop="15px"
android:gravity="center_horizontal"
android:text="周边5公里暂无交通事件" />
android:text="周边5公里暂无交通事件"
android:textColor="@color/transparent_white_30"
android:textSize="18px"
android:textStyle="bold" />
<TextView
android:id="@+id/tv_main_empty_2"
android:layout_width="match_parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/tv_main_empty_1"
android:layout_centerHorizontal="true"
android:layout_marginTop="30px"
android:layout_marginTop="2px"
android:gravity="center_horizontal"
android:text="你可以试着分享一个事件给其他车主" />
android:text="你可以试着分享一个事件给其他车主"
android:textColor="@color/transparent_white_30"
android:textSize="18px"
android:textStyle="bold" />
<TextView
android:id="@+id/tv_main_share"
android:layout_width="150px"
android:layout_height="50px"
android:layout_height="48px"
android:layout_below="@+id/tv_main_empty_2"
android:layout_marginLeft="300px"
android:layout_marginTop="60px"
android:background="@drawable/bg_v2x_event_live_show"
android:layout_marginLeft="110px"
android:layout_marginTop="33px"
android:background="@drawable/bg_v2x_go_to_share"
android:gravity="center"
android:text="去分享"
android:textColor="@color/live_video_background_color"
android:textSize="12px"
android:textColor="@color/white"
android:textSize="18px"
android:textStyle="bold" />
<TextView
android:id="@+id/tv_main_refresh"
android:layout_width="150px"
android:layout_height="50px"
android:layout_height="48px"
android:layout_below="@+id/tv_main_empty_2"
android:layout_marginLeft="200px"
android:layout_marginTop="60px"
android:layout_toRightOf="@+id/tv_main_share"
android:background="@drawable/bg_v2x_event_live_show"
android:layout_alignParentRight="true"
android:layout_marginTop="33px"
android:layout_marginRight="110px"
android:background="@drawable/bg_v2x_refresh"
android:gravity="center"
android:text="刷新"
android:textColor="@color/live_video_background_color"
android:textSize="12px"
android:textColor="@color/white"
android:textSize="18px"
android:textStyle="bold" />
</RelativeLayout>
</RelativeLayout>

View File

@@ -1,30 +1,57 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_width="291px"
android:layout_height="173px"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:paddingLeft="5px"
android:paddingTop="5px"
android:background="@color/white"
android:layout_centerHorizontal="true"
android:gravity="center_horizontal">
<TextView
android:id="@+id/tv_main_empty_1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="30px"
android:gravity="center_horizontal"
android:textSize="40dp"
android:textColor="#ffffff"
android:text="hello" />
<com.mogo.service.imageloader.MogoImageView
android:id="@+id/ivEventImg"
android:layout_width="@dimen/module_v2x_event_image_width"
android:layout_height="@dimen/module_v2x_event_image_height"
<ImageView
android:id="@+id/iv_event_bg"
android:layout_width="291px"
android:layout_height="130px"
android:scaleType="center"
app:miv_failureHolder="@drawable/icon_default_black_logo"
app:miv_overlayImageId="@drawable/icon_default_black_logo"
app:miv_placeHolder="@drawable/icon_default_black_logo" />
android:src="@drawable/icon_default_black_logo" />
<RelativeLayout
android:layout_below="@+id/iv_event_bg"
android:background="#000000"
android:layout_width="match_parent"
android:layout_height="43px">
<ImageView
android:id="@+id/iv_event_type"
android:layout_width="22px"
android:layout_height="16px"
android:layout_marginLeft="15px"
android:layout_centerVertical="true"
android:src="@drawable/icon_default_black_logo" />
<TextView
android:id="@+id/tv_poitype"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="center_vertical"
android:layout_toRightOf="@+id/iv_event_type"
android:layout_marginLeft="8px"
android:textSize="20px"
android:textColor="@color/white"
android:text="求助" />
<TextView
android:id="@+id/tv_info_total"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:textSize="16px"
android:textColor="@color/transparent_white_30"
android:text="23条" />
</RelativeLayout>
</RelativeLayout>

View File

@@ -9,86 +9,85 @@
<TextView
android:id="@+id/share_event_guide_des"
android:layout_width="wrap_content"
android:layout_height="30dp"
android:layout_height="45dp"
android:paddingLeft="20px"
android:layout_centerHorizontal="true"
android:gravity="center"
android:text="小窍门:分享路况,点赞其他车友,有助于提高热心指数"
android:textColor="#FFFFFF"
android:textSize="16sp">
android:textSize="16px">
</TextView>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="80dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical">
<TextView
android:id="@+id/share_num"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_gravity="center"
android:gravity="center"
android:layout_height="wrap_content"
android:gravity="center_horizontal|bottom"
android:text="0"
android:textColor="#FFFFFF"
android:textSize="25sp" />
android:textSize="36px" />
<TextView
android:id="@+id/shre_num_des"
android:layout_width="match_parent"
android:layout_height="30dp"
android:layout_gravity="center"
android:gravity="center"
android:gravity="center_horizontal|top"
android:text="分享次数"
android:textColor="#FFFFFF"
android:textSize="20sp" />
android:textSize="16px" />
</LinearLayout>
<ImageView
android:layout_width="1dp"
android:layout_height="80dp"
android:layout_width="0.5px"
android:layout_height="46px"
android:background="#FFFFFF" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="80dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical">
<TextView
android:id="@+id/share_approve"
android:layout_width="match_parent"
android:layout_height="50dp"
android:gravity="center"
android:layout_height="wrap_content"
android:text="0"
android:gravity="center_horizontal|bottom"
android:textColor="#FFFFFF"
android:textSize="25sp" />
android:textSize="36px" />
<TextView
android:id="@+id/share_approve_des"
android:layout_width="match_parent"
android:layout_height="30dp"
android:gravity="center"
android:gravity="center_horizontal|top"
android:text="车友认同次数"
android:textColor="#FFFFFF"
android:textSize="20sp" />
android:textSize="16px" />
</LinearLayout>
<ImageView
android:layout_width="1dp"
android:layout_height="80dp"
android:layout_width="0.5px"
android:layout_height="46px"
android:background="#FFFFFF" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="80dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical">
@@ -97,19 +96,17 @@
style="@style/customRatingBarStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="20dp"
android:layout_gravity="center_horizontal|bottom"
android:isIndicator="true" />
<TextView
android:id="@+id/share_index_des"
android:layout_width="match_parent"
android:layout_height="30dp"
android:gravity="center"
android:paddingBottom="0dp"
android:gravity="center_horizontal|top"
android:text="热心指数"
android:textColor="#FFFFFF"
android:textSize="20sp" />
android:textSize="16px" />
</LinearLayout>
</LinearLayout>

View File

@@ -12,50 +12,67 @@
android:layout_marginLeft="20dp"
android:background="#1E90FF"
android:gravity="center"
android:paddingTop="10dp"
android:layout_marginTop="12px"
android:text="道路类型"
android:textColor="#FFFFFF"
android:textSize="15sp" />
android:textSize="14px" />
<TextView
android:id="@+id/road_case_remain"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="12px"
android:background="#1E90FF"
android:gravity="center"
android:layout_alignTop="@id/road_case_style"
android:layout_toRightOf="@id/road_case_style"
android:text="评价状态"
android:textColor="#FFFFFF"
android:textSize="14px" />
<TextView
android:id="@+id/road_case_useless_num"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerInParent="true"
android:paddingRight="20px"
android:gravity="center"
android:text="10"
android:text="100"
android:textColor="#FFFFFF"
android:textSize="15sp" />
android:textSize="18px" />
<Button
<ImageView
android:id="@+id/road_case_useless"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_width="44px"
android:layout_height="44px"
android:layout_centerInParent="true"
android:layout_toLeftOf="@id/road_case_useless_num"
android:background="@drawable/amap_bus"
android:paddingRight="5px"
android:src="@drawable/amap_bus"
android:gravity="center" />
<TextView
android:id="@+id/road_case_useful_num"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_toLeftOf="@id/road_case_useless"
android:paddingRight="26px"
android:gravity="center"
android:text="5"
android:text="100"
android:textColor="#FFFFFF"
android:textSize="15sp" />
android:textSize="18px" />
<TextView
<ImageView
android:id="@+id/road_case_uselful"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_width="44px"
android:layout_height="44px"
android:layout_centerInParent="true"
android:paddingRight="5px"
android:layout_toLeftOf="@id/road_case_useful_num"
android:background="@drawable/amap_ride" />
android:src="@drawable/amap_ride" />
<TextView
android:id="@+id/road_case_address"
@@ -69,7 +86,7 @@
android:lines="1"
android:text="东城区北三环附近维多欧美"
android:textColor="#FFFFFF"
android:textSize="20sp" />
android:textSize="18px" />
<TextView
android:id="@+id/road_case_share_time"
@@ -80,6 +97,7 @@
android:gravity="left"
android:text="时间:"
android:textColor="#FFFFFF"
android:textSize="13sp" />
android:alpha="0.5"
android:textSize="16px" />
</RelativeLayout>

View File

@@ -2,5 +2,9 @@
<resources>
<color name="live_video_progress_bar_loading_color">#256BFF</color>
<color name="live_video_background_color">#3F4057</color>
<color name="surrounding_card_background">#10121E</color>
<color name="white">#FFFFFF</color>
<color name="transparent_white_30">#4DFFFFFF</color>
</resources>