Merge branch 'tmp_dev_auto_share_dialog' into dev
This commit is contained in:
@@ -22,8 +22,11 @@ import com.mogo.module.authorize.authprovider.invoke.AuthorizeConstant;
|
||||
import com.mogo.module.authorize.authprovider.invoke.AuthorizeInvokerConstant;
|
||||
import com.mogo.module.authorize.authprovider.module.IMogoAcquireAuthorizeListener;
|
||||
import com.mogo.module.authorize.authprovider.module.IMogoAuthorizeModuleManager;
|
||||
import com.mogo.module.common.dialog.BaseFloatDialog;
|
||||
import com.mogo.module.share.bean.StepAfterAuth;
|
||||
import com.mogo.module.share.constant.ShareConstants;
|
||||
import com.mogo.module.share.dialog.FixableShareDialog;
|
||||
import com.mogo.module.share.dialog.GridFixableShareDialog;
|
||||
import com.mogo.module.share.dialog.LaucherShareDialog;
|
||||
import com.mogo.module.share.manager.ServiceApisManager;
|
||||
import com.mogo.module.share.manager.UploadHelper;
|
||||
@@ -95,7 +98,9 @@ public class ShareControl implements IMogoShareManager, IMogoIntentListener, IMo
|
||||
private static final String TAG = "ShareControl";
|
||||
|
||||
private Context mContext;
|
||||
private LaucherShareDialog mShareDialog;
|
||||
// private LaucherShareDialog mShareDialog;
|
||||
|
||||
private BaseFloatDialog mShareDialog;
|
||||
|
||||
private IMogoAuthorizeModuleManager authorizeModuleManager;
|
||||
private IMogoIntentManager intentManager;
|
||||
@@ -125,7 +130,7 @@ public class ShareControl implements IMogoShareManager, IMogoIntentListener, IMo
|
||||
private void realShowDialog() {
|
||||
if (mShareDialog == null) {
|
||||
Logger.d(TAG,"realShowDialog context : " + mContext);
|
||||
mShareDialog = new LaucherShareDialog(mContext);
|
||||
mShareDialog = new GridFixableShareDialog(mContext);
|
||||
mShareDialog.setOnDismissListener(new DialogInterface.OnDismissListener() {
|
||||
@Override
|
||||
public void onDismiss(DialogInterface dialog) {
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.mogo.module.share.adapter
|
||||
|
||||
import android.content.Context
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.ImageView
|
||||
import android.widget.TextView
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.mogo.module.share.R
|
||||
import com.mogo.module.share.bean.FixableButton
|
||||
import com.mogo.utils.glide.GlideApp
|
||||
|
||||
/**
|
||||
* 可配置按钮适配器
|
||||
*
|
||||
* @author tongchenfei
|
||||
*/
|
||||
class ShareBtnAdapter(val context:Context): RecyclerView.Adapter<ShareBtnAdapter.ShareBtnViewHolder>() {
|
||||
private val btnList = ArrayList<FixableButton>()
|
||||
var btnClickListener:((btn:FixableButton)->Unit)? = null
|
||||
fun setFixableButtonList(btns:ArrayList<FixableButton>) {
|
||||
btnList.clear()
|
||||
btnList.addAll(btns)
|
||||
notifyDataSetChanged()
|
||||
}
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ShareBtnViewHolder {
|
||||
val view = LayoutInflater.from(context).inflate(R.layout.item_share_btn, parent,false)
|
||||
return ShareBtnViewHolder(view)
|
||||
}
|
||||
|
||||
override fun getItemCount(): Int =btnList.size
|
||||
|
||||
override fun onBindViewHolder(holder: ShareBtnViewHolder, position: Int) = holder.bindData(btnList[position])
|
||||
|
||||
inner class ShareBtnViewHolder(itemView:View):RecyclerView.ViewHolder(itemView){
|
||||
private val ivIcon:ImageView = itemView.findViewById(R.id.ivShareIcon)
|
||||
private val tvContent:TextView = itemView.findViewById(R.id.tvShareContent)
|
||||
fun bindData(btn: FixableButton) {
|
||||
GlideApp.with(context).load(btn.iconRes).into(ivIcon)
|
||||
tvContent.text = btn.content
|
||||
ivIcon.setOnClickListener {
|
||||
btnClickListener?.invoke(btn)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.mogo.module.share.bean
|
||||
|
||||
import com.mogo.module.share.R
|
||||
|
||||
/**
|
||||
* 可配置按钮封装
|
||||
* @author tongchenfei
|
||||
*/
|
||||
data class FixableButton(val id:Int = 0,val poiType:String = "10007",val iconUrl:String = "", val iconRes:Int = R.drawable.share_block_up, val content:String="拥堵")
|
||||
@@ -0,0 +1,140 @@
|
||||
package com.mogo.module.share.dialog
|
||||
|
||||
import android.content.Context
|
||||
import androidx.recyclerview.widget.GridLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.alibaba.android.arouter.launcher.ARouter
|
||||
import com.mogo.commons.debug.DebugConfig
|
||||
import com.mogo.module.common.dialog.BaseFloatDialog
|
||||
import com.mogo.module.common.utils.CarSeries
|
||||
import com.mogo.module.share.R
|
||||
import com.mogo.module.share.adapter.ShareBtnAdapter
|
||||
import com.mogo.module.share.bean.FixableButton
|
||||
import com.mogo.module.share.manager.ISeekHelpListener
|
||||
import com.mogo.module.share.manager.SeekHelpManager.removeSeekHelpListener
|
||||
import com.mogo.module.share.manager.UploadHelper.upload
|
||||
import com.mogo.service.IMogoServiceApis
|
||||
import com.mogo.service.MogoServicePaths
|
||||
import com.mogo.service.analytics.IMogoAnalytics
|
||||
import com.mogo.service.statusmanager.IMogoStatusManager
|
||||
import com.mogo.service.tanlu.IMogoTanluProvider
|
||||
import com.mogo.service.tanlu.TanluUploadParams
|
||||
import com.mogo.utils.logger.Logger
|
||||
import kotlin.random.Random
|
||||
|
||||
|
||||
/**
|
||||
* 可动态设置内容的Dialog
|
||||
* 由于和左侧Adas冲突,改成了windowManager方式实现,这种实现方式的问题是,无法监测back键的事件
|
||||
* @since 2020-01-10
|
||||
* @author tongchenfei
|
||||
*/
|
||||
class FixableShareDialog(private val mContext: Context) : BaseFloatDialog(mContext) {
|
||||
private val isShown = false
|
||||
private val mAnalytics: IMogoAnalytics
|
||||
private val mStatusManager: IMogoStatusManager
|
||||
private val mApis: IMogoServiceApis
|
||||
private lateinit var btnRecycler: RecyclerView
|
||||
private lateinit var btnAdapter:ShareBtnAdapter
|
||||
|
||||
private fun setWrapContent() {
|
||||
val window = window
|
||||
if (DebugConfig.getCarMachineType() != DebugConfig.CAR_MACHINE_TYPE_BYD) {
|
||||
if (window != null) {
|
||||
val lp = window.attributes
|
||||
lp.width = 1024
|
||||
lp.height = 600
|
||||
window.attributes = lp
|
||||
}
|
||||
} else if (CarSeries.getSeries() == CarSeries.CAR_SERIES_F80X) {
|
||||
if (window != null) {
|
||||
val lp = window.attributes
|
||||
lp.width = 1920
|
||||
lp.height = 1080
|
||||
window.attributes = lp
|
||||
}
|
||||
} else {
|
||||
if (window != null) {
|
||||
val lp = window.attributes
|
||||
lp.width = 1024
|
||||
lp.height = 600
|
||||
window.attributes = lp
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun initView() {
|
||||
Logger.d(TAG, "test-------3")
|
||||
setContentView(R.layout.launcher_dialog_share_with_gride)
|
||||
setWrapContent()
|
||||
|
||||
btnRecycler = findViewById(R.id.moduleShareBtnRecyclerView)
|
||||
val manager = GridLayoutManager(mContext, 5, GridLayoutManager.VERTICAL, false)
|
||||
manager.isAutoMeasureEnabled = true
|
||||
btnAdapter = ShareBtnAdapter(mContext)
|
||||
btnRecycler.adapter = btnAdapter
|
||||
btnAdapter.btnClickListener = {
|
||||
Logger.d(TAG, "btn click: $it")
|
||||
randomGenerateBtn()
|
||||
}
|
||||
randomGenerateBtn()
|
||||
}
|
||||
|
||||
private fun randomGenerateBtn(){
|
||||
val random = Random.nextInt(1, 10)
|
||||
val list = ArrayList<FixableButton>()
|
||||
for (i in 0 until random) {
|
||||
list.add(FixableButton())
|
||||
}
|
||||
btnAdapter.setFixableButtonList(list)
|
||||
}
|
||||
|
||||
private val seekListener: ISeekHelpListener = object : ISeekHelpListener {
|
||||
override fun onSeekHelpSuccess() {
|
||||
Logger.d(TAG, "上报求助完成,成功")
|
||||
removeSeekHelpListener(this)
|
||||
dismiss()
|
||||
}
|
||||
|
||||
override fun onSeekHelpFail() {
|
||||
Logger.d(TAG, "上报求助完成,失败")
|
||||
removeSeekHelpListener(this)
|
||||
dismiss()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 发送广播 1拥堵,2交通检查,3封路
|
||||
*/
|
||||
private fun sendShareReceiver(type: String) {
|
||||
val params = TanluUploadParams(type, IMogoTanluProvider.UPLOAD_FROM_USER)
|
||||
upload(mContext, params, true)
|
||||
}
|
||||
|
||||
override fun show() {
|
||||
Logger.d(TAG, "onShow====")
|
||||
if (!DebugConfig.isLauncher()) {
|
||||
mApis.adasControllerApi.closeADAS()
|
||||
}
|
||||
super.show()
|
||||
}
|
||||
|
||||
override fun dismiss() {
|
||||
Logger.d(TAG, "onDismiss=====")
|
||||
if (!DebugConfig.isLauncher() && mApis.statusManagerApi.isMainPageOnResume) {
|
||||
mApis.adasControllerApi.showADAS()
|
||||
}
|
||||
super.dismiss()
|
||||
}
|
||||
|
||||
companion object {
|
||||
private const val TAG = "FixableShareDialog"
|
||||
}
|
||||
|
||||
init {
|
||||
mApis = ARouter.getInstance().build(MogoServicePaths.PATH_SERVICE_APIS).navigation(mContext) as IMogoServiceApis
|
||||
mAnalytics = mApis.analyticsApi
|
||||
mStatusManager = mApis.statusManagerApi
|
||||
initView()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,129 @@
|
||||
package com.mogo.module.share.dialog
|
||||
|
||||
import android.content.Context
|
||||
import android.widget.FrameLayout
|
||||
import android.widget.GridLayout
|
||||
import androidx.recyclerview.widget.GridLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.alibaba.android.arouter.launcher.ARouter
|
||||
import com.mogo.commons.debug.DebugConfig
|
||||
import com.mogo.module.common.dialog.BaseFloatDialog
|
||||
import com.mogo.module.common.utils.CarSeries
|
||||
import com.mogo.module.share.R
|
||||
import com.mogo.module.share.adapter.ShareBtnAdapter
|
||||
import com.mogo.module.share.bean.FixableButton
|
||||
import com.mogo.module.share.manager.GridBtnManager
|
||||
import com.mogo.module.share.manager.ISeekHelpListener
|
||||
import com.mogo.module.share.manager.SeekHelpManager
|
||||
import com.mogo.module.share.manager.UploadHelper
|
||||
import com.mogo.service.IMogoServiceApis
|
||||
import com.mogo.service.MogoServicePaths
|
||||
import com.mogo.service.analytics.IMogoAnalytics
|
||||
import com.mogo.service.statusmanager.IMogoStatusManager
|
||||
import com.mogo.service.tanlu.IMogoTanluProvider
|
||||
import com.mogo.service.tanlu.TanluUploadParams
|
||||
import com.mogo.utils.logger.Logger
|
||||
import kotlin.random.Random
|
||||
|
||||
class GridFixableShareDialog(context:Context):BaseFloatDialog(context) {
|
||||
private val isShown = false
|
||||
private val mAnalytics: IMogoAnalytics
|
||||
private val mStatusManager: IMogoStatusManager
|
||||
private val mApis: IMogoServiceApis = ARouter.getInstance().build(MogoServicePaths.PATH_SERVICE_APIS).navigation(context) as IMogoServiceApis
|
||||
|
||||
private fun setWrapContent() {
|
||||
val window = window
|
||||
if (DebugConfig.getCarMachineType() != DebugConfig.CAR_MACHINE_TYPE_BYD) {
|
||||
if (window != null) {
|
||||
val lp = window.attributes
|
||||
lp.width = 1024
|
||||
lp.height = 600
|
||||
window.attributes = lp
|
||||
}
|
||||
} else if (CarSeries.getSeries() == CarSeries.CAR_SERIES_F80X) {
|
||||
if (window != null) {
|
||||
val lp = window.attributes
|
||||
lp.width = 1920
|
||||
lp.height = 1080
|
||||
window.attributes = lp
|
||||
}
|
||||
} else {
|
||||
if (window != null) {
|
||||
val lp = window.attributes
|
||||
lp.width = 1024
|
||||
lp.height = 600
|
||||
window.attributes = lp
|
||||
}
|
||||
}
|
||||
}
|
||||
private lateinit var gridBtnManager:GridBtnManager
|
||||
private fun initView() {
|
||||
Logger.d(TAG, "test-------3")
|
||||
setContentView(R.layout.dialog_share_with_gridlayout)
|
||||
setWrapContent()
|
||||
gridBtnManager = GridBtnManager(context,findViewById(R.id.moduleShareBtnGridLayout))
|
||||
gridBtnManager.setShareClickListener {
|
||||
Logger.d(TAG, "share btn click: $it")
|
||||
randomGenerateBtn()
|
||||
}
|
||||
findViewById<FrameLayout>(R.id.flShareDialogContainer).setOnClickListener { dismiss() }
|
||||
|
||||
gridBtnManager.showDefaultBtns()
|
||||
}
|
||||
|
||||
private fun randomGenerateBtn(){
|
||||
val random = Random.nextInt(1, 10)
|
||||
gridBtnManager.resetContainer()
|
||||
for (i in 0 until random) {
|
||||
gridBtnManager.generateShareButton(FixableButton(id = i))
|
||||
}
|
||||
}
|
||||
|
||||
private val seekListener: ISeekHelpListener = object : ISeekHelpListener {
|
||||
override fun onSeekHelpSuccess() {
|
||||
Logger.d(TAG, "上报求助完成,成功")
|
||||
SeekHelpManager.removeSeekHelpListener(this)
|
||||
dismiss()
|
||||
}
|
||||
|
||||
override fun onSeekHelpFail() {
|
||||
Logger.d(TAG, "上报求助完成,失败")
|
||||
SeekHelpManager.removeSeekHelpListener(this)
|
||||
dismiss()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 发送广播 1拥堵,2交通检查,3封路
|
||||
*/
|
||||
private fun sendShareReceiver(type: String) {
|
||||
val params = TanluUploadParams(type, IMogoTanluProvider.UPLOAD_FROM_USER)
|
||||
UploadHelper.upload(context, params, true)
|
||||
}
|
||||
|
||||
override fun show() {
|
||||
Logger.d(TAG, "onShow====")
|
||||
if (!DebugConfig.isLauncher()) {
|
||||
mApis.adasControllerApi.closeADAS()
|
||||
}
|
||||
super.show()
|
||||
}
|
||||
|
||||
override fun dismiss() {
|
||||
Logger.d(TAG, "onDismiss=====")
|
||||
if (!DebugConfig.isLauncher() && mApis.statusManagerApi.isMainPageOnResume) {
|
||||
mApis.adasControllerApi.showADAS()
|
||||
}
|
||||
super.dismiss()
|
||||
}
|
||||
|
||||
companion object {
|
||||
private const val TAG = "GridFixableShareDialog"
|
||||
}
|
||||
|
||||
init {
|
||||
mAnalytics = mApis.analyticsApi
|
||||
mStatusManager = mApis.statusManagerApi
|
||||
initView()
|
||||
}
|
||||
}
|
||||
@@ -2,13 +2,14 @@ package com.mogo.module.share.dialog;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.View;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.mogo.commons.debug.DebugConfig;
|
||||
import com.mogo.module.common.dialog.BaseFloatDialog;
|
||||
import com.mogo.module.common.utils.CarSeries;
|
||||
import com.mogo.module.share.R;
|
||||
import com.mogo.module.share.manager.ISeekHelpListener;
|
||||
import com.mogo.module.share.manager.SeekHelpManager;
|
||||
@@ -74,7 +75,31 @@ public class LaucherShareDialog extends BaseFloatDialog implements View.OnClickL
|
||||
initView();
|
||||
initListener();
|
||||
}
|
||||
|
||||
private void setWrapContent() {
|
||||
Window window = getWindow();
|
||||
if(DebugConfig.getCarMachineType() != DebugConfig.CAR_MACHINE_TYPE_BYD){
|
||||
if (window != null) {
|
||||
WindowManager.LayoutParams lp = window.getAttributes();
|
||||
lp.width = 1024;
|
||||
lp.height = 600;
|
||||
window.setAttributes(lp);
|
||||
}
|
||||
}else if(CarSeries.getSeries() == CarSeries.CAR_SERIES_F80X){
|
||||
if (window != null) {
|
||||
WindowManager.LayoutParams lp = window.getAttributes();
|
||||
lp.width = 1920;
|
||||
lp.height = 1080;
|
||||
window.setAttributes(lp);
|
||||
}
|
||||
}else{
|
||||
if (window != null) {
|
||||
WindowManager.LayoutParams lp = window.getAttributes();
|
||||
lp.width = 1024;
|
||||
lp.height = 600;
|
||||
window.setAttributes(lp);
|
||||
}
|
||||
}
|
||||
}
|
||||
private void initView() {
|
||||
Logger.d(TAG, "test-------3");
|
||||
setContentView(R.layout.launcher_dialog_share_2);
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.mogo.module.share.manager
|
||||
|
||||
import android.content.Context
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.GridLayout
|
||||
import android.widget.ImageView
|
||||
import android.widget.TextView
|
||||
import com.mogo.module.share.R
|
||||
import com.mogo.module.share.bean.FixableButton
|
||||
import com.mogo.service.tanlu.IMogoTanluProvider
|
||||
import com.mogo.utils.glide.GlideApp
|
||||
|
||||
/**
|
||||
* 用来管理生成对应的分享按钮
|
||||
*/
|
||||
class GridBtnManager(val context: Context, val container: GridLayout) {
|
||||
private val inflater = LayoutInflater.from(context)
|
||||
|
||||
fun resetContainer() {
|
||||
container.removeAllViews()
|
||||
}
|
||||
|
||||
fun generateShareButton(button: FixableButton): View {
|
||||
val view = inflater.inflate(R.layout.item_share_btn, container, false)
|
||||
val img = view.findViewById<ImageView>(R.id.ivShareIcon)
|
||||
val content = view.findViewById<TextView>(R.id.tvShareContent)
|
||||
// 优先加载url图片,然后加载资源图片
|
||||
if (button.iconUrl.isNotEmpty()) {
|
||||
GlideApp.with(context).load(button.iconUrl).centerInside().into(img)
|
||||
} else {
|
||||
GlideApp.with(context).load(button.iconRes).centerInside().into(img)
|
||||
}
|
||||
content.text = button.content
|
||||
view.setOnClickListener {
|
||||
btnClickListener?.invoke(button)
|
||||
}
|
||||
container.addView(view)
|
||||
return view
|
||||
}
|
||||
|
||||
fun showDefaultBtns() {
|
||||
resetContainer()
|
||||
generateShareButton(FixableButton(poiType = IMogoTanluProvider.TYPE_BLOCK, iconRes = R.drawable.share_block_up, content = "拥堵"))
|
||||
generateShareButton(FixableButton(poiType = IMogoTanluProvider.TYPE_TRAFFIC_CHECK, iconRes = R.drawable.share_traffic_check, content = "交通检查"))
|
||||
generateShareButton(FixableButton(poiType = IMogoTanluProvider.TYPE_CLOSURE, iconRes = R.drawable.share_road_closure, content = "封路"))
|
||||
generateShareButton(FixableButton(poiType = IMogoTanluProvider.TYPE_ACCIDENT, iconRes = R.drawable.share_accident, content = "事故"))
|
||||
generateShareButton(FixableButton(poiType = IMogoTanluProvider.TYPE_ROAD_CONSTRUCTION, iconRes = R.drawable.share_road_construction, content = "道路施工"))
|
||||
generateShareButton(FixableButton(poiType = IMogoTanluProvider.TYPE_REAL_TIME_TRAFFIC, iconRes = R.drawable.share_real_time_traffic, content = "实时路况"))
|
||||
generateShareButton(FixableButton(poiType = IMogoTanluProvider.TYPE_SEEK_HELP, iconRes = R.drawable.share_seek_help, content = "故障求助"))
|
||||
generateShareButton(FixableButton(poiType = IMogoTanluProvider.TYPE_STAGNANT_WATER, iconRes = R.drawable.share_stagnant_water, content = "道路积水"))
|
||||
generateShareButton(FixableButton(poiType = IMogoTanluProvider.TYPE_ROAD_ICY, iconRes = R.drawable.share_road_icy, content = "道路结冰"))
|
||||
generateShareButton(FixableButton(poiType = IMogoTanluProvider.TYPE_DENSE_FOG, iconRes = R.drawable.share_dense_fog, content = "浓雾"))
|
||||
}
|
||||
|
||||
private var btnClickListener: ((fixableButton: FixableButton) -> Unit)? = null
|
||||
fun setShareClickListener(listener: ((fixableButton: FixableButton) -> Unit)) {
|
||||
btnClickListener = listener
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/flShareDialogContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:minWidth="@dimen/module_share_container_min_width"
|
||||
android:background="@drawable/module_share_dialog_bg"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/btn_share_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/share_module_title_margin_top"
|
||||
android:drawableLeft="@drawable/module_share_title_icon_left"
|
||||
android:drawableRight="@drawable/module_share_title_icon_right"
|
||||
android:drawablePadding="@dimen/dp_40"
|
||||
android:text="我要分享"
|
||||
android:textColor="@color/module_share_dialog_title_text_color"
|
||||
android:textSize="@dimen/share_module_title_content"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<GridLayout
|
||||
android:id="@+id/moduleShareBtnGridLayout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/module_share_container_padding_bottom"
|
||||
android:clickable="true"
|
||||
android:columnCount="5"
|
||||
android:paddingLeft="@dimen/module_share_container_padding_left"
|
||||
android:paddingRight="@dimen/module_share_container_padding_right" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</FrameLayout>
|
||||
@@ -3,22 +3,31 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="@dimen/module_share_btn_margin_left"
|
||||
android:paddingTop="@dimen/module_share_btn_margin_top">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="@dimen/module_share_icon_bg_width"
|
||||
android:layout_height="@dimen/module_share_icon_bg_width"
|
||||
android:background="@drawable/module_share_btn_bg">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivShareIcon"
|
||||
android:layout_width="@dimen/module_share_icon_width"
|
||||
android:layout_height="@dimen/module_share_icon_width"
|
||||
android:layout_gravity="center" />
|
||||
</FrameLayout>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/dp_160"
|
||||
android:layout_height="@dimen/dp_160"
|
||||
android:id="@+id/ivShareIcon"
|
||||
android:src="@drawable/share_road_closure" />
|
||||
|
||||
<Space
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/share_module_tv_margin_top" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvShareContent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/tvShareContent"
|
||||
android:text="上报拥堵"
|
||||
android:textColor="@color/module_share_dialog_icon_text_color"
|
||||
android:textSize="@dimen/share_module_item"
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/share_module_height"
|
||||
android:layout_gravity="center"
|
||||
android:background="@drawable/module_share_dialog_bg"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="65px"
|
||||
android:paddingRight="65px"
|
||||
android:paddingBottom="58px">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/btn_share_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/share_module_title_margin_top"
|
||||
android:drawableLeft="@drawable/module_share_title_icon_left"
|
||||
android:drawableRight="@drawable/module_share_title_icon_right"
|
||||
android:drawablePadding="@dimen/dp_40"
|
||||
android:text="我要分享"
|
||||
android:textColor="@color/module_share_dialog_title_text_color"
|
||||
android:textSize="@dimen/share_module_title_content"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/moduleShareBtnRecyclerView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="44px" />
|
||||
</LinearLayout>
|
||||
|
||||
</FrameLayout>
|
||||
@@ -21,6 +21,16 @@
|
||||
<dimen name="share_module_bottom_size">28px</dimen>
|
||||
<dimen name="share_module_btn_text_size">32px</dimen>
|
||||
|
||||
<dimen name="module_share_btn_margin_left">114px</dimen>
|
||||
<dimen name="module_share_btn_margin_top">83px</dimen>
|
||||
<dimen name="module_share_container_padding_left">6px</dimen>
|
||||
<dimen name="module_share_container_padding_right">123px</dimen>
|
||||
<dimen name="module_share_container_padding_bottom">110px</dimen>
|
||||
|
||||
<dimen name="module_share_icon_width">75px</dimen>
|
||||
<dimen name="module_share_icon_bg_width">165px</dimen>
|
||||
<dimen name="module_share_container_min_width">967px</dimen>
|
||||
|
||||
</resources>
|
||||
|
||||
|
||||
|
||||
@@ -22,4 +22,14 @@
|
||||
<dimen name="share_module_bottom_size">15px</dimen>
|
||||
<dimen name="share_module_btn_text_size">17.5px</dimen>
|
||||
|
||||
<dimen name="module_share_btn_margin_left">60px</dimen>
|
||||
<dimen name="module_share_btn_margin_top">44px</dimen>
|
||||
<dimen name="module_share_container_padding_left">5px</dimen>
|
||||
<dimen name="module_share_container_padding_right">65px</dimen>
|
||||
<dimen name="module_share_container_padding_bottom">58px</dimen>
|
||||
|
||||
<dimen name="module_share_icon_width">40px</dimen>
|
||||
<dimen name="module_share_icon_bg_width">89px</dimen>
|
||||
<dimen name="module_share_container_min_width">514px</dimen>
|
||||
|
||||
</resources>
|
||||
@@ -45,6 +45,11 @@ public interface IMogoTanluProvider extends IProvider {
|
||||
*/
|
||||
String TYPE_ROAD_CONSTRUCTION = "10006";
|
||||
|
||||
/**
|
||||
* 故障求助
|
||||
*/
|
||||
String TYPE_SEEK_HELP = "99999";
|
||||
|
||||
/**
|
||||
* 用户手点上报
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user