将mogo-module-event-panel代码迁移到了mogo-module-v2x
This commit is contained in:
@@ -289,7 +289,7 @@ dependencies {
|
||||
apply from: "./functions/baseservices.gradle"
|
||||
apply from: "./functions/socketpush.gradle"
|
||||
apply from: "./functions/gpssimulator.gradle"
|
||||
apply from: "./functions/eventpanel.gradle"
|
||||
//apply from: "./functions/eventpanel.gradle"
|
||||
apply from: "./functions/leftpanel.gradle"
|
||||
}
|
||||
|
||||
|
||||
@@ -29,7 +29,6 @@ import com.mogo.utils.UiThreadHandler;
|
||||
import com.mogo.utils.logger.LogLevel;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
import com.zhidao.boot.persistent.lib.PersistentManager;
|
||||
import com.zhidao.mogo.module.event.panel.EventPanelConstants;
|
||||
import com.zhidao.mogo.module.left.panel.LeftPanelConst;
|
||||
|
||||
/**
|
||||
@@ -67,11 +66,10 @@ public class MogoApplication extends AbsMogoApplication {
|
||||
MogoModulePaths.addModule( new MogoModule( TanluConstants.TAG, TanluConstants.MODEL_NAME ) );
|
||||
MogoModulePaths.addModule( new MogoModule( MogoServicePaths.PATH_SHARE, "ShareControl" ) );
|
||||
|
||||
MogoModulePaths.addModule( new MogoModule( EventPanelConstants.PATH_NAME, EventPanelConstants.MODULE_NAME ) );
|
||||
MogoModulePaths.addModule( new MogoModule( LeftPanelConst.PATH_NAME, LeftPanelConst.MODULE_NAME ) );
|
||||
|
||||
MogoModulePaths.addBaseModule( new MogoModule( ServiceConst.PATH_REFRESH_STRATEGY, ServiceConst.PATH_REFRESH_STRATEGY ) );
|
||||
MogoModulePaths.addBaseModule( new MogoModule( V2XConst.PATH_V2X_UI, V2XConst.PATH_V2X_UI ) );
|
||||
MogoModulePaths.addBaseModule( new MogoModule( V2XConst.PATH_V2X_UI, V2XConst.MODULE_NAME ) );
|
||||
MogoModulePaths.addModule( new MogoModule( PushUIConstants.PATH, PushUIConstants.NAME ) );
|
||||
MogoModulePaths.addModule(new MogoModule(MogoServicePaths.PATH_LOG_LIB, "LogLib"));
|
||||
|
||||
|
||||
@@ -11,11 +11,11 @@ public class V2XConst {
|
||||
/**
|
||||
* 类型
|
||||
*/
|
||||
public static final String MODULE_NAME = "V2X_UI";
|
||||
public static final String MODULE_NAME = "MODULE_EVENT_PANEL";
|
||||
/**
|
||||
* V2X模块地址
|
||||
*/
|
||||
public static final String PATH_V2X_UI = "/v2x/ui";
|
||||
public static final String PATH_V2X_UI = "/event/panel";
|
||||
public static final String SEEK_HELP_TIME = "seek_help_time";
|
||||
|
||||
/**
|
||||
|
||||
@@ -22,9 +22,9 @@ import com.mogo.map.uicontroller.EnumMapUI;
|
||||
import com.mogo.module.common.entity.MarkerExploreWay;
|
||||
import com.mogo.module.common.entity.MarkerShowEntity;
|
||||
import com.mogo.module.common.entity.V2XMessageEntity;
|
||||
import com.mogo.module.service.ServiceConst;
|
||||
import com.mogo.module.v2x.entity.net.V2XSeekHelpRes;
|
||||
import com.mogo.module.v2x.entity.net.V2XStrategyPushRes;
|
||||
import com.mogo.module.v2x.fragment.EventPanelFragment;
|
||||
import com.mogo.module.v2x.network.V2XRefreshCallback;
|
||||
import com.mogo.module.v2x.receiver.SceneBroadcastReceiver;
|
||||
import com.mogo.module.v2x.scenario.impl.V2XScenarioManager;
|
||||
@@ -65,7 +65,7 @@ public class V2XModuleProvider implements
|
||||
|
||||
@Override
|
||||
public Fragment createFragment(Context context, Bundle data) {
|
||||
return null;
|
||||
return EventPanelFragment.Companion.getInstance();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -76,7 +76,7 @@ public class V2XModuleProvider implements
|
||||
@NonNull
|
||||
@Override
|
||||
public String getModuleName() {
|
||||
return ServiceConst.TYPE;
|
||||
return MODULE_NAME;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -91,7 +91,7 @@ public class V2XModuleProvider implements
|
||||
|
||||
@Override
|
||||
public int getType() {
|
||||
return ModuleType.TYPE_SERVICE;
|
||||
return ModuleType.TYPE_CARD_FRAGMENT;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.mogo.module.v2x.adapter
|
||||
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.viewpager2.adapter.FragmentStateAdapter
|
||||
|
||||
/**
|
||||
* 事件面板viewpager2的adapter
|
||||
*
|
||||
* @author tongchenfei
|
||||
*/
|
||||
class EventPagerAdapter(fragment: Fragment,
|
||||
private val fragments: Array<Fragment>) :
|
||||
FragmentStateAdapter(fragment) {
|
||||
|
||||
/**
|
||||
* 目前一共就三个fragment
|
||||
*/
|
||||
override fun getItemCount(): Int = fragments.size
|
||||
|
||||
override fun createFragment(position: Int): Fragment = fragments[position]
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
package com.mogo.module.v2x.adapter;
|
||||
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.mogo.module.common.entity.V2XHistoryScenarioData;
|
||||
import com.mogo.module.common.entity.V2XWindowTypeEnum;
|
||||
import com.mogo.module.v2x.adapter.holder.ScenarioHistoryIllegalParkVH;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
* @author donghongyu
|
||||
*/
|
||||
public class ScenarioHistoryAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
|
||||
|
||||
private ArrayList<V2XHistoryScenarioData> mV2XHistoryScenarioData;
|
||||
|
||||
public ScenarioHistoryAdapter(ArrayList<V2XHistoryScenarioData> v2XHistoryScenarioData) {
|
||||
if (v2XHistoryScenarioData != null) {
|
||||
this.mV2XHistoryScenarioData = v2XHistoryScenarioData;
|
||||
}
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
RecyclerView.ViewHolder holder;
|
||||
switch (viewType) {
|
||||
// 直播
|
||||
case V2XWindowTypeEnum.LIVE_CAR_WINDOW:
|
||||
holder = new ScenarioHistoryIllegalParkVH(parent);
|
||||
break;
|
||||
default:
|
||||
holder = new ScenarioHistoryIllegalParkVH(parent);
|
||||
}
|
||||
return holder;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
|
||||
if (holder instanceof ScenarioHistoryIllegalParkVH) {
|
||||
((ScenarioHistoryIllegalParkVH) holder).initView(mV2XHistoryScenarioData.get(position));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return mV2XHistoryScenarioData == null ? 0 : mV2XHistoryScenarioData.size();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,238 @@
|
||||
package com.mogo.module.v2x.adapter;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Button;
|
||||
import android.widget.RatingBar;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.mogo.module.v2x.R;
|
||||
import com.mogo.module.v2x.entity.panel.ShareEventDescription;
|
||||
import com.mogo.module.v2x.entity.panel.ShareEventItem;
|
||||
import com.mogo.module.v2x.entity.panel.ShareEventItemEnum;
|
||||
import com.mogo.module.v2x.entity.panel.ShareEventLoadMoreItem;
|
||||
import com.mogo.module.v2x.fragment.EventPanelFragment;
|
||||
import com.mogo.module.v2x.listener.AdapterCallback;
|
||||
import com.mogo.service.IMogoServiceApis;
|
||||
import com.mogo.service.MogoServicePaths;
|
||||
import com.mogo.utils.DateTimeUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class ShareEventAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
|
||||
private Context context;
|
||||
private ArrayList dataArrayList;
|
||||
private final LayoutInflater shareLayoutInflater;
|
||||
private IMogoServiceApis mApis;
|
||||
private AdapterCallback callback;
|
||||
|
||||
public ShareEventAdapter(Context context, ArrayList dataArrayList, AdapterCallback callback) {
|
||||
this.context = context;
|
||||
this.dataArrayList = dataArrayList;
|
||||
this.callback = callback;
|
||||
shareLayoutInflater = LayoutInflater.from(context);
|
||||
mApis = (IMogoServiceApis) ARouter.getInstance().build(MogoServicePaths.PATH_SERVICE_APIS).navigation(context);
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
//根据viewType创建自定义布局
|
||||
if (viewType == ShareEventItemEnum.ITEM_TYPE_NUM_DES) {
|
||||
View v = shareLayoutInflater.inflate(R.layout.module_event_panel_share_description, parent,
|
||||
false);
|
||||
shareDescriptionViewHolder holder = new shareDescriptionViewHolder(v);
|
||||
return holder;
|
||||
} else if (viewType == ShareEventItemEnum.ITEM_TYPE_SHARE_LIST) {
|
||||
View v = shareLayoutInflater.inflate(R.layout.module_event_panel_share_item, parent,
|
||||
false);
|
||||
shareItemViewHolder holder = new shareItemViewHolder(v);
|
||||
return holder;
|
||||
} else if (viewType == ShareEventItemEnum.ITEM_TYPE_SHARE_EMPTY) {
|
||||
View v = shareLayoutInflater.inflate(R.layout.module_event_panel_share_empty, parent,
|
||||
false);
|
||||
shareEmptyViewHolder holder = new shareEmptyViewHolder(v);
|
||||
return holder;
|
||||
} else {
|
||||
View v = shareLayoutInflater.inflate(R.layout.module_event_panel_share_load_status, parent,
|
||||
false);
|
||||
shareLoadStatusViewHolder holder = new shareLoadStatusViewHolder(v);
|
||||
return holder;
|
||||
}
|
||||
}
|
||||
|
||||
private float getEnthusuasmIndex(double score) {
|
||||
if (score <= 0) {
|
||||
return 0;
|
||||
} else if (0 < score && score <= 5) {
|
||||
return (float) 0.5;
|
||||
} else if (5 < score && score <= 10) {
|
||||
return 1;
|
||||
} else if (10 < score && score <= 15) {
|
||||
return (float) 1.5;
|
||||
} else if (15 < score && score <= 20) {
|
||||
return 2;
|
||||
} else if (20 < score && score <= 25) {
|
||||
return (float) 2.5;
|
||||
} else if (25 < score && score <= 30) {
|
||||
return 3;
|
||||
} else if (30 < score && score <= 35) {
|
||||
return (float) 3.5;
|
||||
} else if (35 < score && score <= 40) {
|
||||
return 4;
|
||||
} else if (40 < score && score <= 45) {
|
||||
return (float) 4.5;
|
||||
}
|
||||
return 5;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
|
||||
|
||||
if (holder instanceof shareDescriptionViewHolder) {
|
||||
//分享次数,车友认同次数,热心指数
|
||||
if (dataArrayList.size() > position) {
|
||||
ShareEventDescription.ResultBean.EnthusiasmIndexBean data = (ShareEventDescription.ResultBean.EnthusiasmIndexBean) dataArrayList.get(position);
|
||||
if (data != null) {
|
||||
String shareNum = String.valueOf(data.getShareNum());
|
||||
String likeNum = String.valueOf(data.getLikeNum());
|
||||
double enthusiasmIndex = data.getEnthusiasmIndex();
|
||||
if (shareNum != null) {
|
||||
((shareDescriptionViewHolder) holder).shareNumTextView.setText(shareNum);
|
||||
}
|
||||
if (likeNum != null) {
|
||||
((shareDescriptionViewHolder) holder).approveNumTextView.setText(likeNum);
|
||||
}
|
||||
((shareDescriptionViewHolder) holder).ratingBar.setRating(getEnthusuasmIndex(enthusiasmIndex));
|
||||
}
|
||||
}
|
||||
} else if (holder instanceof shareItemViewHolder) {
|
||||
//分享列表
|
||||
if (dataArrayList.size() > position) {
|
||||
ShareEventItem.ResultBean.PageBean.ContentBean data = (ShareEventItem.ResultBean.PageBean.ContentBean) dataArrayList.get(position);
|
||||
if (data != null) {
|
||||
String poitype = data.getPoiType();
|
||||
String address = data.getUploadAddress();
|
||||
String time = DateTimeUtils.getTimeText(data.getUploadTimestamp());
|
||||
String likeNum = String.valueOf(data.getLikeNum());
|
||||
String notLikeNum = String.valueOf(data.getNotLikeNum());
|
||||
if (poitype != null) {
|
||||
((shareItemViewHolder) holder).caseStyleTextView.setText(poitype);
|
||||
}
|
||||
if (address != null) {
|
||||
((shareItemViewHolder) holder).caseAddressTextView.setText(address);
|
||||
}
|
||||
if (time != null) {
|
||||
((shareItemViewHolder) holder).caseTimeTextView.setText(time);
|
||||
}
|
||||
if (likeNum != null) {
|
||||
((shareItemViewHolder) holder).caseUsefulTextView.setText(likeNum);
|
||||
}
|
||||
if (notLikeNum != null) {
|
||||
((shareItemViewHolder) holder).caseUselessTextView.setText(notLikeNum);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
} else if (holder instanceof shareLoadStatusViewHolder) {
|
||||
ShareEventLoadMoreItem item = (ShareEventLoadMoreItem) dataArrayList.get(dataArrayList.size() - 1);
|
||||
((shareLoadStatusViewHolder) holder).statusButton.setText(item.getStatusText());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
int size = dataArrayList.size();
|
||||
return dataArrayList.size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemViewType(int position) {
|
||||
Object item = dataArrayList.get(position);
|
||||
if (item instanceof ShareEventDescription.ResultBean.EnthusiasmIndexBean) {
|
||||
return ShareEventItemEnum.ITEM_TYPE_NUM_DES;
|
||||
} else if (item instanceof ShareEventItem.ResultBean.PageBean.ContentBean) {
|
||||
return ShareEventItemEnum.ITEM_TYPE_SHARE_LIST;
|
||||
} else if (item instanceof ShareEventLoadMoreItem) {
|
||||
return ((ShareEventLoadMoreItem) dataArrayList.get(position)).getViewType();
|
||||
}
|
||||
return ShareEventItemEnum.ITEM_TYPE_SHARE_LIST;
|
||||
}
|
||||
|
||||
/*
|
||||
* 分享列表
|
||||
* */
|
||||
class shareItemViewHolder extends RecyclerView.ViewHolder {
|
||||
private TextView caseStyleTextView;
|
||||
private TextView caseAddressTextView;
|
||||
private TextView caseTimeTextView;
|
||||
private TextView caseUsefulTextView;
|
||||
private TextView caseUselessTextView;
|
||||
|
||||
public shareItemViewHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
caseStyleTextView = itemView.findViewById(R.id.road_case_style);
|
||||
caseAddressTextView = itemView.findViewById(R.id.road_case_address);
|
||||
caseTimeTextView = itemView.findViewById(R.id.road_case_share_time);
|
||||
caseUsefulTextView = itemView.findViewById(R.id.road_case_useful_num);
|
||||
caseUselessTextView = itemView.findViewById(R.id.road_case_useless_num);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* 分享次数,热心指数...
|
||||
* */
|
||||
class shareDescriptionViewHolder extends RecyclerView.ViewHolder {
|
||||
private TextView shareNumTextView;
|
||||
private TextView approveNumTextView;
|
||||
private RatingBar ratingBar;
|
||||
|
||||
public shareDescriptionViewHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
shareNumTextView = itemView.findViewById(R.id.share_num);
|
||||
approveNumTextView = itemView.findViewById(R.id.share_approve);
|
||||
ratingBar = itemView.findViewById(R.id.rating_bar);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* 去分享
|
||||
* */
|
||||
class shareEmptyViewHolder extends RecyclerView.ViewHolder {
|
||||
public shareEmptyViewHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
|
||||
Button shareBtn = itemView.findViewById(R.id.share_event_button);
|
||||
shareBtn.setOnClickListener(view -> {
|
||||
EventPanelFragment.Companion.getInstance().hidePanel();
|
||||
mApis.getShareManager().showShareDialog();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* 加载更多/没有更多
|
||||
* */
|
||||
class shareLoadStatusViewHolder extends RecyclerView.ViewHolder {
|
||||
private TextView statusButton;
|
||||
|
||||
public shareLoadStatusViewHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
statusButton = itemView.findViewById(R.id.event_share_load_status);
|
||||
statusButton.setOnClickListener(new View.OnClickListener() {
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
callback.loadMoreShareEventList();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
package com.mogo.module.v2x.adapter;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
/**
|
||||
* @author lixiaopeng
|
||||
* @description 周边
|
||||
* @since 2020/7/29
|
||||
*/
|
||||
public class SurroundingEventAdapter extends RecyclerView.Adapter<SurroundingEventViewHolder>{
|
||||
|
||||
//TODO 数据
|
||||
public SurroundingEventAdapter(Context context) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemViewType(int position) {
|
||||
return super.getItemViewType(position);
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public SurroundingEventViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull SurroundingEventViewHolder holder, int position) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.mogo.module.v2x.adapter;
|
||||
|
||||
import android.view.View;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
/**
|
||||
* @author lixiaopeng
|
||||
* @description
|
||||
* @since 2020/7/29
|
||||
*/
|
||||
public class SurroundingEventViewHolder extends RecyclerView.ViewHolder{
|
||||
|
||||
public SurroundingEventViewHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.mogo.module.v2x.adapter.holder;
|
||||
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.mogo.module.common.entity.V2XHistoryScenarioData;
|
||||
import com.mogo.module.v2x.R;
|
||||
|
||||
/**
|
||||
* @author donghongyu
|
||||
*/
|
||||
public class ScenarioHistoryIllegalParkVH extends V2XBaseViewHolder<V2XHistoryScenarioData> {
|
||||
public ScenarioHistoryIllegalParkVH(@NonNull ViewGroup viewGroup) {
|
||||
super(LayoutInflater.from(viewGroup.getContext())
|
||||
.inflate(R.layout.module_event_panel_share_item, viewGroup, false));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initView(V2XHistoryScenarioData viewData) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void delayedCloseWindow() {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.mogo.module.v2x.entity.panel
|
||||
|
||||
/**
|
||||
* @description
|
||||
*
|
||||
* @author lixiaopeng
|
||||
* @since 2019-10-24
|
||||
*/
|
||||
data class Center (
|
||||
val lat: Double,
|
||||
val lon: Double
|
||||
)
|
||||
@@ -0,0 +1,158 @@
|
||||
package com.mogo.module.v2x.entity.panel;
|
||||
|
||||
import com.mogo.commons.data.BaseData;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class ShareEventDescription extends BaseData implements Serializable {
|
||||
|
||||
/**
|
||||
* detailMsg :
|
||||
* result : {"enthusiasmIndex":{"id":68,"sn":"ZD802B1932L00622","score":10,"shareNum":1024,"likeNum":0,"notLikeNum":0,"enthusiasmIndex":1,"createTime":"2020-07-28T06:21:11.523+0000","updateTime":"2020-07-28T06:21:11.523+0000"}}
|
||||
*/
|
||||
|
||||
private String detailMsg;
|
||||
private ResultBean result;
|
||||
|
||||
public String getDetailMsg() {
|
||||
return detailMsg;
|
||||
}
|
||||
|
||||
public void setDetailMsg(String detailMsg) {
|
||||
this.detailMsg = detailMsg;
|
||||
}
|
||||
|
||||
public ResultBean getResult() {
|
||||
return result;
|
||||
}
|
||||
|
||||
public void setResult(ResultBean result) {
|
||||
this.result = result;
|
||||
}
|
||||
|
||||
public static class ResultBean {
|
||||
/**
|
||||
* enthusiasmIndex : {"id":68,"sn":"ZD802B1932L00622","score":10,"shareNum":1024,"likeNum":0,"notLikeNum":0,"enthusiasmIndex":1,"createTime":"2020-07-28T06:21:11.523+0000","updateTime":"2020-07-28T06:21:11.523+0000"}
|
||||
*/
|
||||
|
||||
private EnthusiasmIndexBean enthusiasmIndex;
|
||||
|
||||
public EnthusiasmIndexBean getEnthusiasmIndex() {
|
||||
return enthusiasmIndex;
|
||||
}
|
||||
|
||||
public void setEnthusiasmIndex(EnthusiasmIndexBean enthusiasmIndex) {
|
||||
this.enthusiasmIndex = enthusiasmIndex;
|
||||
}
|
||||
|
||||
public static class EnthusiasmIndexBean{
|
||||
@Override
|
||||
public String toString() {
|
||||
return "EnthusiasmIndexBean{" +
|
||||
", id=" + id +
|
||||
", sn='" + sn + '\'' +
|
||||
", score=" + score +
|
||||
", shareNum=" + shareNum +
|
||||
", likeNum=" + likeNum +
|
||||
", notLikeNum=" + notLikeNum +
|
||||
", enthusiasmIndex=" + enthusiasmIndex +
|
||||
", createTime='" + createTime + '\'' +
|
||||
", updateTime='" + updateTime + '\'' +
|
||||
'}';
|
||||
}
|
||||
|
||||
/**
|
||||
* id : 68
|
||||
* sn : ZD802B1932L00622
|
||||
* score : 10
|
||||
* shareNum : 1024
|
||||
* likeNum : 0
|
||||
* notLikeNum : 0
|
||||
* enthusiasmIndex : 1.0
|
||||
* createTime : 2020-07-28T06:21:11.523+0000
|
||||
* updateTime : 2020-07-28T06:21:11.523+0000
|
||||
*/
|
||||
private int id;
|
||||
private String sn;
|
||||
private int score;
|
||||
private int shareNum;
|
||||
private int likeNum;
|
||||
private int notLikeNum;
|
||||
private double enthusiasmIndex;
|
||||
private String createTime;
|
||||
private String updateTime;
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getSn() {
|
||||
return sn;
|
||||
}
|
||||
|
||||
public void setSn(String sn) {
|
||||
this.sn = sn;
|
||||
}
|
||||
|
||||
public int getScore() {
|
||||
return score;
|
||||
}
|
||||
|
||||
public void setScore(int score) {
|
||||
this.score = score;
|
||||
}
|
||||
|
||||
public int getShareNum() {
|
||||
return shareNum;
|
||||
}
|
||||
|
||||
public void setShareNum(int shareNum) {
|
||||
this.shareNum = shareNum;
|
||||
}
|
||||
|
||||
public int getLikeNum() {
|
||||
return likeNum;
|
||||
}
|
||||
|
||||
public void setLikeNum(int likeNum) {
|
||||
this.likeNum = likeNum;
|
||||
}
|
||||
|
||||
public int getNotLikeNum() {
|
||||
return notLikeNum;
|
||||
}
|
||||
|
||||
public void setNotLikeNum(int notLikeNum) {
|
||||
this.notLikeNum = notLikeNum;
|
||||
}
|
||||
|
||||
public double getEnthusiasmIndex() {
|
||||
return enthusiasmIndex;
|
||||
}
|
||||
|
||||
public void setEnthusiasmIndex(double enthusiasmIndex) {
|
||||
this.enthusiasmIndex = enthusiasmIndex;
|
||||
}
|
||||
|
||||
public String getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(String createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public String getUpdateTime() {
|
||||
return updateTime;
|
||||
}
|
||||
|
||||
public void setUpdateTime(String updateTime) {
|
||||
this.updateTime = updateTime;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,488 @@
|
||||
package com.mogo.module.v2x.entity.panel;
|
||||
|
||||
import com.mogo.commons.data.BaseData;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public class ShareEventItem extends BaseData implements Serializable {
|
||||
|
||||
|
||||
/**
|
||||
* detailMsg :
|
||||
* result : {"page":{"total":1024,"pageSize":1,"pageNum":4,"content":[{"coordinates":[116.407653,39.966487],"uploadTimestamp":1592901273966,"timeout":1593100800000,"uploadAddress":"安定门外大街","distance":0,"dbId":"725026095564550144","poiType":"10002","sn":"ZD802B1932L00622","userId":0,"userName":"小松鼠艾德蒙","userHead":"http://yycp-static-1255510688.cos.ap-beijing.myqcloud.com/sso-server-image/1592476328925.png","likeNum":18,"notLikeNum":0,"uploadType":2,"uploadUser":"123","imgUrl":null,"content":null,"gasStationId":null,"gasStationName":null,"gasImg":null,"gasPrices":null,"endDate":"2020-06-26 00:00:00","fabulous":false,"direction":180,"virtualLikeNum":822,"status":1,"sourceType":"10002","hitId":"0K-mf3MBeovPWpwE9IfR","userType":2,"data":[{"url":"http://petchfile-1255510688.cos.ap-beijing.myqcloud.com/sso-server-image/1592546939076.mp4%3Fsign%3Dq-sign-algorithm%253Dsha1%2526q-ak%253DAKIDCWfcNwD5PXVWLxwejccR3Tiz5zhIkx0T%2526q-sign-time%253D1592546939%253B1592550539%2526q-key-time%253D1592546939%253B1592550539%2526q-header-list%253D%2526q-url-param-list%253D%2526q-signature%253D74a4058ad7579ea210dafcf78d7a19460cffb899?sign=q-sign-algorithm%3Dsha1%26q-ak%3DAKIDCWfcNwD5PXVWLxwejccR3Tiz5zhIkx0T%26q-sign-time%3D1595574735%3B1595578335%26q-key-time%3D1595574735%3B1595578335%26q-header-list%3D%26q-url-param-list%3D%26q-signature%3D679bff1838c7d497d38f48ef999b50e80c5856c4","thumbnail":"http://petchfile-1255510688.cos.ap-beijing.myqcloud.com/sso-server-image/1592546956790.png%3Fsign%3Dq-sign-algorithm%253Dsha1%2526q-ak%253DAKIDCWfcNwD5PXVWLxwejccR3Tiz5zhIkx0T%2526q-sign-time%253D1592546956%253B1592550556%2526q-key-time%253D1592546956%253B1592550556%2526q-header-list%253D%2526q-url-param-list%253D%2526q-signature%253Dcc9a35349fc55e433f934af88df576ae792b3987?sign=q-sign-algorithm%3Dsha1%26q-ak%3DAKIDCWfcNwD5PXVWLxwejccR3Tiz5zhIkx0T%26q-sign-time%3D1595574735%3B1595578335%26q-key-time%3D1595574735%3B1595578335%26q-header-list%3D%26q-url-param-list%3D%26q-signature%3D99b5a92a4f97909d8c217dbeec2ec6e9ec1052f4","content":null,"illegalCount":null}]}]}}
|
||||
*/
|
||||
|
||||
private String detailMsg;
|
||||
private ResultBean result;
|
||||
|
||||
public String getDetailMsg() {
|
||||
return detailMsg;
|
||||
}
|
||||
|
||||
public void setDetailMsg(String detailMsg) {
|
||||
this.detailMsg = detailMsg;
|
||||
}
|
||||
|
||||
public ResultBean getResult() {
|
||||
return result;
|
||||
}
|
||||
|
||||
public void setResult(ResultBean result) {
|
||||
this.result = result;
|
||||
}
|
||||
|
||||
public static class ResultBean {
|
||||
/**
|
||||
* page : {"total":1024,"pageSize":1,"pageNum":4,"content":[{"coordinates":[116.407653,39.966487],"uploadTimestamp":1592901273966,"timeout":1593100800000,"uploadAddress":"安定门外大街","distance":0,"dbId":"725026095564550144","poiType":"10002","sn":"ZD802B1932L00622","userId":0,"userName":"小松鼠艾德蒙","userHead":"http://yycp-static-1255510688.cos.ap-beijing.myqcloud.com/sso-server-image/1592476328925.png","likeNum":18,"notLikeNum":0,"uploadType":2,"uploadUser":"123","imgUrl":null,"content":null,"gasStationId":null,"gasStationName":null,"gasImg":null,"gasPrices":null,"endDate":"2020-06-26 00:00:00","fabulous":false,"direction":180,"virtualLikeNum":822,"status":1,"sourceType":"10002","hitId":"0K-mf3MBeovPWpwE9IfR","userType":2,"data":[{"url":"http://petchfile-1255510688.cos.ap-beijing.myqcloud.com/sso-server-image/1592546939076.mp4%3Fsign%3Dq-sign-algorithm%253Dsha1%2526q-ak%253DAKIDCWfcNwD5PXVWLxwejccR3Tiz5zhIkx0T%2526q-sign-time%253D1592546939%253B1592550539%2526q-key-time%253D1592546939%253B1592550539%2526q-header-list%253D%2526q-url-param-list%253D%2526q-signature%253D74a4058ad7579ea210dafcf78d7a19460cffb899?sign=q-sign-algorithm%3Dsha1%26q-ak%3DAKIDCWfcNwD5PXVWLxwejccR3Tiz5zhIkx0T%26q-sign-time%3D1595574735%3B1595578335%26q-key-time%3D1595574735%3B1595578335%26q-header-list%3D%26q-url-param-list%3D%26q-signature%3D679bff1838c7d497d38f48ef999b50e80c5856c4","thumbnail":"http://petchfile-1255510688.cos.ap-beijing.myqcloud.com/sso-server-image/1592546956790.png%3Fsign%3Dq-sign-algorithm%253Dsha1%2526q-ak%253DAKIDCWfcNwD5PXVWLxwejccR3Tiz5zhIkx0T%2526q-sign-time%253D1592546956%253B1592550556%2526q-key-time%253D1592546956%253B1592550556%2526q-header-list%253D%2526q-url-param-list%253D%2526q-signature%253Dcc9a35349fc55e433f934af88df576ae792b3987?sign=q-sign-algorithm%3Dsha1%26q-ak%3DAKIDCWfcNwD5PXVWLxwejccR3Tiz5zhIkx0T%26q-sign-time%3D1595574735%3B1595578335%26q-key-time%3D1595574735%3B1595578335%26q-header-list%3D%26q-url-param-list%3D%26q-signature%3D99b5a92a4f97909d8c217dbeec2ec6e9ec1052f4","content":null,"illegalCount":null}]}]}
|
||||
*/
|
||||
|
||||
private PageBean page;
|
||||
|
||||
public PageBean getPage() {
|
||||
return page;
|
||||
}
|
||||
|
||||
public void setPage(PageBean page) {
|
||||
this.page = page;
|
||||
}
|
||||
|
||||
public static class PageBean {
|
||||
/**
|
||||
* total : 1024
|
||||
* pageSize : 1
|
||||
* pageNum : 4
|
||||
* content : [{"coordinates":[116.407653,39.966487],"uploadTimestamp":1592901273966,"timeout":1593100800000,"uploadAddress":"安定门外大街","distance":0,"dbId":"725026095564550144","poiType":"10002","sn":"ZD802B1932L00622","userId":0,"userName":"小松鼠艾德蒙","userHead":"http://yycp-static-1255510688.cos.ap-beijing.myqcloud.com/sso-server-image/1592476328925.png","likeNum":18,"notLikeNum":0,"uploadType":2,"uploadUser":"123","imgUrl":null,"content":null,"gasStationId":null,"gasStationName":null,"gasImg":null,"gasPrices":null,"endDate":"2020-06-26 00:00:00","fabulous":false,"direction":180,"virtualLikeNum":822,"status":1,"sourceType":"10002","hitId":"0K-mf3MBeovPWpwE9IfR","userType":2,"data":[{"url":"http://petchfile-1255510688.cos.ap-beijing.myqcloud.com/sso-server-image/1592546939076.mp4%3Fsign%3Dq-sign-algorithm%253Dsha1%2526q-ak%253DAKIDCWfcNwD5PXVWLxwejccR3Tiz5zhIkx0T%2526q-sign-time%253D1592546939%253B1592550539%2526q-key-time%253D1592546939%253B1592550539%2526q-header-list%253D%2526q-url-param-list%253D%2526q-signature%253D74a4058ad7579ea210dafcf78d7a19460cffb899?sign=q-sign-algorithm%3Dsha1%26q-ak%3DAKIDCWfcNwD5PXVWLxwejccR3Tiz5zhIkx0T%26q-sign-time%3D1595574735%3B1595578335%26q-key-time%3D1595574735%3B1595578335%26q-header-list%3D%26q-url-param-list%3D%26q-signature%3D679bff1838c7d497d38f48ef999b50e80c5856c4","thumbnail":"http://petchfile-1255510688.cos.ap-beijing.myqcloud.com/sso-server-image/1592546956790.png%3Fsign%3Dq-sign-algorithm%253Dsha1%2526q-ak%253DAKIDCWfcNwD5PXVWLxwejccR3Tiz5zhIkx0T%2526q-sign-time%253D1592546956%253B1592550556%2526q-key-time%253D1592546956%253B1592550556%2526q-header-list%253D%2526q-url-param-list%253D%2526q-signature%253Dcc9a35349fc55e433f934af88df576ae792b3987?sign=q-sign-algorithm%3Dsha1%26q-ak%3DAKIDCWfcNwD5PXVWLxwejccR3Tiz5zhIkx0T%26q-sign-time%3D1595574735%3B1595578335%26q-key-time%3D1595574735%3B1595578335%26q-header-list%3D%26q-url-param-list%3D%26q-signature%3D99b5a92a4f97909d8c217dbeec2ec6e9ec1052f4","content":null,"illegalCount":null}]}]
|
||||
*/
|
||||
|
||||
private int total;
|
||||
private int pageSize;
|
||||
private int pageNum;
|
||||
private List<ContentBean> content;
|
||||
|
||||
public int getTotal() {
|
||||
return total;
|
||||
}
|
||||
|
||||
public void setTotal(int total) {
|
||||
this.total = total;
|
||||
}
|
||||
|
||||
public int getPageSize() {
|
||||
return pageSize;
|
||||
}
|
||||
|
||||
public void setPageSize(int pageSize) {
|
||||
this.pageSize = pageSize;
|
||||
}
|
||||
|
||||
public int getPageNum() {
|
||||
return pageNum;
|
||||
}
|
||||
|
||||
public void setPageNum(int pageNum) {
|
||||
this.pageNum = pageNum;
|
||||
}
|
||||
|
||||
public List<ContentBean> getContent() {
|
||||
return content;
|
||||
}
|
||||
|
||||
public void setContent(List<ContentBean> content) {
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
public static class ContentBean {
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ContentBean{" +
|
||||
"viewType=" + viewType +
|
||||
", uploadTimestamp=" + uploadTimestamp +
|
||||
", timeout=" + timeout +
|
||||
", uploadAddress='" + uploadAddress + '\'' +
|
||||
", distance=" + distance +
|
||||
", dbId='" + dbId + '\'' +
|
||||
", poiType='" + poiType + '\'' +
|
||||
", sn='" + sn + '\'' +
|
||||
", userId=" + userId +
|
||||
", userName='" + userName + '\'' +
|
||||
", userHead='" + userHead + '\'' +
|
||||
", likeNum=" + likeNum +
|
||||
", notLikeNum=" + notLikeNum +
|
||||
", uploadType=" + uploadType +
|
||||
", uploadUser='" + uploadUser + '\'' +
|
||||
", imgUrl=" + imgUrl +
|
||||
", content=" + content +
|
||||
", gasStationId=" + gasStationId +
|
||||
", gasStationName=" + gasStationName +
|
||||
", gasImg=" + gasImg +
|
||||
", gasPrices=" + gasPrices +
|
||||
", endDate='" + endDate + '\'' +
|
||||
", fabulous=" + fabulous +
|
||||
", direction=" + direction +
|
||||
", virtualLikeNum=" + virtualLikeNum +
|
||||
", status=" + status +
|
||||
", sourceType='" + sourceType + '\'' +
|
||||
", hitId='" + hitId + '\'' +
|
||||
", userType=" + userType +
|
||||
", coordinates=" + coordinates +
|
||||
", data=" + data +
|
||||
'}';
|
||||
}
|
||||
|
||||
/**
|
||||
* coordinates : [116.407653,39.966487]
|
||||
* uploadTimestamp : 1592901273966
|
||||
* timeout : 1593100800000
|
||||
* uploadAddress : 安定门外大街
|
||||
* distance : 0
|
||||
* dbId : 725026095564550144
|
||||
* poiType : 10002
|
||||
* sn : ZD802B1932L00622
|
||||
* userId : 0
|
||||
* userName : 小松鼠艾德蒙
|
||||
* userHead : http://yycp-static-1255510688.cos.ap-beijing.myqcloud.com/sso-server-image/1592476328925.png
|
||||
* likeNum : 18
|
||||
* notLikeNum : 0
|
||||
* uploadType : 2
|
||||
* uploadUser : 123
|
||||
* imgUrl : null
|
||||
* content : null
|
||||
* gasStationId : null
|
||||
* gasStationName : null
|
||||
* gasImg : null
|
||||
* gasPrices : null
|
||||
* endDate : 2020-06-26 00:00:00
|
||||
* fabulous : false
|
||||
* direction : 180
|
||||
* virtualLikeNum : 822
|
||||
* status : 1
|
||||
* sourceType : 10002
|
||||
* hitId : 0K-mf3MBeovPWpwE9IfR
|
||||
* userType : 2
|
||||
* data : [{"url":"http://petchfile-1255510688.cos.ap-beijing.myqcloud.com/sso-server-image/1592546939076.mp4%3Fsign%3Dq-sign-algorithm%253Dsha1%2526q-ak%253DAKIDCWfcNwD5PXVWLxwejccR3Tiz5zhIkx0T%2526q-sign-time%253D1592546939%253B1592550539%2526q-key-time%253D1592546939%253B1592550539%2526q-header-list%253D%2526q-url-param-list%253D%2526q-signature%253D74a4058ad7579ea210dafcf78d7a19460cffb899?sign=q-sign-algorithm%3Dsha1%26q-ak%3DAKIDCWfcNwD5PXVWLxwejccR3Tiz5zhIkx0T%26q-sign-time%3D1595574735%3B1595578335%26q-key-time%3D1595574735%3B1595578335%26q-header-list%3D%26q-url-param-list%3D%26q-signature%3D679bff1838c7d497d38f48ef999b50e80c5856c4","thumbnail":"http://petchfile-1255510688.cos.ap-beijing.myqcloud.com/sso-server-image/1592546956790.png%3Fsign%3Dq-sign-algorithm%253Dsha1%2526q-ak%253DAKIDCWfcNwD5PXVWLxwejccR3Tiz5zhIkx0T%2526q-sign-time%253D1592546956%253B1592550556%2526q-key-time%253D1592546956%253B1592550556%2526q-header-list%253D%2526q-url-param-list%253D%2526q-signature%253Dcc9a35349fc55e433f934af88df576ae792b3987?sign=q-sign-algorithm%3Dsha1%26q-ak%3DAKIDCWfcNwD5PXVWLxwejccR3Tiz5zhIkx0T%26q-sign-time%3D1595574735%3B1595578335%26q-key-time%3D1595574735%3B1595578335%26q-header-list%3D%26q-url-param-list%3D%26q-signature%3D99b5a92a4f97909d8c217dbeec2ec6e9ec1052f4","content":null,"illegalCount":null}]
|
||||
*/
|
||||
|
||||
private int viewType = ShareEventItemEnum.ITEM_TYPE_SHARE_LIST;
|
||||
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 notLikeNum;
|
||||
private int uploadType;
|
||||
private String uploadUser;
|
||||
private Object imgUrl;
|
||||
private Object content;
|
||||
private Object gasStationId;
|
||||
private Object gasStationName;
|
||||
private Object gasImg;
|
||||
private Object gasPrices;
|
||||
private String endDate;
|
||||
private boolean fabulous;
|
||||
private int direction;
|
||||
private int virtualLikeNum;
|
||||
private int status;
|
||||
private String sourceType;
|
||||
private String hitId;
|
||||
private int userType;
|
||||
private List<Double> coordinates;
|
||||
private List<DataBean> data;
|
||||
|
||||
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 getNotLikeNum() {
|
||||
return notLikeNum;
|
||||
}
|
||||
|
||||
public void setNotLikeNum(int notLikeNum) {
|
||||
this.notLikeNum = notLikeNum;
|
||||
}
|
||||
|
||||
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 Object getImgUrl() {
|
||||
return imgUrl;
|
||||
}
|
||||
|
||||
public void setImgUrl(Object imgUrl) {
|
||||
this.imgUrl = imgUrl;
|
||||
}
|
||||
|
||||
public Object getContent() {
|
||||
return content;
|
||||
}
|
||||
|
||||
public void setContent(Object content) {
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
public Object getGasStationId() {
|
||||
return gasStationId;
|
||||
}
|
||||
|
||||
public void setGasStationId(Object gasStationId) {
|
||||
this.gasStationId = gasStationId;
|
||||
}
|
||||
|
||||
public Object getGasStationName() {
|
||||
return gasStationName;
|
||||
}
|
||||
|
||||
public void setGasStationName(Object gasStationName) {
|
||||
this.gasStationName = gasStationName;
|
||||
}
|
||||
|
||||
public Object getGasImg() {
|
||||
return gasImg;
|
||||
}
|
||||
|
||||
public void setGasImg(Object gasImg) {
|
||||
this.gasImg = gasImg;
|
||||
}
|
||||
|
||||
public Object getGasPrices() {
|
||||
return gasPrices;
|
||||
}
|
||||
|
||||
public void setGasPrices(Object 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 int getVirtualLikeNum() {
|
||||
return virtualLikeNum;
|
||||
}
|
||||
|
||||
public void setVirtualLikeNum(int 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 List<Double> getCoordinates() {
|
||||
return coordinates;
|
||||
}
|
||||
|
||||
public void setCoordinates(List<Double> coordinates) {
|
||||
this.coordinates = coordinates;
|
||||
}
|
||||
|
||||
public List<DataBean> getData() {
|
||||
return data;
|
||||
}
|
||||
|
||||
public void setData(List<DataBean> data) {
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
public static class DataBean {
|
||||
/**
|
||||
* url : http://petchfile-1255510688.cos.ap-beijing.myqcloud.com/sso-server-image/1592546939076.mp4%3Fsign%3Dq-sign-algorithm%253Dsha1%2526q-ak%253DAKIDCWfcNwD5PXVWLxwejccR3Tiz5zhIkx0T%2526q-sign-time%253D1592546939%253B1592550539%2526q-key-time%253D1592546939%253B1592550539%2526q-header-list%253D%2526q-url-param-list%253D%2526q-signature%253D74a4058ad7579ea210dafcf78d7a19460cffb899?sign=q-sign-algorithm%3Dsha1%26q-ak%3DAKIDCWfcNwD5PXVWLxwejccR3Tiz5zhIkx0T%26q-sign-time%3D1595574735%3B1595578335%26q-key-time%3D1595574735%3B1595578335%26q-header-list%3D%26q-url-param-list%3D%26q-signature%3D679bff1838c7d497d38f48ef999b50e80c5856c4
|
||||
* thumbnail : http://petchfile-1255510688.cos.ap-beijing.myqcloud.com/sso-server-image/1592546956790.png%3Fsign%3Dq-sign-algorithm%253Dsha1%2526q-ak%253DAKIDCWfcNwD5PXVWLxwejccR3Tiz5zhIkx0T%2526q-sign-time%253D1592546956%253B1592550556%2526q-key-time%253D1592546956%253B1592550556%2526q-header-list%253D%2526q-url-param-list%253D%2526q-signature%253Dcc9a35349fc55e433f934af88df576ae792b3987?sign=q-sign-algorithm%3Dsha1%26q-ak%3DAKIDCWfcNwD5PXVWLxwejccR3Tiz5zhIkx0T%26q-sign-time%3D1595574735%3B1595578335%26q-key-time%3D1595574735%3B1595578335%26q-header-list%3D%26q-url-param-list%3D%26q-signature%3D99b5a92a4f97909d8c217dbeec2ec6e9ec1052f4
|
||||
* content : null
|
||||
* illegalCount : null
|
||||
*/
|
||||
|
||||
private String url;
|
||||
private String thumbnail;
|
||||
private Object content;
|
||||
private Object illegalCount;
|
||||
|
||||
public String getUrl() {
|
||||
return url;
|
||||
}
|
||||
|
||||
public void setUrl(String url) {
|
||||
this.url = url;
|
||||
}
|
||||
|
||||
public String getThumbnail() {
|
||||
return thumbnail;
|
||||
}
|
||||
|
||||
public void setThumbnail(String thumbnail) {
|
||||
this.thumbnail = thumbnail;
|
||||
}
|
||||
|
||||
public Object getContent() {
|
||||
return content;
|
||||
}
|
||||
|
||||
public void setContent(Object content) {
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
public Object getIllegalCount() {
|
||||
return illegalCount;
|
||||
}
|
||||
|
||||
public void setIllegalCount(Object illegalCount) {
|
||||
this.illegalCount = illegalCount;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.mogo.module.v2x.entity.panel;
|
||||
|
||||
public interface ShareEventItemEnum {
|
||||
|
||||
int ITEM_TYPE_NUM_DES = 0;
|
||||
int ITEM_TYPE_SHARE_LIST = 1;
|
||||
int ITEM_TYPE_SHARE_EMPTY = 2;
|
||||
int ITEM_TYPE_LOAD_MORE_STATUS = 3;
|
||||
int ITEM_TYPE_NO_MORE = 4;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.mogo.module.v2x.entity.panel;
|
||||
|
||||
import com.mogo.commons.data.BaseData;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/*
|
||||
* 没有任何分享,去分享/加载更多/没有更多了
|
||||
* */
|
||||
public class ShareEventLoadMoreItem extends BaseData implements Serializable {
|
||||
private String statusText;
|
||||
private int viewType;
|
||||
|
||||
public int getViewType() {
|
||||
return viewType;
|
||||
}
|
||||
|
||||
public void setViewType(int viewType) {
|
||||
this.viewType = viewType;
|
||||
}
|
||||
|
||||
public void setStatusText(String statusText) {
|
||||
this.statusText = statusText;
|
||||
}
|
||||
|
||||
public String getStatusText() {
|
||||
return statusText;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.mogo.module.v2x.entity.panel;
|
||||
|
||||
|
||||
/**
|
||||
* @author lixiaopeng
|
||||
* @description
|
||||
* @since 2020/7/29
|
||||
*/
|
||||
public class SurroundingRequest {
|
||||
private Center center;
|
||||
private String[] poiTypes;
|
||||
private int radius;
|
||||
private int limit;
|
||||
|
||||
public SurroundingRequest(Center center, String[] poiTypes, int radius, int limit) {
|
||||
this.center = center;
|
||||
this.poiTypes = poiTypes;
|
||||
this.radius = radius;
|
||||
this.limit = limit;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,347 @@
|
||||
package com.mogo.module.v2x.entity.panel;
|
||||
|
||||
import com.mogo.commons.data.BaseData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author lixiaopeng
|
||||
* @description
|
||||
* @since 2020/7/29
|
||||
*/
|
||||
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":""}]}
|
||||
*/
|
||||
private ResultBean result;
|
||||
|
||||
public ResultBean getResult() {
|
||||
return result;
|
||||
}
|
||||
|
||||
public void setResult(ResultBean result) {
|
||||
this.result = result;
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
public int getTotal() {
|
||||
return total;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,140 @@
|
||||
package com.mogo.module.v2x.fragment
|
||||
|
||||
import android.content.res.ColorStateList
|
||||
import android.graphics.Typeface
|
||||
import android.view.Gravity
|
||||
import android.view.View
|
||||
import android.widget.TextView
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.viewpager2.widget.ViewPager2
|
||||
import androidx.viewpager2.widget.ViewPager2.OnPageChangeCallback
|
||||
import com.google.android.material.tabs.TabLayoutMediator
|
||||
import com.google.android.material.tabs.TabLayoutMediator.TabConfigurationStrategy
|
||||
import com.mogo.commons.mvp.MvpFragment
|
||||
import com.mogo.module.v2x.R
|
||||
import com.mogo.module.v2x.V2XConst.MODULE_NAME
|
||||
import com.mogo.module.v2x.adapter.EventPagerAdapter
|
||||
import com.mogo.module.v2x.presenter.EventPanelPresenter
|
||||
import com.mogo.utils.logger.Logger
|
||||
import kotlinx.android.synthetic.main.module_event_panel_fragment_event_panel.*
|
||||
|
||||
|
||||
/**
|
||||
* 事件面板主fragment
|
||||
*
|
||||
* @author tongchenfei
|
||||
*/
|
||||
class EventPanelFragment : MvpFragment<EventPanelFragment, EventPanelPresenter>() {
|
||||
|
||||
|
||||
private val tabsTitle = arrayOf("出行动态", "周边事件", "我的分享")
|
||||
private var fragments: Array<Fragment>? = null
|
||||
|
||||
private var mediator: TabLayoutMediator? = null
|
||||
|
||||
private val activeColor: Int = android.graphics.Color.parseColor("#ff678f")
|
||||
private val normalColor: Int = android.graphics.Color.parseColor("#EE00FF")
|
||||
|
||||
private val activeSize = 40
|
||||
private val normalSize = 30
|
||||
|
||||
private var selectPosition = 0
|
||||
|
||||
companion object {
|
||||
private val fragment = EventPanelFragment()
|
||||
fun getInstance(): EventPanelFragment {
|
||||
return fragment
|
||||
}
|
||||
}
|
||||
|
||||
override fun getLayoutId(): Int {
|
||||
return R.layout.module_event_panel_fragment_event_panel
|
||||
}
|
||||
|
||||
override fun initViews() {
|
||||
Logger.d(MODULE_NAME, "EventPanelFragment init view===")
|
||||
fragments = arrayOf(
|
||||
ScenarioHistoryFragment(),
|
||||
SurroundingEventFragment(),
|
||||
ShareEventsFragment()
|
||||
)
|
||||
//禁用预加载
|
||||
vpEventPanel.offscreenPageLimit = ViewPager2.OFFSCREEN_PAGE_LIMIT_DEFAULT
|
||||
vpEventPanel.adapter = EventPagerAdapter(this, fragments!!)
|
||||
//viewPager 页面切换监听
|
||||
vpEventPanel.registerOnPageChangeCallback(changeCallback)
|
||||
|
||||
//这里可以自定义TabView
|
||||
mediator = TabLayoutMediator(tabLayout, vpEventPanel, TabConfigurationStrategy { tab, position ->
|
||||
val tabView = TextView(context)
|
||||
tabView.gravity = Gravity.CENTER
|
||||
val states = arrayOfNulls<IntArray>(2)
|
||||
states[0] = intArrayOf(android.R.attr.state_selected)
|
||||
states[1] = intArrayOf()
|
||||
val colors = intArrayOf(activeColor, normalColor)
|
||||
val colorStateList = ColorStateList(states, colors)
|
||||
tabView.text = tabsTitle[position]
|
||||
tabView.textSize = normalSize.toFloat()
|
||||
tabView.setTextColor(colorStateList)
|
||||
tab.customView = tabView
|
||||
})
|
||||
//要执行这一句才是真正将两者绑定起来
|
||||
mediator!!.attach()
|
||||
|
||||
btnShowOrHidePanels.setOnClickListener {
|
||||
if (clPanelContainer.visibility == View.GONE) {
|
||||
showPanel()
|
||||
// 选中指定的Tab
|
||||
tabLayout.getTabAt(selectPosition)?.select()
|
||||
vpEventPanel.setCurrentItem(selectPosition, false)
|
||||
} else {
|
||||
hidePanel()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private val changeCallback: OnPageChangeCallback = object : OnPageChangeCallback() {
|
||||
override fun onPageSelected(position: Int) {
|
||||
selectPosition = position
|
||||
//可以来设置选中时tab的大小
|
||||
val tabCount = tabLayout.tabCount
|
||||
for (i in 0 until tabCount) {
|
||||
val tab = tabLayout.getTabAt(i)
|
||||
val tabView = tab!!.customView as TextView?
|
||||
if (tab.position == position) {
|
||||
tabView!!.textSize = activeSize.toFloat()
|
||||
tabView.typeface = Typeface.DEFAULT_BOLD
|
||||
} else {
|
||||
tabView!!.textSize = normalSize.toFloat()
|
||||
tabView.typeface = Typeface.DEFAULT
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onDestroyView() {
|
||||
mediator?.detach()
|
||||
vpEventPanel?.unregisterOnPageChangeCallback(changeCallback)
|
||||
super.onDestroyView()
|
||||
}
|
||||
|
||||
override fun createPresenter(): EventPanelPresenter {
|
||||
return EventPanelPresenter(this)
|
||||
}
|
||||
|
||||
fun showPanel() {
|
||||
Logger.d(MODULE_NAME, "in fragment show panel")
|
||||
clPanelContainer.visibility = View.VISIBLE
|
||||
btnShowOrHidePanels.text = "隐藏面板"
|
||||
}
|
||||
|
||||
fun hidePanel() {
|
||||
Logger.d(MODULE_NAME, "in fragment hide panel")
|
||||
clPanelContainer.visibility = View.GONE
|
||||
btnShowOrHidePanels.text = "显示面板"
|
||||
}
|
||||
|
||||
fun isPanelShow(): Boolean {
|
||||
return clPanelContainer.visibility == View.VISIBLE
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.mogo.module.v2x.fragment
|
||||
|
||||
import com.mogo.commons.mvp.MvpFragment
|
||||
import com.mogo.module.v2x.R
|
||||
import com.mogo.module.v2x.presenter.MySharePresenter
|
||||
|
||||
class MyShareFragment : MvpFragment<MyShareFragment, MySharePresenter>() {
|
||||
/**
|
||||
* 布局资源
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
override fun getLayoutId(): Int = R.layout.module_event_panel_share_item
|
||||
|
||||
/**
|
||||
* 初始化控件,必须在初始化完成之后才可以实例化presenter,避免
|
||||
* presenter 生命周期错乱
|
||||
*/
|
||||
override fun initViews() {
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建 presenter 实例
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
override fun createPresenter(): MySharePresenter = MySharePresenter(this)
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
package com.mogo.module.v2x.fragment;
|
||||
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.PagerSnapHelper;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.mogo.commons.mvp.MvpFragment;
|
||||
import com.mogo.module.common.entity.V2XHistoryScenarioData;
|
||||
import com.mogo.module.v2x.R;
|
||||
import com.mogo.module.v2x.adapter.ScenarioHistoryAdapter;
|
||||
import com.mogo.module.v2x.presenter.ScenarioHistoryPresenter;
|
||||
import com.mogo.module.v2x.utils.V2XSQLiteUtils;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 出行动态,V2X 提示过的场景历史
|
||||
*
|
||||
* @author donghongyu
|
||||
*/
|
||||
public class ScenarioHistoryFragment
|
||||
extends MvpFragment<ScenarioHistoryFragment, ScenarioHistoryPresenter> {
|
||||
|
||||
private RecyclerView mRecyclerView;
|
||||
private ScenarioHistoryAdapter mScenarioHistoryAdapter;
|
||||
private ArrayList<V2XHistoryScenarioData> mV2XHistoryScenarioData = new ArrayList<>();
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.module_event_panel_fragment_scenario_history;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initViews() {
|
||||
Log.d("ScenarioHistoryFragment", "initViews --------> ");
|
||||
|
||||
mRecyclerView = (RecyclerView) findViewById(R.id.recyclerView);
|
||||
mScenarioHistoryAdapter = new ScenarioHistoryAdapter(mV2XHistoryScenarioData);
|
||||
mRecyclerView.setAdapter(mScenarioHistoryAdapter);
|
||||
// 设置切换样式
|
||||
new PagerSnapHelper().attachToRecyclerView(mRecyclerView);
|
||||
// 配置列表朝向
|
||||
LinearLayoutManager layoutManager = new LinearLayoutManager(getActivity(), LinearLayoutManager.VERTICAL, false);
|
||||
mRecyclerView.setLayoutManager(layoutManager);
|
||||
|
||||
List<V2XHistoryScenarioData> v2XHistoryScenarioData = V2XSQLiteUtils.getScenarioHistoryData();
|
||||
Logger.d("ScenarioHistoryFragment", "查询到历史消息:" + v2XHistoryScenarioData);
|
||||
mV2XHistoryScenarioData.clear();
|
||||
mV2XHistoryScenarioData.addAll(v2XHistoryScenarioData);
|
||||
mScenarioHistoryAdapter.notifyDataSetChanged();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
List<V2XHistoryScenarioData> v2XHistoryScenarioData = V2XSQLiteUtils.getScenarioHistoryData();
|
||||
Logger.d("ScenarioHistoryFragment", "查询到历史消息:" + v2XHistoryScenarioData);
|
||||
mV2XHistoryScenarioData.clear();
|
||||
mV2XHistoryScenarioData.addAll(v2XHistoryScenarioData);
|
||||
mScenarioHistoryAdapter.notifyDataSetChanged();
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
protected ScenarioHistoryPresenter createPresenter() {
|
||||
return new ScenarioHistoryPresenter(this);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,211 @@
|
||||
package com.mogo.module.v2x.fragment;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.mogo.commons.mvp.MvpFragment;
|
||||
import com.mogo.commons.network.SubscribeImpl;
|
||||
import com.mogo.module.v2x.R;
|
||||
import com.mogo.module.v2x.adapter.ShareEventAdapter;
|
||||
import com.mogo.module.v2x.entity.panel.ShareEventDescription;
|
||||
import com.mogo.module.v2x.entity.panel.ShareEventItem;
|
||||
import com.mogo.module.v2x.entity.panel.ShareEventItemEnum;
|
||||
import com.mogo.module.v2x.entity.panel.ShareEventLoadMoreItem;
|
||||
import com.mogo.module.v2x.listener.AdapterCallback;
|
||||
import com.mogo.module.v2x.network.EventApiService;
|
||||
import com.mogo.module.v2x.network.HttpConstant;
|
||||
import com.mogo.module.v2x.network.ShareEventParameter;
|
||||
import com.mogo.module.v2x.presenter.ShareEventsPresenter;
|
||||
import com.mogo.module.v2x.utils.animation.AnimationManager;
|
||||
import com.mogo.module.v2x.utils.animation.AnimationResources;
|
||||
import com.mogo.service.MogoServicePaths;
|
||||
import com.mogo.service.network.IMogoNetwork;
|
||||
import com.mogo.utils.network.RequestOptions;
|
||||
import com.mogo.utils.network.utils.GsonUtil;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.CountDownLatch;
|
||||
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||
import io.reactivex.schedulers.Schedulers;
|
||||
|
||||
public class ShareEventsFragment extends MvpFragment implements AdapterCallback {
|
||||
|
||||
private static final String TAG = "ShareEventsFragment";
|
||||
private RecyclerView recyclerView;
|
||||
private ShareEventAdapter adapter;
|
||||
private ArrayList dataArrayList = new ArrayList();
|
||||
private EventApiService eventApiService;
|
||||
private int pageNum = 1;
|
||||
final CountDownLatch countDownLatch = new CountDownLatch(2);
|
||||
private IMogoNetwork network;
|
||||
|
||||
//动画
|
||||
private ImageView loadingImageView;
|
||||
private AnimationManager animationHandler;
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.module_event_panel_share_recylerview;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initViews() {
|
||||
network = (IMogoNetwork) ARouter.getInstance().build(MogoServicePaths.PATH_SERVICES_NETWORK).navigation(getContext());
|
||||
eventApiService = network.create(EventApiService.class, HttpConstant.Companion.getNetHost());
|
||||
animationHandler = new AnimationManager();
|
||||
initRecyclerView();
|
||||
initData();
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
super.onCreateView(inflater, container, savedInstanceState);
|
||||
return mRootView;
|
||||
}
|
||||
|
||||
private void initRecyclerView() {
|
||||
recyclerView = mRootView.findViewById(R.id.road_case_share_list);
|
||||
adapter = new ShareEventAdapter(getActivity(), dataArrayList, this);
|
||||
recyclerView.setAdapter(adapter);
|
||||
LinearLayoutManager linearLayoutManager =
|
||||
new LinearLayoutManager(getActivity(), LinearLayoutManager.VERTICAL, false);
|
||||
recyclerView.setLayoutManager(linearLayoutManager);
|
||||
}
|
||||
|
||||
private void initData() {
|
||||
loadingImageView = mRootView.findViewById(R.id.loading_imageview);
|
||||
animationHandler.animationWithTarget(loadingImageView, AnimationResources.loadingRes,300);
|
||||
getShareEventDescription();
|
||||
getShareEventList(pageNum, 10);
|
||||
}
|
||||
|
||||
/*
|
||||
* 热心指数等
|
||||
* */
|
||||
private void getShareEventDescription() {
|
||||
//ZD802B1932L00622 测试数据sn
|
||||
ShareEventParameter parameter = new ShareEventParameter("ZD802B1932L00622");
|
||||
Map<String, Object> parameters = new HashMap<>();
|
||||
parameters.put("data", GsonUtil.jsonFromObject(parameter));
|
||||
|
||||
eventApiService.getEnthusiasmIndex(parameters)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new SubscribeImpl<ShareEventDescription>(RequestOptions.create(getContext())) {
|
||||
@Override
|
||||
public void onSuccess(ShareEventDescription resultData) {
|
||||
if (resultData != null && resultData.getResult() != null
|
||||
&& resultData.getResult().getEnthusiasmIndex() != null) {
|
||||
dataArrayList.add(resultData.getResult().getEnthusiasmIndex());
|
||||
Log.d(TAG, "热心指数---:" + resultData.getResult().getEnthusiasmIndex());
|
||||
}
|
||||
countDownLatch.countDown();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String message, int code) {
|
||||
super.onError(message, code);
|
||||
countDownLatch.countDown();
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
/*
|
||||
* 分享列表
|
||||
* */
|
||||
public void getShareEventList(int page, int size) {
|
||||
ShareEventParameter parameter = new ShareEventParameter("ZD802B1932L00622", page, 10);
|
||||
HashMap<String, Object> parameters = new HashMap<>();
|
||||
parameters.put("data", GsonUtil.jsonFromObject(parameter));
|
||||
|
||||
eventApiService.getShareEventList(parameters)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new SubscribeImpl<ShareEventItem>(RequestOptions.create(getContext())) {
|
||||
@Override
|
||||
public void onSuccess(ShareEventItem resultData) {
|
||||
ShareEventLoadMoreItem item = new ShareEventLoadMoreItem();
|
||||
if (resultData != null && resultData.getResult() != null) {
|
||||
if (resultData.getResult().getPage() != null) {
|
||||
int total = resultData.getResult().getPage().getTotal();
|
||||
if (total == 0) {
|
||||
//空白
|
||||
item.setViewType(ShareEventItemEnum.ITEM_TYPE_SHARE_EMPTY);
|
||||
dataArrayList.add(item);
|
||||
} else {
|
||||
if (resultData.getResult().getPage().getContent().size() > 0) {
|
||||
//当前页有数据
|
||||
if (dataArrayList.size() > 0) {
|
||||
Object data = dataArrayList.get(dataArrayList.size() - 1);
|
||||
if (data instanceof ShareEventLoadMoreItem) {
|
||||
dataArrayList.remove(dataArrayList.size() - 1);
|
||||
}
|
||||
}
|
||||
dataArrayList.addAll(resultData.getResult().getPage().getContent());
|
||||
item.setViewType(ShareEventItemEnum.ITEM_TYPE_LOAD_MORE_STATUS);
|
||||
item.setStatusText("查看更早记录");
|
||||
} else {
|
||||
//当前页没有数据
|
||||
item.setViewType(ShareEventItemEnum.ITEM_TYPE_NO_MORE);
|
||||
item.setStatusText("没有更多了");
|
||||
}
|
||||
dataArrayList.add(item);
|
||||
}
|
||||
}
|
||||
Log.d(TAG, "分享列表---:" + dataArrayList.get(0));
|
||||
} else {
|
||||
//空白
|
||||
item.setViewType(ShareEventItemEnum.ITEM_TYPE_SHARE_EMPTY);
|
||||
dataArrayList.add(item);
|
||||
}
|
||||
adapter.notifyDataSetChanged();
|
||||
countDownLatch.countDown();
|
||||
animationHandler.stop();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String message, int code) {
|
||||
super.onError(message, code);
|
||||
countDownLatch.countDown();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void addLastData(ArrayList dataArray, int total) {
|
||||
ShareEventLoadMoreItem item = new ShareEventLoadMoreItem();
|
||||
if (total > 10) {
|
||||
if (pageNum <= 1) {//没有分享
|
||||
item.setViewType(ShareEventItemEnum.ITEM_TYPE_SHARE_EMPTY);
|
||||
} else {//没有更多了
|
||||
item.setViewType(ShareEventItemEnum.ITEM_TYPE_NO_MORE);
|
||||
}
|
||||
dataArray.add(item);
|
||||
}
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
protected ShareEventsPresenter createPresenter() {
|
||||
Log.d(TAG, "createPresenter");
|
||||
return new ShareEventsPresenter(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadMoreShareEventList() {
|
||||
getShareEventList(pageNum + 1, 10);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
package com.mogo.module.v2x.fragment;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.mogo.commons.mvp.MvpFragment;
|
||||
import com.mogo.module.v2x.R;
|
||||
import com.mogo.module.v2x.adapter.SurroundingEventAdapter;
|
||||
import com.mogo.module.v2x.entity.panel.SurroundingResponse;
|
||||
import com.mogo.module.v2x.presenter.SurroundingEventPresenter;
|
||||
import com.mogo.module.v2x.view.SurroundingEventView;
|
||||
|
||||
/**
|
||||
* 周边事件
|
||||
*/
|
||||
public class SurroundingEventFragment extends MvpFragment<SurroundingEventView, SurroundingEventPresenter> implements SurroundingEventView {
|
||||
|
||||
private static final String TAG = "SurroundingEventFragment";
|
||||
private RecyclerView recyclerView;
|
||||
private View view;
|
||||
private SurroundingEventAdapter mAdapter;
|
||||
private SurroundingEventPresenter surroundingEventPresenter;
|
||||
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.module_event_panel_fragment_surrounding_event;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initViews() {
|
||||
Log.d("liyz", "initViews --------> ");
|
||||
initRecyclerView();
|
||||
initData();
|
||||
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
protected SurroundingEventPresenter createPresenter() {
|
||||
return surroundingEventPresenter;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
|
||||
super.onViewCreated(view, savedInstanceState);
|
||||
surroundingEventPresenter = new SurroundingEventPresenter(getContext(), this);
|
||||
Log.d("liyz", "onViewCreated ---------");
|
||||
|
||||
}
|
||||
|
||||
private void initRecyclerView() {
|
||||
// recyclerView = view.findViewById(R.id.c);
|
||||
// mAdapter = new SurroundingEventAdapter(getActivity()); //TODO
|
||||
// recyclerView.setAdapter(mAdapter);
|
||||
// LinearLayoutManager linearLayoutManager =
|
||||
// new LinearLayoutManager(getActivity(), LinearLayoutManager.VERTICAL, false);
|
||||
// recyclerView.setLayoutManager(linearLayoutManager);
|
||||
}
|
||||
|
||||
private void initData() {
|
||||
surroundingEventPresenter.getSurroundingEventData();
|
||||
}
|
||||
|
||||
/**
|
||||
* 展示列表数据 TODO
|
||||
*/
|
||||
@Override
|
||||
public void showSurroudingData(SurroundingResponse data) {
|
||||
if (data.getResult() != null) {
|
||||
SurroundingResponse.ResultBean resultBean = data.getResult();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
super.onDestroy();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroyView() {
|
||||
super.onDestroyView();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
package com.mogo.module.v2x.listener;
|
||||
|
||||
public interface AdapterCallback {
|
||||
//分享列表加载更多
|
||||
public void loadMoreShareEventList();
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package com.mogo.module.v2x.network;
|
||||
|
||||
|
||||
import com.mogo.module.v2x.entity.panel.ShareEventDescription;
|
||||
import com.mogo.module.v2x.entity.panel.ShareEventItem;
|
||||
import com.mogo.module.v2x.entity.panel.SurroundingResponse;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import io.reactivex.Observable;
|
||||
import okhttp3.RequestBody;
|
||||
import retrofit2.http.Body;
|
||||
import retrofit2.http.FieldMap;
|
||||
import retrofit2.http.FormUrlEncoded;
|
||||
import retrofit2.http.Headers;
|
||||
import retrofit2.http.POST;
|
||||
import retrofit2.http.Query;
|
||||
|
||||
public interface EventApiService {
|
||||
|
||||
//我的分享-热心指数等
|
||||
@FormUrlEncoded
|
||||
@POST("/deva/poiInfoFabulous/car/poi/no/queryEnthusiasmIndex/v1")
|
||||
Observable<ShareEventDescription> getEnthusiasmIndex(@FieldMap Map<String, Object> parames);
|
||||
|
||||
//我的分享-列表
|
||||
@FormUrlEncoded
|
||||
@POST("/deva/car/pathAndPoi/no/queryInfo")
|
||||
Observable<ShareEventItem> getShareEventList(@FieldMap Map<String, Object> parames);
|
||||
|
||||
//周边列表
|
||||
@Headers({"Content-Type:application/json", "Accept:application/json"})
|
||||
@POST("/deva/car/poi/no/queryNovelty/v1")
|
||||
Observable<SurroundingResponse> getSurroundingEventList(@Query("sn") String sn, @Body RequestBody jsonStr);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.mogo.module.v2x.network;
|
||||
|
||||
public class ShareEventParameter {
|
||||
private String sn;
|
||||
private int pageNum;
|
||||
private int pageSize;
|
||||
|
||||
public ShareEventParameter(String sn) {
|
||||
this.sn = sn;
|
||||
}
|
||||
|
||||
public ShareEventParameter(String sn, int pageNum, int pageSize) {
|
||||
this.sn = sn;
|
||||
this.pageNum = pageNum;
|
||||
this.pageSize = pageSize;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.mogo.module.v2x.presenter
|
||||
|
||||
import com.mogo.commons.mvp.Presenter
|
||||
import com.mogo.module.v2x.fragment.EventPanelFragment
|
||||
|
||||
/**
|
||||
* 事件面板presenter
|
||||
*
|
||||
* @author tongchenfei
|
||||
*/
|
||||
class EventPanelPresenter(view: EventPanelFragment) : Presenter<EventPanelFragment>(view)
|
||||
@@ -0,0 +1,7 @@
|
||||
package com.mogo.module.v2x.presenter
|
||||
|
||||
import com.mogo.commons.mvp.Presenter
|
||||
import com.mogo.module.v2x.fragment.MyShareFragment
|
||||
|
||||
class MySharePresenter(view: MyShareFragment) : Presenter<MyShareFragment>(view) {
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.mogo.module.v2x.presenter;
|
||||
|
||||
|
||||
import com.mogo.commons.mvp.Presenter;
|
||||
import com.mogo.module.v2x.fragment.ScenarioHistoryFragment;
|
||||
|
||||
/**
|
||||
* @author donghongyu
|
||||
*/
|
||||
public class ScenarioHistoryPresenter extends Presenter<ScenarioHistoryFragment> {
|
||||
|
||||
public ScenarioHistoryPresenter(ScenarioHistoryFragment view) {
|
||||
super(view);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.mogo.module.v2x.presenter;
|
||||
|
||||
import com.mogo.commons.mvp.IView;
|
||||
import com.mogo.commons.mvp.Presenter;
|
||||
import com.mogo.module.v2x.fragment.ShareEventsFragment;
|
||||
|
||||
public class ShareEventsPresenter extends Presenter <ShareEventsFragment>{
|
||||
public ShareEventsPresenter(IView view) {
|
||||
super((ShareEventsFragment) view);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,112 @@
|
||||
package com.mogo.module.v2x.presenter;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.lifecycle.Lifecycle;
|
||||
import androidx.lifecycle.LifecycleOwner;
|
||||
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.mogo.commons.mvp.Presenter;
|
||||
import com.mogo.commons.network.SubscribeImpl;
|
||||
import com.mogo.commons.network.Utils;
|
||||
import com.mogo.map.location.MogoLocation;
|
||||
import com.mogo.module.v2x.entity.panel.Center;
|
||||
import com.mogo.module.v2x.entity.panel.SurroundingRequest;
|
||||
import com.mogo.module.v2x.entity.panel.SurroundingResponse;
|
||||
import com.mogo.module.v2x.network.EventApiService;
|
||||
import com.mogo.module.v2x.network.HttpConstant;
|
||||
import com.mogo.module.v2x.view.SurroundingEventView;
|
||||
import com.mogo.service.IMogoServiceApis;
|
||||
import com.mogo.service.MogoServicePaths;
|
||||
import com.mogo.service.network.IMogoNetwork;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
import com.mogo.utils.network.RequestOptions;
|
||||
import com.mogo.utils.network.utils.GsonUtil;
|
||||
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||
import io.reactivex.schedulers.Schedulers;
|
||||
import okhttp3.RequestBody;
|
||||
|
||||
/**
|
||||
* @author lixiaopeng
|
||||
* @description
|
||||
* @since 2020/7/29
|
||||
*/
|
||||
public class SurroundingEventPresenter extends Presenter<SurroundingEventView> {
|
||||
private Context mContext;
|
||||
private IMogoNetwork mNetWork;
|
||||
private IMogoServiceApis mApis;
|
||||
private EventApiService eventApiService;
|
||||
private static final String TAG = "SurroundingEvent";
|
||||
|
||||
|
||||
public SurroundingEventPresenter(Context context, SurroundingEventView view) {
|
||||
super(view);
|
||||
mContext = context;
|
||||
mNetWork =
|
||||
((IMogoServiceApis) ARouter.getInstance().build(MogoServicePaths.PATH_SERVICE_APIS).navigation(view.getContext())).getNetworkApi();
|
||||
mApis = (IMogoServiceApis) ARouter.getInstance().build(MogoServicePaths.PATH_SERVICE_APIS).navigation(getContext());
|
||||
this.eventApiService = mNetWork.create(EventApiService.class, HttpConstant.Companion.getNetHost());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreate(@NonNull LifecycleOwner owner) {
|
||||
super.onCreate(owner);
|
||||
}
|
||||
|
||||
public void getSurroundingEventData() {
|
||||
MogoLocation location = mApis.getMapServiceApi().getSingletonLocationClient(mContext).getLastKnowLocation();
|
||||
if (location == null) {
|
||||
return;
|
||||
}
|
||||
Center center = new Center(location.getLatitude(), location.getLongitude());
|
||||
String[] poiTypes = {"10002", "10003", "10006", "10007", "10008", "10010", "10011", "10013", "10015"};
|
||||
SurroundingRequest request = new SurroundingRequest(center, poiTypes, 5000, 20);
|
||||
|
||||
eventApiService.getSurroundingEventList(Utils.getSn(), convert(GsonUtil.jsonFromObject(request)))
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new SubscribeImpl<SurroundingResponse>(RequestOptions.create(getContext())) {
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
super.onError(e);
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(SurroundingResponse data) {
|
||||
super.onSuccess(data);
|
||||
if (data != null) {
|
||||
mView.showSurroudingData(data);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String message, int code) {
|
||||
super.onError(message, code);
|
||||
Log.e(TAG, "onError message = " + message + " >>> code = " + code);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
public static RequestBody convert(String json) {
|
||||
// String json = GsonUtil.getGson().toJson( map );
|
||||
Logger.d(TAG, "request params: %s", json);
|
||||
RequestBody requestBody = RequestBody.create(okhttp3.MediaType.parse("application/json; charset=utf-8"), json);
|
||||
return requestBody;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroy(@NonNull LifecycleOwner owner) {
|
||||
super.onDestroy(owner);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLifecycleChanged(@NonNull LifecycleOwner owner, @NonNull Lifecycle.Event event) {
|
||||
super.onLifecycleChanged(owner, event);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.mogo.module.v2x.utils.animation;
|
||||
|
||||
interface Animation {
|
||||
|
||||
void start();
|
||||
|
||||
void stop();
|
||||
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.mogo.module.v2x.utils.animation;
|
||||
|
||||
import android.graphics.drawable.AnimationDrawable;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import com.mogo.utils.ThreadPoolService;
|
||||
import com.mogo.utils.UiThreadHandler;
|
||||
|
||||
public class AnimationManager implements Animation {
|
||||
|
||||
private ImageView targetImageView;
|
||||
private Animation delegate;
|
||||
private boolean isStarted = false;
|
||||
|
||||
public void animationWithTarget(ImageView imageView, int[] resources, int duration) {
|
||||
targetImageView = imageView;
|
||||
ThreadPoolService.execute(() -> {
|
||||
final AnimationDrawable drawable = new AnimationDrawable();
|
||||
for (int i = 0; i < resources.length; i++) {
|
||||
drawable.addFrame(targetImageView.getResources().getDrawable(resources[i]), duration);
|
||||
}
|
||||
UiThreadHandler.post(() -> {
|
||||
targetImageView.setBackground(drawable);
|
||||
delegate = new DelegateDrawable(drawable);
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
synchronized public void start() {
|
||||
if (delegate != null && !isStarted) {
|
||||
isStarted = true;
|
||||
delegate.start();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
synchronized public void stop() {
|
||||
if (delegate != null && isStarted) {
|
||||
isStarted = false;
|
||||
delegate.stop();
|
||||
}
|
||||
}
|
||||
|
||||
public void release() {
|
||||
delegate = null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.mogo.module.v2x.utils.animation;
|
||||
|
||||
|
||||
import com.mogo.module.v2x.R;
|
||||
|
||||
public class AnimationResources {
|
||||
public static final int loadingRes[] = {
|
||||
R.drawable.icon_enthusiasm_choose,
|
||||
R.drawable.icon_enthusiasm_unchoose,
|
||||
};
|
||||
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.mogo.module.v2x.utils.animation;
|
||||
|
||||
import android.graphics.drawable.AnimationDrawable;
|
||||
|
||||
public class DelegateDrawable implements Animation {
|
||||
|
||||
private AnimationDrawable drawable;
|
||||
|
||||
public DelegateDrawable(AnimationDrawable drawable) {
|
||||
this.drawable = drawable;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void start() {
|
||||
if (drawable != null) {
|
||||
drawable.start();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void stop() {
|
||||
if (drawable != null) {
|
||||
drawable.stop();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.mogo.module.v2x.view;
|
||||
|
||||
import com.mogo.commons.mvp.IView;
|
||||
import com.mogo.module.v2x.entity.panel.SurroundingResponse;
|
||||
|
||||
/**
|
||||
* @author lixiaopeng
|
||||
* @description
|
||||
* @since 2020/7/29
|
||||
*/
|
||||
public interface SurroundingEventView extends IView {
|
||||
|
||||
void showSurroudingData(SurroundingResponse data);
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 2.4 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 6.7 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.5 KiB |
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item
|
||||
android:id="@android:id/background"
|
||||
android:drawable="@drawable/icon_enthusiasm_unchoose">
|
||||
</item>
|
||||
<item
|
||||
android:id="@android:id/secondaryProgress"
|
||||
android:drawable="@drawable/icon_enthusiasm_second">
|
||||
</item>
|
||||
<item
|
||||
android:id="@android:id/progress"
|
||||
android:drawable="@drawable/icon_enthusiasm_choose">
|
||||
</item>
|
||||
|
||||
</layer-list>
|
||||
@@ -0,0 +1,54 @@
|
||||
<?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"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/clPanelContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/cardview_dark_background"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
|
||||
<com.google.android.material.tabs.TabLayout
|
||||
android:id="@+id/tabLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_150"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:tabGravity="fill"
|
||||
app:tabIndicatorColor="#ff678f"
|
||||
app:tabIndicatorFullWidth="false"
|
||||
app:tabIndicatorHeight="2dp"
|
||||
app:tabMode="fixed"
|
||||
app:tabSelectedTextColor="#ff678f"
|
||||
app:tabTextColor="#EE00FF"
|
||||
app:tabUnboundedRipple="true" />
|
||||
|
||||
<androidx.viewpager2.widget.ViewPager2
|
||||
android:id="@+id/vpEventPanel"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tabLayout" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnShowOrHidePanels"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="300dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:text="显示面板"
|
||||
android:textColor="#000"
|
||||
android:textSize="20sp"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#FFF">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recyclerView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:listitem="@layout/module_event_panel_share_item" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/clPanelContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvTitle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:text="Surrounding Event"
|
||||
android:textColor="#fff"
|
||||
android:textSize="40sp" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -0,0 +1,98 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout 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:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="80dp"
|
||||
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:text="0"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="25sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/shre_num_des"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="30dp"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center"
|
||||
android:text="分享次数"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="20sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="80dp"
|
||||
android:background="#FFFFFF" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="80dp"
|
||||
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:text="0"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="25sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/share_approve_des"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="30dp"
|
||||
android:gravity="center"
|
||||
android:text="车友认同次数"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="20sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="80dp"
|
||||
android:background="#FFFFFF" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="80dp"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RatingBar
|
||||
android:id="@+id/rating_bar"
|
||||
style="@style/customRatingBarStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="20dp"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/share_index_des"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="30dp"
|
||||
android:gravity="center"
|
||||
android:paddingBottom="0dp"
|
||||
android:text="热心指数"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="20sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -0,0 +1,39 @@
|
||||
<?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="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/share_event_guide_des"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="30dp"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:gravity="center"
|
||||
android:text="小窍门:分享路况、点赞其他车友,有助于提高热心指数"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="16sp">
|
||||
|
||||
</TextView>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/share_event_null_des"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="100dp"
|
||||
android:layout_below="@+id/share_event_guide_des"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:gravity="center"
|
||||
android:text="你还没有分享过道路事件,快去试试吧" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/share_event_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/share_event_null_des"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:background="#FFFFFF"
|
||||
android:text="去分享"
|
||||
android:clickable="true"
|
||||
android:onClick="shareEventAction"
|
||||
android:textSize="25sp" />
|
||||
|
||||
</RelativeLayout>
|
||||
@@ -0,0 +1,85 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/road_case_liset_item"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/road_case_style"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:paddingTop="10dp"
|
||||
android:background="#1E90FF"
|
||||
android:text="道路类型"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="15sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/road_case_address"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/road_case_style"
|
||||
android:gravity="center"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:text="东城区北三环"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="20sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/road_case_share_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/road_case_address"
|
||||
android:gravity="center"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:text="时间:"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="13sp" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/road_case_useless"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginTop="25dp"
|
||||
android:layout_marginRight="20dp"
|
||||
android:background="@drawable/amap_bus" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/road_case_useless_num"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_below="@id/road_case_useless"
|
||||
android:layout_alignLeft="@id/road_case_useless"
|
||||
android:layout_alignRight="@id/road_case_useless"
|
||||
android:gravity="center"
|
||||
android:text="10"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="15sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/road_case_uselful"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_alignTop="@id/road_case_useless"
|
||||
android:layout_alignBottom="@id/road_case_useless"
|
||||
android:layout_marginRight="20dp"
|
||||
android:layout_toLeftOf="@id/road_case_useless"
|
||||
android:background="@drawable/amap_ride" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/road_case_useful_num"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_below="@id/road_case_useless"
|
||||
android:layout_alignLeft="@id/road_case_uselful"
|
||||
android:layout_alignRight="@id/road_case_uselful"
|
||||
android:gravity="center"
|
||||
android:text="5"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="15sp" />
|
||||
|
||||
</RelativeLayout>
|
||||
@@ -0,0 +1,16 @@
|
||||
<?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="wrap_content"
|
||||
android:gravity="center">
|
||||
|
||||
<Button
|
||||
android:id="@+id/event_share_load_status"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:text="没有更多了"
|
||||
android:textColor="#000000"
|
||||
android:textSize="18sp"/>
|
||||
|
||||
</RelativeLayout>
|
||||
@@ -0,0 +1,29 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
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" >
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/road_case_share_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:overScrollMode="never"
|
||||
android:background="#000000"
|
||||
tools:itemCount="1"
|
||||
tools:listitem="@layout/module_event_panel_share_description"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" >
|
||||
</androidx.recyclerview.widget.RecyclerView>
|
||||
|
||||
<ImageView
|
||||
android:layout_height="50dp"
|
||||
android:layout_width="50dp"
|
||||
android:id="@+id/loading_imageview"
|
||||
android:background="#fff889"
|
||||
android:layout_centerInParent="true" >
|
||||
</ImageView>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
@@ -3,4 +3,16 @@
|
||||
<declare-styleable name="RoundLayout">
|
||||
<attr name="roundLayoutRadius" format="dimension" />
|
||||
</declare-styleable>
|
||||
|
||||
<style name="customRatingBarStyle" parent="@style/Widget.AppCompat.RatingBar">
|
||||
<item name="android:minHeight">20dp</item>
|
||||
<item name="android:maxHeight">20dp</item>
|
||||
<item name="android:maxWidth">20dp</item>
|
||||
<item name="android:minWidth">20dp</item>
|
||||
<item name="android:spacing">4dp</item>
|
||||
<item name="android:numStars">5</item>
|
||||
<item name="android:rating">1</item>
|
||||
<item name="android:stepSize">0.5</item>
|
||||
<item name="android:progressDrawable">@drawable/share_rating_bar</item>
|
||||
</style>
|
||||
</resources>
|
||||
Reference in New Issue
Block a user