视频页和左面有可能常驻的右滑工具
@@ -54,7 +54,7 @@ public class TaxiPassengerServiceManager {
|
||||
*/
|
||||
private String getDriverAppSn(){
|
||||
if(DebugConfig.isDebug()){
|
||||
return CallerTelematicManager.INSTANCE.getServerToken();
|
||||
return "X20202205051RD29W4";
|
||||
}else {
|
||||
return CallerTelematicManager.INSTANCE.getServerToken();
|
||||
}
|
||||
|
||||
@@ -27,6 +27,8 @@ import com.mogo.module.common.constants.DataTypes;
|
||||
import com.mogo.och.common.module.wigets.OCHBorderShadowLayout;
|
||||
import com.mogo.och.taxi.passenger.R;
|
||||
import com.mogo.och.taxi.passenger.presenter.BaseTaxiPassengerPresenter;
|
||||
import com.mogo.och.taxi.passenger.ui.leftmenu.OverlayLeftViewUtils;
|
||||
import com.mogo.och.taxi.passenger.ui.video.TaxiPassengerMogoConsultView;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
|
||||
@@ -127,9 +129,12 @@ public class TaxiPassengerBaseFragment extends MvpFragment<TaxiPassengerBaseFrag
|
||||
});
|
||||
|
||||
findViewById(R.id.iv_temp).setOnClickListener(view -> {
|
||||
//OverlayLeftViewUtils.INSTANCE.showOverlayView(getActivity());
|
||||
//showOrHideArrivedEndLayout(true, "北京北京北京", "1527481606997577728");
|
||||
//showOrHidePressengerCheckPager(true, "开始站点开", "开始站点开始站点开始", "2", "京A888888", "18811539480");
|
||||
//CallerHmiManager.INSTANCE.showToolsView();
|
||||
//OCHFloatWindowManager.getInstance().ShowFloatWindow(getContext());
|
||||
OverlayViewUtils.showOverlayView(getActivity(),new TaxiPassengerMogoConsultView(getContext()));
|
||||
ToastUtils.showShort("测试点击");
|
||||
});
|
||||
|
||||
mStartAutopilotBtn.setOnClickListener(view -> {
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
package com.mogo.och.taxi.passenger.ui.leftmenu
|
||||
|
||||
import android.view.MotionEvent
|
||||
import android.view.View
|
||||
import android.view.WindowManager
|
||||
|
||||
class ItemViewTouchListener(
|
||||
private val wl: WindowManager.LayoutParams,
|
||||
private val windowManager: WindowManager?
|
||||
) :
|
||||
View.OnTouchListener {
|
||||
private var x = 0
|
||||
private var dragTime = 0L
|
||||
private val DEVIATION = 10
|
||||
private val NEGATIVEDEVIATION = -10
|
||||
override fun onTouch(view: View, motionEvent: MotionEvent): Boolean {
|
||||
when (motionEvent.action) {
|
||||
MotionEvent.ACTION_DOWN -> {
|
||||
x = motionEvent.rawX.toInt()
|
||||
dragTime = System.currentTimeMillis()
|
||||
}
|
||||
MotionEvent.ACTION_MOVE -> {
|
||||
val nowX = motionEvent.rawX.toInt()
|
||||
val movedX = nowX - x
|
||||
x = nowX
|
||||
wl.apply {
|
||||
x += movedX
|
||||
}
|
||||
if (wl.x > 0 || wl.x < OverlayLeftViewUtils.DEVIATION_WIDTH) {
|
||||
wl.apply {
|
||||
x -= movedX
|
||||
}
|
||||
return false
|
||||
}
|
||||
if (wl.x > NEGATIVEDEVIATION && movedX > 0) {
|
||||
wl.x = 0
|
||||
}
|
||||
if (wl.x < OverlayLeftViewUtils.DEVIATION_WIDTH +DEVIATION && movedX < 0) {
|
||||
wl.x = OverlayLeftViewUtils.DEVIATION_WIDTH
|
||||
}
|
||||
|
||||
//更新悬浮球控件位置
|
||||
windowManager?.updateViewLayout(view.rootView, wl)
|
||||
}
|
||||
MotionEvent.ACTION_UP -> {
|
||||
val startX = wl.x
|
||||
if (startX > OverlayLeftViewUtils.DEVIATION_WIDTH /2 && startX < 0) {
|
||||
wl.x = 0
|
||||
windowManager?.updateViewLayout(view.rootView, wl)
|
||||
} else if (startX < OverlayLeftViewUtils.DEVIATION_WIDTH /2 && startX >= OverlayLeftViewUtils.DEVIATION_WIDTH) {
|
||||
wl.x = OverlayLeftViewUtils.DEVIATION_WIDTH
|
||||
windowManager?.updateViewLayout(view.rootView, wl)
|
||||
}
|
||||
if (System.currentTimeMillis() - dragTime > 500) {
|
||||
dragTime = 0
|
||||
return true
|
||||
}
|
||||
}
|
||||
else -> {
|
||||
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package com.mogo.och.taxi.passenger.ui.leftmenu
|
||||
|
||||
import android.content.Context
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.BaseAdapter
|
||||
import android.widget.ImageView
|
||||
import com.mogo.och.taxi.passenger.ui.leftmenu.model.LeftMenuModel
|
||||
|
||||
class ListAdapter(private val context: Context,val list: MutableList<LeftMenuModel>) : BaseAdapter() {
|
||||
|
||||
override fun getCount(): Int {
|
||||
return list.size
|
||||
}
|
||||
|
||||
override fun getItem(position: Int): Any {
|
||||
return list[position]
|
||||
}
|
||||
|
||||
override fun getItemId(position: Int): Long {
|
||||
return position.toLong()
|
||||
}
|
||||
|
||||
override fun getView(position: Int, convertView: View?, parent: ViewGroup?): View {
|
||||
val imageView = ImageView(context)
|
||||
val leftMenuModel = list[position]
|
||||
if (leftMenuModel.isChecked) {
|
||||
imageView.setImageResource(leftMenuModel.selected)
|
||||
} else {
|
||||
imageView.setImageResource(leftMenuModel.select)
|
||||
}
|
||||
imageView.setOnClickListener {
|
||||
for (i in list.indices) {
|
||||
list[i].isChecked = position == i
|
||||
}
|
||||
notifyDataSetChanged()
|
||||
}
|
||||
return imageView
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,171 @@
|
||||
package com.mogo.och.taxi.passenger.ui.leftmenu
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.app.Activity
|
||||
import android.content.Context
|
||||
import android.graphics.PixelFormat
|
||||
import android.graphics.Rect
|
||||
import android.graphics.Region
|
||||
import android.view.*
|
||||
import android.widget.ListView
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
|
||||
import com.mogo.och.taxi.passenger.R
|
||||
import com.mogo.och.taxi.passenger.ui.leftmenu.model.LeftMenuModel
|
||||
import com.mogo.och.taxi.passenger.utils.windowdispatch.OnComputeInternalInsetsListener
|
||||
import com.mogo.och.taxi.passenger.utils.windowdispatch.ReflectionUtils
|
||||
|
||||
/**
|
||||
* 遮罩层工具类
|
||||
*
|
||||
* @author mogoauto
|
||||
*/
|
||||
@SuppressLint("StaticFieldLeak")
|
||||
object OverlayLeftViewUtils {
|
||||
private const val TAG = "OverlayViewUtils"
|
||||
private var windowManager: WindowManager? = null
|
||||
private var applicationContext: Context? = null
|
||||
|
||||
@Volatile
|
||||
private var isShowing = false
|
||||
|
||||
|
||||
private var mInvocationHandler: OnComputeInternalInsetsListener? = null
|
||||
private val mTouchRegion = Region()
|
||||
private var params:WindowManager.LayoutParams?=null
|
||||
|
||||
const val WIDTH = 810
|
||||
const val DEVIATION_WIDTH = -669
|
||||
|
||||
|
||||
/**
|
||||
* 记录上一次的View
|
||||
*/
|
||||
private var lastOverlayView: View? = null
|
||||
|
||||
/**
|
||||
* 添加覆盖View在Activity上面
|
||||
*/
|
||||
@JvmOverloads
|
||||
fun showOverlayView(context: Activity, ani: Int = -1) {
|
||||
if (applicationContext == null) {
|
||||
applicationContext = context.applicationContext
|
||||
}
|
||||
if (windowManager == null) {
|
||||
windowManager = context.windowManager
|
||||
}
|
||||
val overlayView = LayoutInflater.from(context)
|
||||
.inflate(R.layout.taxi_p_window_float_interphone, null) as ConstraintLayout
|
||||
// 设置View显示模式,沉浸式的侵入到状态栏,导航栏
|
||||
overlayView.systemUiVisibility = (View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
|
||||
or View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY
|
||||
or View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
|
||||
or View.SYSTEM_UI_FLAG_LAYOUT_STABLE
|
||||
or View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION)
|
||||
layoutParams(ani)
|
||||
|
||||
// 如果正在展示中,并且lastOverlayView不为null,先做移除操作,保证覆盖在最上面的View只有一个,防止叠加导致无法移除
|
||||
if (lastOverlayView != null) {
|
||||
dismissOverlayView(lastOverlayView)
|
||||
}
|
||||
val vDragField = overlayView.findViewById<View>(R.id.v_drag_field)
|
||||
vDragField.setOnTouchListener(ItemViewTouchListener(params!!, windowManager))
|
||||
vDragField.setOnClickListener {
|
||||
val start: Int = params!!.x
|
||||
if (start > DEVIATION_WIDTH /2 && start < 10) {
|
||||
params?.x = DEVIATION_WIDTH
|
||||
windowManager?.updateViewLayout(overlayView, params)
|
||||
} else if (start < DEVIATION_WIDTH /2 && start >= DEVIATION_WIDTH) {
|
||||
params?.x = 0
|
||||
windowManager?.updateViewLayout(overlayView, params)
|
||||
}
|
||||
}
|
||||
|
||||
val lvSelectItem = overlayView.findViewById<ListView>(R.id.lv_select_item)
|
||||
val integers = mutableListOf<LeftMenuModel>()
|
||||
integers.add(LeftMenuModel(R.drawable.taxi_p_mogo_live_selected,R.drawable.taxi_p_mogo_live_selected,true))
|
||||
integers.add(LeftMenuModel(R.drawable.taxi_p_mogo_overview_selected,R.drawable.taxi_p_mogo_overview_selected,false))
|
||||
integers.add(LeftMenuModel(R.drawable.taxi_p_mogo_consult_select,R.drawable.taxi_p_mogo_consult_selected,false))
|
||||
integers.add(LeftMenuModel(R.drawable.taxi_p_mogo_entertainment_select,R.drawable.taxi_p_mogo_entertainment_selected,false))
|
||||
lvSelectItem.adapter = ListAdapter(context, integers)
|
||||
|
||||
overlayView.viewTreeObserver
|
||||
.addOnGlobalLayoutListener(object :ViewTreeObserver.OnGlobalLayoutListener{
|
||||
override fun onGlobalLayout() {
|
||||
mTouchRegion.setEmpty()
|
||||
mTouchRegion.op(getViewBounds(vDragField), Region.Op.UNION)
|
||||
mTouchRegion.op(getViewBounds(lvSelectItem), Region.Op.UNION)
|
||||
mInvocationHandler?.touchRegion = mTouchRegion
|
||||
overlayView.viewTreeObserver.removeOnGlobalLayoutListener(this)
|
||||
}
|
||||
})
|
||||
try {
|
||||
lastOverlayView = overlayView
|
||||
mInvocationHandler =
|
||||
OnComputeInternalInsetsListener()
|
||||
ReflectionUtils.removeOnComputeInternalInsetsListener(overlayView.viewTreeObserver)
|
||||
ReflectionUtils.addOnComputeInternalInsetsListener(
|
||||
overlayView.viewTreeObserver,
|
||||
mInvocationHandler?.getListener()
|
||||
)
|
||||
mInvocationHandler?.touchRegion = mTouchRegion
|
||||
windowManager!!.addView(overlayView, params)
|
||||
isShowing = true
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
}
|
||||
|
||||
private fun layoutParams(ani: Int) {
|
||||
if(params ==null) {
|
||||
params = WindowManager.LayoutParams()
|
||||
}
|
||||
params?.let {
|
||||
it.width = WIDTH
|
||||
it.height = WindowManager.LayoutParams.MATCH_PARENT
|
||||
it.alpha = 1.0f
|
||||
it.gravity = Gravity.START or Gravity.TOP
|
||||
it.x = DEVIATION_WIDTH
|
||||
it.y = 0
|
||||
it.format = PixelFormat.RGBA_8888
|
||||
// 设置窗口类型为应用子窗口,和PopupWindow同类型
|
||||
it.type = WindowManager.LayoutParams.TYPE_APPLICATION_SUB_PANEL
|
||||
// 没有边界限制,允许窗口扩展到屏幕外
|
||||
it.flags = WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE or
|
||||
WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS or
|
||||
WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL
|
||||
if (ani != -1) {
|
||||
it.windowAnimations = ani
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 移除覆盖View在Activity上面
|
||||
*/
|
||||
fun dismissOverlayView(overlayView: View?) {
|
||||
if (!isShowing) {
|
||||
return
|
||||
}
|
||||
try {
|
||||
if (windowManager != null && overlayView != null) {
|
||||
windowManager!!.removeView(overlayView)
|
||||
}
|
||||
if (lastOverlayView != null && lastOverlayView === overlayView) {
|
||||
lastOverlayView = null
|
||||
}
|
||||
isShowing = false
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
}
|
||||
|
||||
private fun getViewBounds(view: View): Rect {
|
||||
CallerLogger.e(
|
||||
SceneConstant.M_TAXI_P + "ItemViewTouchListener",
|
||||
"点击的位置${view.left}----${view.top}---${view.right}-----${view.bottom}"
|
||||
)
|
||||
return Rect(view.left, view.top, view.right, view.bottom)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package com.mogo.och.taxi.passenger.ui.leftmenu.model
|
||||
|
||||
data class LeftMenuModel(
|
||||
val select: Int,
|
||||
val selected: Int,
|
||||
var isChecked: Boolean
|
||||
)
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.mogo.och.taxi.passenger.ui.video;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.mogo.och.taxi.passenger.R;
|
||||
import com.mogo.och.taxi.passenger.widget.ConsultVideoPlayer;
|
||||
import com.shuyu.gsyvideoplayer.builder.GSYVideoOptionBuilder;
|
||||
|
||||
public class RecyclerItemVideoHolder extends RecyclerView.ViewHolder {
|
||||
|
||||
public final static String TAG = "RecyclerView2List";
|
||||
|
||||
protected Context context;
|
||||
|
||||
ConsultVideoPlayer gsyVideoPlayer;
|
||||
|
||||
ImageView imageView;
|
||||
|
||||
GSYVideoOptionBuilder gsyVideoOptionBuilder;
|
||||
|
||||
public RecyclerItemVideoHolder(Context context, View v) {
|
||||
super(v);
|
||||
this.context = context;
|
||||
gsyVideoPlayer = v.findViewById(R.id.video_item_player);
|
||||
imageView = new ImageView(context);
|
||||
gsyVideoOptionBuilder = new GSYVideoOptionBuilder();
|
||||
}
|
||||
|
||||
public void onBind(final int position, String videoModel) {
|
||||
|
||||
String url;
|
||||
if (position % 2 == 0) {
|
||||
url = "https://pointshow.oss-cn-hangzhou.aliyuncs.com/McTk51586843620689.mp4";
|
||||
} else {
|
||||
url = "http://9890.vod.myqcloud.com/9890_4e292f9a3dd011e6b4078980237cc3d3.f20.mp4";
|
||||
}
|
||||
gsyVideoOptionBuilder.setUrl(url).setCacheWithPlay(false).setPlayTag("NoticeTrafficDialog")
|
||||
.build(gsyVideoPlayer);
|
||||
gsyVideoPlayer.getStartButton().performClick();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
package com.mogo.och.taxi.passenger.ui.video;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.mogo.och.taxi.passenger.R;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class RecyclerVideoAdapter extends RecyclerView.Adapter<RecyclerItemVideoHolder> {
|
||||
private final static String TAG = "RecyclerBaseAdapter";
|
||||
|
||||
private List<String> itemDataList = null;
|
||||
private Context context = null;
|
||||
|
||||
public RecyclerVideoAdapter(Context context, List<String> itemDataList) {
|
||||
this.itemDataList = itemDataList;
|
||||
this.context = context;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public RecyclerItemVideoHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
View v = LayoutInflater.from(context).inflate(R.layout.list_video_item_normal, parent, false);
|
||||
return new RecyclerItemVideoHolder(context, v);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull final RecyclerItemVideoHolder holder, int position) {
|
||||
holder.onBind(position, itemDataList.get(position));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return itemDataList.size();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getItemViewType(int position) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
public void setListData(List<String> data) {
|
||||
itemDataList = data;
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
package com.mogo.och.taxi.passenger.ui.video
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import android.widget.RelativeLayout
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.d
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
|
||||
import com.mogo.och.taxi.passenger.R
|
||||
import io.reactivex.disposables.Disposable
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* 蘑菇咨询
|
||||
* Created on 2022/5/16
|
||||
*/
|
||||
class TaxiPassengerMogoConsultView :RelativeLayout {
|
||||
|
||||
constructor(context: Context?) : super(context)
|
||||
|
||||
constructor(context: Context?, attributeSet: AttributeSet) : super(context, attributeSet)
|
||||
|
||||
constructor(context: Context?, attributeSet: AttributeSet, defStyleAttr: Int) : super(context, attributeSet, defStyleAttr)
|
||||
|
||||
constructor(context: Context?, attributeSet: AttributeSet, defStyleAttr: Int, defStyleRes: Int) : super(context, attributeSet, defStyleAttr, defStyleRes)
|
||||
|
||||
|
||||
private lateinit var rvVideoPlaylist: RecyclerView
|
||||
|
||||
private var subscribe: Disposable?=null
|
||||
|
||||
private fun initView(context: Context) {
|
||||
d(SceneConstant.M_TAXI_P + TAG, "initView")
|
||||
LayoutInflater.from(context).inflate(R.layout.taxi_p_arrived_mogo_consult, this, true)
|
||||
rvVideoPlaylist = findViewById(R.id.rv_video_playlist)
|
||||
|
||||
val arrayListOf = ArrayList<String>()
|
||||
arrayListOf.add("")
|
||||
arrayListOf.add("")
|
||||
val recyclerVideoAdapter = RecyclerVideoAdapter(context, arrayListOf)
|
||||
val linearLayoutManager = LinearLayoutManager(context, RecyclerView.HORIZONTAL, false)
|
||||
rvVideoPlaylist.layoutManager = linearLayoutManager
|
||||
rvVideoPlaylist.adapter = recyclerVideoAdapter
|
||||
}
|
||||
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
subscribe?.let {
|
||||
if (!it.isDisposed) {
|
||||
it.dispose()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
companion object {
|
||||
const val TAG = "TaxiPassengerMogoConsultView"
|
||||
}
|
||||
|
||||
init {
|
||||
try {
|
||||
initView(context)
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
package com.mogo.och.taxi.passenger.utils.windowdispatch;
|
||||
|
||||
import android.graphics.Region;
|
||||
import android.inputmethodservice.InputMethodService;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.InvocationHandler;
|
||||
import java.lang.reflect.Method;
|
||||
import java.lang.reflect.Proxy;
|
||||
|
||||
public class OnComputeInternalInsetsListener implements InvocationHandler {
|
||||
|
||||
private Region touchRegion = null;
|
||||
public Object getListener() {
|
||||
Object target = null;
|
||||
try {
|
||||
Class class1 = Class.forName("android.view.ViewTreeObserver$OnComputeInternalInsetsListener");
|
||||
target = Proxy.newProxyInstance(OnComputeInternalInsetsListener.class.getClassLoader(),
|
||||
new Class[]{class1}, this);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return target;
|
||||
}
|
||||
|
||||
public Region getTouchRegion() {
|
||||
return touchRegion;
|
||||
}
|
||||
|
||||
public void setTouchRegion(Region touchRegion) {
|
||||
this.touchRegion = touchRegion;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object invoke(Object proxy, Method method, Object[] args) {
|
||||
try {
|
||||
Field regionField = args[0].getClass()
|
||||
.getDeclaredField("touchableRegion");
|
||||
regionField.setAccessible(true);
|
||||
Field insetField = args[0].getClass()
|
||||
.getDeclaredField("mTouchableInsets");
|
||||
insetField.setAccessible(true);
|
||||
if (touchRegion != null) {
|
||||
Region region = (Region) regionField.get(args[0]);
|
||||
region.set(touchRegion);
|
||||
insetField.set(args[0], InputMethodService.Insets.TOUCHABLE_INSETS_REGION);
|
||||
} else {
|
||||
insetField.set(args[0], InputMethodService.Insets.TOUCHABLE_INSETS_FRAME);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
package com.mogo.och.taxi.passenger.utils.windowdispatch;
|
||||
|
||||
import android.view.ViewTreeObserver;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class ReflectionUtils {
|
||||
|
||||
private ReflectionUtils() {
|
||||
|
||||
}
|
||||
|
||||
public static void removeOnComputeInternalInsetsListener(ViewTreeObserver viewTree) {
|
||||
if (viewTree == null) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
Class<?> clazz = Class.forName("android.view.ViewTreeObserver");
|
||||
Field field = viewTree.getClass().getDeclaredField("mOnComputeInternalInsetsListeners");
|
||||
field.setAccessible(true);
|
||||
Object listenerList = field.get(viewTree);
|
||||
Method method = listenerList.getClass().getDeclaredMethod("getArray");
|
||||
method.setAccessible(true);
|
||||
ArrayList<Object> list = (ArrayList<Object>) method.invoke(listenerList);
|
||||
Class<?> classes[] = {Class.forName("android.view.ViewTreeObserver$OnComputeInternalInsetsListener")};
|
||||
if (list != null && list.size() > 0) {
|
||||
clazz.getDeclaredMethod("removeOnComputeInternalInsetsListener", classes).invoke(viewTree,
|
||||
list.get(0));
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public static void addOnComputeInternalInsetsListener(ViewTreeObserver viewTree, Object object) {
|
||||
if (viewTree == null) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
Class<?> classes[] = {Class.forName("android.view.ViewTreeObserver$OnComputeInternalInsetsListener")};
|
||||
Class<?> clazz = Class.forName("android.view.ViewTreeObserver");
|
||||
clazz.getDeclaredMethod("addOnComputeInternalInsetsListener", classes).invoke(viewTree,
|
||||
object);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,224 @@
|
||||
package com.mogo.och.taxi.passenger.widget
|
||||
|
||||
import android.content.Context
|
||||
import android.os.Build
|
||||
import android.util.AttributeSet
|
||||
import android.view.Surface
|
||||
import android.view.View
|
||||
import android.widget.ImageView
|
||||
import android.widget.TextView
|
||||
import com.mogo.eagle.core.utilcode.util.TimeTransformUtils
|
||||
import com.mogo.eagle.core.widget.media.video.TextureVideoViewOutlineProvider
|
||||
import com.mogo.och.taxi.passenger.R
|
||||
import com.shuyu.gsyvideoplayer.GSYVideoManager
|
||||
import com.shuyu.gsyvideoplayer.utils.GSYVideoType
|
||||
import com.shuyu.gsyvideoplayer.video.StandardGSYVideoPlayer
|
||||
import com.shuyu.gsyvideoplayer.video.base.GSYVideoView
|
||||
import com.shuyu.gsyvideoplayer.video.base.GSYVideoViewBridge
|
||||
|
||||
/**
|
||||
* @author lixiaopeng
|
||||
* @since 2021/11/3
|
||||
*
|
||||
* 视频播放器,ui定制
|
||||
*/
|
||||
class ConsultVideoPlayer : StandardGSYVideoPlayer {
|
||||
|
||||
companion object {
|
||||
const val PLAY_EVT_PLAY_LOADING = 1000
|
||||
const val PLAY_EVT_PLAY_BEGIN = 2000
|
||||
const val PLAY_EVT_PLAY_ERROR = 3000
|
||||
}
|
||||
|
||||
private var playListener: PlayListener? = null
|
||||
private lateinit var start: ImageView
|
||||
private lateinit var coverImage: ImageView
|
||||
private lateinit var currentTimeTextView: TextView
|
||||
private lateinit var totalTimeTextView: TextView
|
||||
|
||||
interface PlayListener {
|
||||
fun onPlayEvent(event: Int)
|
||||
}
|
||||
|
||||
constructor(context: Context?) : super(context)
|
||||
constructor(context: Context?, attrs: AttributeSet?) : super(context, attrs)
|
||||
constructor(context: Context?, fullFlag: Boolean?) : super(context, fullFlag)
|
||||
|
||||
override fun init(context: Context) {
|
||||
super.init(context)
|
||||
start = findViewById(R.id.start)
|
||||
coverImage = findViewById(R.id.thumbImage)
|
||||
currentTimeTextView = findViewById(R.id.current)
|
||||
totalTimeTextView = findViewById(R.id.total)
|
||||
|
||||
if (mThumbImageViewLayout != null
|
||||
&& (mCurrentState == -1 || mCurrentState == CURRENT_STATE_NORMAL || mCurrentState == CURRENT_STATE_ERROR)
|
||||
) {
|
||||
mThumbImageViewLayout.visibility = View.VISIBLE
|
||||
}
|
||||
GSYVideoType.setShowType(GSYVideoType.SCREEN_TYPE_16_9)
|
||||
}
|
||||
|
||||
override fun getLayoutId(): Int {
|
||||
return R.layout.taxi_p_video_show
|
||||
}
|
||||
|
||||
override fun getGSYVideoManager(): GSYVideoViewBridge {
|
||||
GSYVideoManager.instance().initContext(context.applicationContext)
|
||||
return GSYVideoManager.instance()
|
||||
}
|
||||
|
||||
override fun updateStartImage() {
|
||||
when (mCurrentState) {
|
||||
GSYVideoView.CURRENT_STATE_PLAYING ->
|
||||
start.setImageResource(R.drawable.notice_video_pause)
|
||||
GSYVideoView.CURRENT_STATE_ERROR ->
|
||||
start.setImageResource(R.drawable.notice_video_pause)
|
||||
else -> start.setImageResource(R.drawable.notice_video_after_pause)
|
||||
}
|
||||
}
|
||||
|
||||
override fun setProgressAndTime(
|
||||
progress: Int,
|
||||
secProgress: Int,
|
||||
currentTime: Int,
|
||||
totalTime: Int,
|
||||
forceChange: Boolean
|
||||
) {
|
||||
super.setProgressAndTime(progress, secProgress, currentTime, totalTime, forceChange)
|
||||
mBottomContainer?.visibility = View.VISIBLE
|
||||
mProgressBar?.visibility = View.VISIBLE
|
||||
start.visibility = View.VISIBLE
|
||||
//时间显示
|
||||
currentTimeTextView.text = TimeTransformUtils.stringForTime(currentTime)
|
||||
totalTimeTextView.text = TimeTransformUtils.stringForTime(totalTime)
|
||||
|
||||
if (progress != 0) {
|
||||
mProgressBar?.progress = progress
|
||||
}
|
||||
}
|
||||
|
||||
fun setPlayListener(listener: PlayListener) {
|
||||
this.playListener = listener
|
||||
}
|
||||
|
||||
override fun changeUiToCompleteShow() {
|
||||
super.changeUiToCompleteShow()
|
||||
}
|
||||
|
||||
override fun hideAllWidget() {
|
||||
super.hideAllWidget()
|
||||
mBottomContainer?.visibility = View.VISIBLE
|
||||
mProgressBar?.visibility = View.VISIBLE
|
||||
start?.visibility = View.VISIBLE
|
||||
start.setImageResource(R.drawable.notice_video_pause)
|
||||
}
|
||||
|
||||
override fun changeUiToPrepareingClear() {
|
||||
super.changeUiToPrepareingClear()
|
||||
mBottomContainer?.visibility = View.INVISIBLE
|
||||
mProgressBar?.visibility = View.GONE
|
||||
}
|
||||
|
||||
override fun changeUiToPlayingBufferingClear() {
|
||||
super.changeUiToPlayingBufferingClear()
|
||||
mBottomContainer?.visibility = View.INVISIBLE
|
||||
mProgressBar?.visibility = View.GONE
|
||||
|
||||
}
|
||||
|
||||
// override fun changeUiToClear() {
|
||||
// super.changeUiToClear()
|
||||
// }
|
||||
|
||||
override fun changeUiToCompleteClear() {
|
||||
super.changeUiToCompleteClear()
|
||||
mBottomContainer?.visibility = View.INVISIBLE
|
||||
mProgressBar?.visibility = View.GONE
|
||||
}
|
||||
|
||||
override fun onAutoCompletion() {
|
||||
super.onAutoCompletion()
|
||||
}
|
||||
|
||||
override fun showWifiDialog() {
|
||||
//直接播放,不显示WIFI对话框
|
||||
startPlayLogic()
|
||||
}
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
|
||||
mProgressBar?.progress = 0
|
||||
mFullPauseBitmap = null
|
||||
}
|
||||
|
||||
override fun onClick(v: View?) {
|
||||
super.onClick(v)
|
||||
}
|
||||
|
||||
override fun onCompletion() {
|
||||
mBottomContainer?.visibility = View.VISIBLE
|
||||
mProgressBar?.visibility = View.VISIBLE
|
||||
start.visibility = View.VISIBLE
|
||||
start.setImageResource(R.drawable.notice_video_after_pause)
|
||||
|
||||
isPostBufferUpdate = false
|
||||
}
|
||||
|
||||
override fun onSurfaceUpdated(surface: Surface) {
|
||||
super.onSurfaceUpdated(surface)
|
||||
if (mThumbImageViewLayout != null && mThumbImageViewLayout.visibility == View.VISIBLE) {
|
||||
mThumbImageViewLayout.visibility = View.INVISIBLE
|
||||
}
|
||||
}
|
||||
|
||||
override fun onPrepared() {
|
||||
super.onPrepared()
|
||||
|
||||
playListener?.onPlayEvent(PLAY_EVT_PLAY_LOADING)
|
||||
}
|
||||
|
||||
private var isPostBufferUpdate = false
|
||||
|
||||
override fun onBufferingUpdate(percent: Int) {
|
||||
super.onBufferingUpdate(percent)
|
||||
if (!isPostBufferUpdate && percent == 0) {
|
||||
isPostBufferUpdate = true
|
||||
playListener?.onPlayEvent(PLAY_EVT_PLAY_BEGIN)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onError(what: Int, extra: Int) {
|
||||
super.onError(what, extra)
|
||||
playListener?.onPlayEvent(PLAY_EVT_PLAY_ERROR)
|
||||
isPostBufferUpdate = false
|
||||
}
|
||||
|
||||
override fun setViewShowState(view: View?, visibility: Int) {
|
||||
if (view === mThumbImageViewLayout && visibility != View.VISIBLE) {
|
||||
return
|
||||
}
|
||||
super.setViewShowState(view, visibility)
|
||||
}
|
||||
|
||||
override fun onSurfaceAvailable(surface: Surface) {
|
||||
super.onSurfaceAvailable(surface)
|
||||
mProgressBar?.visibility = View.GONE
|
||||
if (GSYVideoType.getRenderType() != GSYVideoType.TEXTURE) {
|
||||
if (mThumbImageViewLayout != null && mThumbImageViewLayout.visibility == View.VISIBLE) {
|
||||
mThumbImageViewLayout.visibility = View.INVISIBLE
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onSizeChanged(w: Int, h: Int, oldw: Int, oldh: Int) {
|
||||
super.onSizeChanged(w, h, oldw, oldh)
|
||||
if (!mIfCurrentIsFullscreen) {
|
||||
this.outlineProvider = TextureVideoViewOutlineProvider(40F)
|
||||
this.clipToOutline = true
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
After Width: | Height: | Size: 193 KiB |
|
After Width: | Height: | Size: 192 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 187 KiB |
|
After Width: | Height: | Size: 183 KiB |
|
After Width: | Height: | Size: 186 KiB |
|
After Width: | Height: | Size: 188 KiB |
|
After Width: | Height: | Size: 288 KiB |
|
After Width: | Height: | Size: 193 KiB |
|
After Width: | Height: | Size: 192 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 187 KiB |
|
After Width: | Height: | Size: 183 KiB |
|
After Width: | Height: | Size: 186 KiB |
|
After Width: | Height: | Size: 188 KiB |
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<gradient android:startColor="#a3000000" android:endColor="#00000000" android:angle="90"/>
|
||||
</shape>
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="oval">
|
||||
<solid android:color="@color/taxi_order_status_textColor"/>
|
||||
<size android:width="24px" android:height="24px"/>
|
||||
</shape>
|
||||
@@ -0,0 +1,6 @@
|
||||
<vector android:height="24dp" android:tint="#8BA3DC"
|
||||
android:viewportHeight="24" android:viewportWidth="24"
|
||||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="@android:color/white" android:pathData="M10,17l5,-5 -5,-5v10z">
|
||||
</path>
|
||||
</vector>
|
||||
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:id="@android:id/background">
|
||||
<shape>
|
||||
<corners android:radius="5px"/>
|
||||
<solid android:color="#33D8D8D8" />
|
||||
</shape>
|
||||
</item>
|
||||
<item android:id="@android:id/secondaryProgress">
|
||||
<clip>
|
||||
<shape>
|
||||
<corners android:radius="5px"/>
|
||||
<solid android:color="#66FFFFFF" />
|
||||
</shape>
|
||||
</clip>
|
||||
</item>
|
||||
<item android:id="@android:id/progress">
|
||||
<clip>
|
||||
<shape>
|
||||
<corners android:radius="5px"/>
|
||||
<gradient android:startColor="#2972FF" android:endColor="#27C8FF"/>
|
||||
</shape>
|
||||
</clip>
|
||||
</item>
|
||||
</layer-list>
|
||||
@@ -0,0 +1,11 @@
|
||||
<?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="wrap_content">
|
||||
|
||||
<com.mogo.och.taxi.passenger.widget.ConsultVideoPlayer
|
||||
android:id="@+id/video_item_player"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
</FrameLayout>
|
||||
@@ -0,0 +1,45 @@
|
||||
<?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:id="@+id/cl_contain"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/cardview_dark_background"
|
||||
tools:ignore="MissingDefaultResource">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/aciv_title_icon"
|
||||
android:src="@drawable/taxi_p_mogo_consult_title_icon"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:layout_marginTop="@dimen/dp_130"
|
||||
android:layout_marginStart="@dimen/dp_100"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_mogo_consult"
|
||||
app:layout_constraintTop_toTopOf="@+id/aciv_title_icon"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/aciv_title_icon"
|
||||
app:layout_constraintStart_toEndOf="@+id/aciv_title_icon"
|
||||
android:layout_marginStart="@dimen/dp_13"
|
||||
android:text="蘑菇咨询"
|
||||
android:textSize="60px"
|
||||
android:textColor="@color/taxi_order_status_textColor"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_video_playlist"
|
||||
android:layout_width="1734px"
|
||||
android:layout_height="973px"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginTop="@dimen/dp_130"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_mogo_consult"/>
|
||||
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -0,0 +1,88 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/item_video_cover"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/surface_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"/>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/thumb"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
<ImageView
|
||||
android:id="@+id/thumbImage"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_centerInParent="true"
|
||||
android:scaleType="fitXY" />
|
||||
</RelativeLayout>
|
||||
|
||||
<!--局部播放器-->
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/layout_bottom"
|
||||
android:layout_width="match_parent"
|
||||
android:background="@drawable/bg_taxi_p_video_bg"
|
||||
android:layout_height="158px"
|
||||
app:layout_constraintBottom_toBottomOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/start"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/total"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/total"
|
||||
android:layout_marginStart="35px"
|
||||
android:layout_width="@dimen/notice_play_height"
|
||||
android:layout_height="@dimen/notice_play_height"
|
||||
android:src="@drawable/notice_video_pause" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/current"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintStart_toEndOf="@+id/start"
|
||||
app:layout_constraintTop_toTopOf="@+id/total"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/total"
|
||||
android:layout_marginStart="35px"
|
||||
android:gravity="bottom"
|
||||
android:text="02:23"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="36px" />
|
||||
|
||||
<SeekBar
|
||||
android:id="@+id/progress"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="20px"
|
||||
android:layout_marginEnd="20px"
|
||||
app:layout_constraintStart_toEndOf="@+id/current"
|
||||
app:layout_constraintEnd_toStartOf="@+id/total"
|
||||
app:layout_constraintTop_toTopOf="@+id/total"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/total"
|
||||
android:max="100"
|
||||
android:maxHeight="10px"
|
||||
android:minHeight="10px"
|
||||
android:progressDrawable="@drawable/taxi_video_seekbar_style"
|
||||
android:thumb="@drawable/bg_taxi_p_video_index" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/total"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/notice_time_bottom"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:layout_marginTop="64px"
|
||||
android:gravity="bottom"
|
||||
android:text="08:66"
|
||||
android:layout_marginEnd="47px"
|
||||
android:textSize="36px"
|
||||
android:textColor="@android:color/white"/>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -0,0 +1,37 @@
|
||||
<?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:background="@drawable/taxi_p_left_flow_bg"
|
||||
android:clickable="false"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:ignore="MissingDefaultResource">
|
||||
|
||||
<ListView
|
||||
android:id="@+id/lv_select_item"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_marginEnd="143px"
|
||||
android:divider="@null"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/v_drag_field"
|
||||
app:layout_constraintStart_toEndOf="@+id/lv_select_item"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_width="143px"
|
||||
android:layout_height="408px">
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:src="@drawable/ic_baseline_arrow_right_24"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout >
|
||||
@@ -54,7 +54,8 @@ android {
|
||||
}
|
||||
protobuf {
|
||||
protoc {
|
||||
artifact = rootProject.ext.dependencies.protoc
|
||||
//artifact = rootProject.ext.dependencies.protoc
|
||||
path = "/opt/homebrew/Cellar/protobuf@3.6/3.6.1.3_4/bin/protoc"
|
||||
}
|
||||
generateProtoTasks {
|
||||
all().each { task ->
|
||||
|
||||
@@ -36,7 +36,8 @@ android {
|
||||
|
||||
protobuf {
|
||||
protoc {
|
||||
artifact = rootProject.ext.dependencies.protoc
|
||||
//artifact = rootProject.ext.dependencies.protoc
|
||||
path = "/opt/homebrew/Cellar/protobuf@3.6/3.6.1.3_4/bin/protoc"
|
||||
}
|
||||
|
||||
generateProtoTasks {
|
||||
|
||||