Commit eaabe341 by 刘鹏

feat: 1.RelativeLayout转换异常

      2.图片预览编辑崩溃问题修复
      3.冥想Timer cancel问题修复
      4.获取未读消息导致崩溃问题修复
      5.listAllUrl空导致崩溃问题修复
      6.雅卿埋点需求
      7.筛选EditText空问题修复
      8.咨询助理浮层bug修复
parent e3d02156
......@@ -14,7 +14,7 @@ buildscript {
ydlrouter_version = '1.2.3'
constrait_support_version = '1.0.2'
componentVersion = "0.3.0.31"
componentVersion = "0.3.0.32"
}
repositories {
mavenCentral()
......
......@@ -131,8 +131,8 @@ ext {
"flowlayout" : "cn.lankton:flowlayout:3.1.0",
"androidanimations" : "com.daimajia.androidanimations:library:2.3@aar",
//友盟统计
"umeng-common" : "com.umeng.umsdk:common:9.3.8",
"umeng-asms" : "com.umeng.umsdk:asms:1.2.2",
"umeng-common" : "com.umeng.umsdk:common:9.4.4",
"umeng-asms" : "com.umeng.umsdk:asms:1.4.1",
//友盟社会化分享
"umeng-share-core" : "com.umeng.umsdk:share-core:7.1.4",
"umeng-share-qq" : "com.umeng.umsdk:share-qq:7.1.4",
......@@ -160,7 +160,7 @@ ext {
"exoplayer" : "com.google.android.exoplayer:exoplayer:2.9.0",
"free_reflection" : "me.weishu:free_reflection:2.0.0",
"imagepicker" : "com.ydl:imagepicker:1.0.8.2",
"pictureselector" : "com.ydl:pictureselector:1.2.0",
"pictureselector" : "com.ydl:pictureselector:1.2.2",
"protector" : "com.ydl:protector:1.0.12@aar",
"blankUtil" : "com.blankj:utilcode:1.25.9",
"ydl-hnet" : "com.ydl:h-net:0.0.8",
......
......@@ -113,4 +113,24 @@ class ConsultBIConstants {
const val RECENT_CITY = "recent_city"
}
}
class Experts {
companion object {
//part_id
const val EXPERTS_DETAIL = "ydl_experts_detail|"
//2.专家主页_背景图私聊点击 sign1: 咨询师id
const val EXPERT_BANNER_PRIVATE_CHAT_CLICK =
EXPERTS_DETAIL + "expert_banner_private_chat_click"
//3.专家主页_背景图预约点击 sign1: 咨询师id
const val EXPERT_BANNER_IMMEDIATELY_BOOKING_CLICK = EXPERTS_DETAIL +
"expert_banner_immediately_booking_click"
//3.专家主页_背景图预约点击 sign1: 咨询师id
const val BOOKING_PRODUCT_POPUP_PAGE_CLICK = EXPERTS_DETAIL +
"booking_product_popup_page_click"
}
}
}
\ No newline at end of file
......@@ -13,11 +13,6 @@ import android.view.View
import android.view.WindowManager
import com.facebook.drawee.backends.pipeline.Fresco
import com.facebook.drawee.interfaces.DraweeController
import com.facebook.imagepipeline.common.ResizeOptions
import com.facebook.imagepipeline.common.RotationOptions
import com.facebook.imagepipeline.postprocessors.IterativeBoxBlurPostProcessor
import com.facebook.imagepipeline.request.ImageRequest
import com.facebook.imagepipeline.request.ImageRequestBuilder
import com.yidianling.common.tools.RxImageTool
import com.yidianling.consultant.R
import com.yidianling.consultant.modular.singlton.ConsultAssistantDialogUtils
......@@ -33,7 +28,6 @@ class ConsultAssistantDialog(
mContext: Context,
val consultAssistantClickListener: OnConsultAssistantClickListener?
) : Dialog(mContext, R.style.consultant_expert_dialog_default_style) {
private var animate: ObjectAnimator? = null
private var minWidth: Int? = null
......@@ -41,16 +35,16 @@ class ConsultAssistantDialog(
super.onCreate(savedInstanceState)
setContentView(R.layout.consultant_expert_consult_assistant_popup_window)
val params = window.attributes
params.width = WindowManager.LayoutParams.WRAP_CONTENT
params.height = WindowManager.LayoutParams.WRAP_CONTENT
params.gravity = Gravity.RIGHT + Gravity.BOTTOM
params.verticalMargin = 0.07f
params.flags = WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE //不拦截外部点击事件
window.attributes = params
window.setDimAmount(0f)
val params = window?.attributes
params?.width = WindowManager.LayoutParams.WRAP_CONTENT
params?.height = WindowManager.LayoutParams.WRAP_CONTENT
params?.gravity = Gravity.RIGHT + Gravity.BOTTOM
params?.verticalMargin = 0.07f
params?.flags = WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE //不拦截外部点击事件
window?.attributes = params
window?.setDimAmount(0f)
window.setWindowAnimations(R.style.consultant_expert_consult_assistant_dialog_animate)
window?.setWindowAnimations(R.style.consultant_expert_consult_assistant_dialog_animate)
if (!ConsultAssistantDialogUtils.INSTANCE.canShowDesc()) {
consultant_assistant_dialog_desc_ll.visibility = View.GONE
......@@ -84,14 +78,16 @@ class ConsultAssistantDialog(
}
override fun onAnimationEnd(animation: Animator?) {
if (ownerActivity != null) {
ConsultAssistantDialogUtils.INSTANCE.setDescHide()
hide()
// show()
Handler().postDelayed({
show()
}, 10)
}
}
override fun onAnimationCancel(animation: Animator?) {
}
......@@ -130,21 +126,21 @@ class ConsultAssistantDialog(
// 刷新dialog布局,减小拦截点击区域
fun refreshDialogLayout(width: Int) {
val params = window.attributes
val params = window?.attributes
if (width != 0) {
minWidth = width
minWidth = if (width != 0) {
width
} else {
minWidth = (RxImageTool.dp2px(60f) * 1.5).toInt()
(RxImageTool.dp2px(60f) * 1.5).toInt()
}
params.width = minWidth!!
params.height = WindowManager.LayoutParams.WRAP_CONTENT
params.gravity = Gravity.RIGHT + Gravity.BOTTOM
params.verticalMargin = 0.07f
params.horizontalMargin = 0.01f
window.setWindowAnimations(0)
window.attributes = params
params?.width = minWidth
params?.height = WindowManager.LayoutParams.WRAP_CONTENT
params?.gravity = Gravity.RIGHT + Gravity.BOTTOM
params?.verticalMargin = 0.07f
params?.horizontalMargin = 0.01f
window?.setWindowAnimations(0)
window?.attributes = params
}
interface OnConsultAssistantClickListener {
......
......@@ -13,13 +13,14 @@ import androidx.fragment.app.FragmentStatePagerAdapter
import androidx.viewpager.widget.ViewPager
import com.ydl.ydlcommon.modular.ModularServiceManager
import com.ydl.ydlcommon.utils.StatusBarUtils
import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import com.yidianling.consultant.R
import com.yidianling.consultant.constants.ConsultBIConstants
import com.yidianling.consultant.preview.GPreviewBuilder.IndicatorType
import com.yidianling.consultant.preview.SmoothImageView.onTransformListener
import com.yidianling.im.api.listener.ApiStringResponseCallback
import com.yidianling.im.api.service.IImService
import kotlinx.android.synthetic.main.consultant_image_preview_photo.*
import kotlinx.android.synthetic.main.fragment_image_photo_layout.*
import java.util.*
/**
......@@ -88,6 +89,7 @@ class GPreviewActivity : AppCompatActivity() {
titleBar = findViewById(R.id.titleBar)
chatBtn.setOnClickListener {
//私聊
if (!toUid.isNullOrBlank()) {
ModularServiceManager.provide(IImService::class.java)
.startChat(this@GPreviewActivity, toUid.toString(), 0x001, 0, 0, false)
......@@ -102,14 +104,32 @@ class GPreviewActivity : AppCompatActivity() {
}
}, 2000)
ActionCountUtils.count(
ConsultBIConstants.Experts.EXPERT_BANNER_PRIVATE_CHAT_CLICK,
toUid.toString()
)
}
}
bookingBtn.setOnClickListener {
toUid?.let { toUid ->
doctorId?.let { doctorId ->
ModularServiceManager.provide(IImService::class.java)
.showConsultServiceDialog(activity = this, toUid = toUid!!, doctorId = doctorId!!)
.showConsultServiceDialog(
activity = this,
toUid = toUid,
doctorId = doctorId
)
}
ActionCountUtils.count(
ConsultBIConstants.Experts.EXPERT_BANNER_IMMEDIATELY_BOOKING_CLICK,
toUid
)
}
}
......
......@@ -4,21 +4,14 @@ import android.annotation.SuppressLint
import android.app.Activity
import android.content.Context
import android.graphics.drawable.BitmapDrawable
import android.text.*
import android.text.style.AbsoluteSizeSpan
import android.text.TextUtils
import android.util.Log
import android.view.KeyEvent
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.view.inputmethod.EditorInfo
import android.view.inputmethod.InputMethodManager
import android.widget.*
import com.bumptech.glide.Glide
import com.google.android.material.slider.LabelFormatter
import com.google.android.material.slider.RangeSlider
import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import com.yidianling.common.tools.LogUtil
import com.yidianling.common.tools.RxDeviceTool
import com.yidianling.common.tools.RxImageTool
import com.yidianling.common.tools.RxKeyboardTool
......@@ -29,10 +22,7 @@ import com.yidianling.consultant.model.bean.AllFilter
import com.yidianling.consultant.model.bean.Filters
import com.yidianling.consultant.model.bean.PriceRangesItem
import com.yidianling.consultant.model.bean.ReorderItem
import com.yidianling.consultant.ui.view.rangeseekbar.OnRangeChangedListener
import com.yidianling.consultant.ui.view.rangeseekbar.RangeSeekBar
import kotlinx.android.synthetic.main.consultant_item_filter.view.*
import kotlinx.android.synthetic.main.consultant_item_price_range.view.*
import kotlinx.android.synthetic.main.consultant_ui_filter_popup.view.*
import kotlin.math.roundToInt
......@@ -51,7 +41,6 @@ class FilterPopupWindow(
private val showTypeViews: ArrayList<View> = ArrayList()
private val enquiryViews: ArrayList<View> = ArrayList()
private val priceRangeViews: ArrayList<View> = ArrayList()
private val ageViews: ArrayList<View> = ArrayList()
private val otherViews: ArrayList<View> = ArrayList()
private val ziZhiViews: ArrayList<View> = ArrayList()
......@@ -69,9 +58,6 @@ class FilterPopupWindow(
private val popWidth = (RxDeviceTool.getScreenWidth(context))
var etMinPrice: EditText? = null
var etMaxPrice: EditText? = null
init {
val view = LayoutInflater.from(context).inflate(R.layout.consultant_ui_filter_popup, null)
......@@ -180,13 +166,8 @@ class FilterPopupWindow(
@SuppressLint("ClickableViewAccessibility")
private fun initKeyboardListener(view: View) {
val svFilter = view.findViewById<ScrollView>(R.id.sv_filter)
val imm = context.getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager
svFilter.setOnTouchListener { _, _ ->
if (imm.isActive(etMinPrice) || imm.isActive(etMaxPrice)) {
RxKeyboardTool.hideSoftInput(context, etMaxPrice)
RxKeyboardTool.hideSoftInput(context, etMinPrice)
}
false
}
......@@ -691,21 +672,14 @@ class FilterPopupWindow(
private fun updatePriceFilter() {
RxKeyboardTool.hideSoftInput(context, etMaxPrice)
RxKeyboardTool.hideSoftInput(context, etMinPrice)
if (tempFilter.priceRanges == null) {
val priceRangesItem = PriceRangesItem()
tempFilter.priceRanges = priceRangesItem;
}
tempFilter.priceRanges!!.max_price = etMaxPrice?.text.toString()
tempFilter.priceRanges!!.min_price = etMinPrice?.text.toString()
tempFilter.priceRangesView?.isSelected = false
tempFilter.priceRangesView?.paint?.isFakeBoldText = false
tempFilter.priceRangesView = null
etMinPrice?.clearFocus()
etMaxPrice?.clearFocus()
updateCount(ConsultBIConstants.POSITION_AVERAGE_SERVICE_INPUT)
}
......
......@@ -6,6 +6,7 @@ import android.content.Context
import android.content.Intent
import android.view.View
import android.widget.ImageView
import android.widget.RelativeLayout
import com.alibaba.android.arouter.launcher.ARouter
import com.dou361.ijkplayer.widget.PlayStateParams
import com.dou361.ijkplayer.widget.PlayerView
......@@ -18,7 +19,6 @@ import com.yidianling.common.tools.RxImageTool
import com.yidianling.course.R
import com.yidianling.course.coursePlay.CoursePlayActivity
import com.yidianling.course.flutterPlugin.CourseSendPlugin
import com.yidianling.course.uitls.VideoProgressUtil
import java.util.*
/**
......@@ -78,7 +78,7 @@ object VideoFloatHelper {
}
}
val videoLayout = it.findViewById<ImageView>(R.id.app_video_box)
val videoLayout = it.findViewById<RelativeLayout>(R.id.app_video_box)
try {
initVideoPlayer(activity, videoLayout)
......
......@@ -14,15 +14,6 @@ import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.os.Parcelable;
import androidx.cardview.widget.CardView;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.fragment.app.Fragment;
import androidx.core.content.ContextCompat;
import androidx.appcompat.app.AlertDialog;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import android.provider.Settings;
import android.text.Editable;
import android.text.InputFilter;
......@@ -41,7 +32,14 @@ import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.blankj.utilcode.util.DeviceUtils;
import androidx.appcompat.app.AlertDialog;
import androidx.cardview.widget.CardView;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.core.content.ContextCompat;
import androidx.fragment.app.Fragment;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.luck.picture.lib.entity.LocalMedia;
import com.luck.picture.lib.listener.OnResultCallbackListener;
import com.tbruyelle.rxpermissions2.RxPermissions;
......@@ -55,8 +53,8 @@ import com.ydl.ydlcommon.base.BaseApp;
import com.ydl.ydlcommon.base.BaseFragment;
import com.ydl.ydlcommon.data.http.BaseResponse;
import com.ydl.ydlcommon.router.YdlCommonOut;
import com.ydl.ydlcommon.ui.ParcelableImage;
import com.ydl.ydlcommon.utils.BuryPointUtils;
import com.ydl.ydlcommon.utils.DisplayUtils;
import com.ydl.ydlcommon.utils.MoonUtil;
import com.ydl.ydlcommon.utils.SharedPreferencesEditor;
import com.ydl.ydlcommon.utils.StringUtils;
......@@ -64,9 +62,8 @@ import com.ydl.ydlcommon.view.dialog.CommonDialog;
import com.ydl.ydlcommon.view.dialog.NormalDialog;
import com.yidianling.common.tools.LogUtil;
import com.yidianling.common.tools.RxFileTool;
import com.yidianling.dynamic.BuildConfig;
import com.yidianling.dynamic.bean.DynamicConstants;
import com.yidianling.dynamic.R;
import com.yidianling.dynamic.bean.DynamicConstants;
import com.yidianling.dynamic.bean.DynamicDraftBean;
import com.yidianling.dynamic.common.browsePictures.BrowsePicturesActivity;
import com.yidianling.dynamic.common.emoji.EmoticonPickerView;
......@@ -77,7 +74,6 @@ import com.yidianling.dynamic.event.DynamicSaveEvent;
import com.yidianling.dynamic.event.EditContentEvent;
import com.yidianling.dynamic.model.Command;
import com.yidianling.dynamic.model.PublishTrendResult;
import com.ydl.ydlcommon.ui.ParcelableImage;
import com.yidianling.dynamic.publishTrend.DynamicPublishImageAdapter;
import com.yidianling.dynamic.publishTrend.PublishTrendActivity;
import com.yidianling.dynamic.publishTrend.SelecTopicActivity;
......@@ -963,11 +959,52 @@ public class PublishQuestionAndTrendFragment extends BaseFragment implements Vie
}
if (Build.VERSION.SDK_INT>Build.VERSION_CODES.P){
for (int i = 0; i < list.size(); i++) {
AddImag(list.get(i).getAndroidQToPath());
LocalMedia localMedia = list.get(i);
String path;
if (!TextUtils.isEmpty(localMedia.getAndroidQToPath())) {
//android q路径
path = localMedia.getAndroidQToPath();
} else if (!TextUtils.isEmpty(localMedia.getCutPath())) {
//android 裁剪路径
path = localMedia.getCutPath();
} else if (!TextUtils.isEmpty(localMedia.getOriginalPath())) {
//android 初始路径
path = localMedia.getOriginalPath();
} else if (!TextUtils.isEmpty(localMedia.getCompressPath())) {
//android 压缩路径
path = localMedia.getCompressPath();
} else if (!TextUtils.isEmpty(localMedia.getRealPath())) {
//android 真实路径
path = localMedia.getRealPath();
} else {
path = localMedia.getPath();
}
if (!TextUtils.isEmpty(path)) {
AddImag(path);
}
}
}else{
for (int i = 0; i < list.size(); i++) {
AddImag(list.get(i).getPath());
LocalMedia localMedia = list.get(i);
String path;
if (!TextUtils.isEmpty(localMedia.getPath())) {
path = localMedia.getPath();
} else if (!TextUtils.isEmpty(localMedia.getCutPath())) {
//android 裁剪路径
path = localMedia.getCutPath();
} else if (!TextUtils.isEmpty(localMedia.getOriginalPath())) {
//android 初始路径
path = localMedia.getOriginalPath();
} else if (!TextUtils.isEmpty(localMedia.getCompressPath())) {
//android 压缩路径
path = localMedia.getCompressPath();
} else {
//android 真实路径
path = localMedia.getRealPath();
}
if (!TextUtils.isEmpty(path)) {
AddImag(path);
}
}
}
......
......@@ -45,7 +45,6 @@ import com.yidianling.tests.api.service.ITestsApiService
import com.yidianling.user.api.service.IUserService
import de.greenrobot.event.EventBus
import org.json.JSONObject
import java.net.URLDecoder
open class HomeBaseImpl : IHomeBaseEvent {
......@@ -565,7 +564,8 @@ open class HomeBaseImpl : IHomeBaseEvent {
YDLRouterManager.router(
IYDLRouterConstant.ROUTER_H5_H5,
YDLRouterParams().putExtra(IYDLRouterConstant.EXTRA_URL, bean.listAllUrl!!), ""
bean.listAllUrl?.let { YDLRouterParams().putExtra(IYDLRouterConstant.EXTRA_URL, it) },
""
)
}
......
......@@ -11,10 +11,12 @@ import com.netease.nimlib.sdk.msg.model.RecentContact;
import com.netease.nimlib.sdk.team.model.MemberChangeAttachment;
import com.yidianling.common.tools.LogUtil;
import com.yidianling.im.event.UpdateTabUnreadNumEvent;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import de.greenrobot.event.EventBus;
import io.reactivex.Observable;
import io.reactivex.android.schedulers.AndroidSchedulers;
......@@ -99,6 +101,7 @@ public class MsgReceiveHelper {
//更新未读数量及最近联系人列表
public static void reQueryUnreadNumber(MessageRefreshCallback callback) {
try {
NIMClient.getService(MsgService.class).queryRecentContacts()
.setCallback(new RequestCallbackWrapper<List<RecentContact>>() {
@Override
......@@ -121,6 +124,9 @@ public class MsgReceiveHelper {
}
}
});
} catch (Exception e) {
e.printStackTrace();
}
}
public static void markAllRead() {
......
......@@ -9,6 +9,7 @@ import com.ydl.webview.H5Params
import com.ydl.webview.NewH5Activity
import com.ydl.ydlcommon.base.config.HttpConfig
import com.ydl.ydlcommon.modular.ModularServiceManager
import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import com.ydl.ydlcommon.view.dialog.CommonDialog
import com.yidianling.im.R
import com.yidianling.im.config.constants.ImConstants
......@@ -176,6 +177,12 @@ class ExpertConsultServiceItemView : LinearLayout {
//新增需求,如果没有绑定手机号,跳转到绑定手机号页面
bindPhoneDialog()
}
ActionCountUtils.record(
"ydl_experts_detail",
"booking_product_popup_page_click",
"",
"2"
)
}
}
......
......@@ -9,7 +9,6 @@ import android.widget.SeekBar
import com.alibaba.android.arouter.facade.annotation.Route
import com.bumptech.glide.Glide
import com.bumptech.glide.load.resource.drawable.DrawableTransitionOptions
import com.ydl.media.audio.AudioPlayer
import com.ydl.media.view.PlayerFloatHelper
import com.ydl.webview.H5Params
import com.ydl.ydlcommon.base.BaseActivity
......@@ -40,9 +39,6 @@ import io.reactivex.disposables.Disposable
import io.reactivex.functions.Consumer
import io.reactivex.schedulers.Schedulers
import kotlinx.android.synthetic.main.activity_play_meditation.*
import kotlinx.android.synthetic.main.activity_play_meditation.iv_close
import kotlinx.android.synthetic.main.activity_play_meditation.tv_title
import kotlinx.android.synthetic.main.layout_meditation_play_float_view.*
import kotlinx.android.synthetic.main.player_control_view.*
import java.util.*
import java.util.concurrent.TimeUnit
......@@ -547,6 +543,8 @@ class PlayMeditationActivity : BaseActivity() {
if (duration != null) {
seekbar_play_progress.max = duration
}
mTimer.cancel()
mTimer = Timer()
mTimer.schedule(object : TimerTask() {
override fun run() {
if (!isSeekbarChanging) {
......@@ -874,6 +872,8 @@ class PlayMeditationActivity : BaseActivity() {
exo_duration.text = MediaPlayerTimeUtil.calculateTime(duration / 1000)
seekbar_play_progress.max = duration
mTimer.cancel()
mTimer = Timer()
mTimer.schedule(object : TimerTask() {
override fun run() {
if (!isSeekbarChanging) {
......@@ -909,7 +909,6 @@ class PlayMeditationActivity : BaseActivity() {
MediaPlayerTimeUtil.calculateTime(currentPosition / 1000)
}
exo_duration.text = MediaPlayerTimeUtil.calculateTime(duration / 1000)
mTimer.schedule(object : TimerTask() {
override fun run() {
if (!isSeekbarChanging) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment