Commit c6b43e16 by 范玉宾

to be test

parent deddb032
......@@ -8,13 +8,13 @@ ext {
"m-confide" : "0.0.49.69",
"m-consultant" : "0.0.60.16",
"m-fm" : "0.0.30.08",
"m-user" : "0.0.62.04",
"m-home" : "0.0.23.35",
"m-user" : "0.0.62.05",
"m-home" : "0.0.23.49",
"m-im" : "0.0.21.30",
"m-dynamic" : "0.0.7.35",
"m-article" : "0.0.0.10",
"m-muse" : "0.0.28.28",
"m-muse" : "0.0.28.29",
"m-tests" : "0.0.24.18",
"m-course" : "0.0.43.37",
......@@ -35,10 +35,10 @@ ext {
//mdt 组件
"ydl-tuicore" : "0.0.22",
//第一步
"ydl-platform" : "0.0.41.2",
"ydl-platform" : "0.0.41.5",
//第二步 若干
"ydl-webview" : "0.0.38.71",
"ydl-webview" : "0.0.38.73",
"ydl-media" : "0.0.21.44",
"ydl-pay" : "0.0.18.19",
"m-audioim" : "0.0.49.29.85",
......@@ -94,13 +94,13 @@ ext {
"m-confide" : "0.0.49.69",
"m-consultant" : "0.0.60.16",
"m-fm" : "0.0.30.08",
"m-user" : "0.0.62.04",
"m-home" : "0.0.23.35",
"m-user" : "0.0.62.05",
"m-home" : "0.0.23.49",
"m-im" : "0.0.21.30",
"m-dynamic" : "0.0.7.35",
"m-article" : "0.0.0.8",
"m-muse" : "0.0.28.28",
"m-muse" : "0.0.28.29",
"m-tests" : "0.0.24.18",
"m-course" : "0.0.43.37",
//-------------- 业务模块 API 层 --------------
......@@ -119,10 +119,10 @@ ext {
//mdt组件
"ydl-tuicore" : "0.0.22",
//第一步
"ydl-platform" : "0.0.41.2",
"ydl-platform" : "0.0.41.5",
//第二步 若干
"ydl-webview" : "0.0.38.71",
"ydl-webview" : "0.0.38.73",
"ydl-media" : "0.0.21.44",
"ydl-pay" : "0.0.18.19",
"m-audioim" : "0.0.49.29.85",
......
package com.yidianling.muse.helper
import android.view.MotionEvent
import android.view.View
import android.view.WindowManager
class FloatViewTouchListener(val wl: WindowManager.LayoutParams,val windowManager: WindowManager):
View.OnTouchListener{
private var x = 0
private var y = 0
override fun onTouch(view: View, motionEvent: MotionEvent): Boolean {
when (motionEvent.action) {
MotionEvent.ACTION_DOWN -> {
x = motionEvent.rawX.toInt()
y = motionEvent.rawY.toInt()
}
MotionEvent.ACTION_MOVE -> {
val nowX = motionEvent.rawX.toInt()
val nowY = motionEvent.rawY.toInt()
val movedX = nowX - x
val movedY = nowY - y
x = nowX
y = nowY
wl.apply {
x += movedX
y += movedY
}
//更新悬浮窗位置
windowManager.updateViewLayout(view, wl)
}
else -> {
}
}
return false
}
}
\ No newline at end of file
......@@ -21,6 +21,7 @@ class MediaPlayerManager private constructor() {
}
}
fun getMediaPlayer():MediaPlayer = mMediaPlayer
fun getAudioPath():String? = mPath
......
package com.yidianling.muse.helper
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel
object MeditationViewModel: ViewModel() {
//悬浮窗口创建 移除 基于无障碍服务
var isShowWindow = MutableLiveData<Boolean>()
//悬浮窗口创建 移除
var isShowSuspendWindow = MutableLiveData<Boolean>()
//悬浮窗口显示 隐藏
var isVisible = MutableLiveData<Boolean>()
}
\ No newline at end of file
......@@ -59,9 +59,11 @@ class ShareMeditationDialog : DialogFragment() {
private fun initView(view: View?) {
val imageUrl = "http://static.ydlcdn.com/v1/images/logo320.png"
val shareImageUrl = arguments?.getString(KEY_SHARE_IMAGE_URL)
val shareImageUrl = arguments?.getString(KEY_SHARE_IMAGE_URL)?:""
val shareTitle = arguments?.getString(KEY_SHARE_TITLE)?:""
val shareContent = arguments?.getString(KEY_SHARE_CONTENT)?:""
val shareUrl = arguments?.getString(KEY_SHARE_URL)?:""
ivSharePicture = view?.findViewById(R.id.iv_share_picture)
......@@ -83,10 +85,10 @@ class ShareMeditationDialog : DialogFragment() {
ShareUtils.shareTo(
SHARE_MEDIA.WEIXIN,
activity as Activity,
"share_title",
"http://www.baidu.com",
"share_context",
imageUrl
shareTitle,
shareUrl,
shareContent,
shareImageUrl
)
dismiss()
}
......@@ -95,10 +97,10 @@ class ShareMeditationDialog : DialogFragment() {
ShareUtils.shareTo(
SHARE_MEDIA.WEIXIN_CIRCLE,
activity as Activity,
"share_title",
"https://www.baidu.com",
"share_context",
imageUrl
shareTitle,
shareUrl,
shareContent,
shareImageUrl
)
dismiss()
}
......@@ -112,10 +114,10 @@ class ShareMeditationDialog : DialogFragment() {
ShareUtils.shareTo(
SHARE_MEDIA.QZONE,
activity as Activity,
"share_title",
"http://www.baidu.com",
"share_context",
imageUrl
shareTitle,
shareUrl,
shareContent,
shareImageUrl
)
dismiss()
}
......@@ -124,10 +126,10 @@ class ShareMeditationDialog : DialogFragment() {
ShareUtils.shareTo(
SHARE_MEDIA.QQ,
activity as Activity,
"share_title",
"http://www.baidu.com",
"share_context",
imageUrl
shareTitle,
shareUrl,
shareContent,
shareImageUrl
)
dismiss()
}
......@@ -141,10 +143,16 @@ class ShareMeditationDialog : DialogFragment() {
companion object {
const val TAG = "ShareMeditationDialog"
private const val KEY_SHARE_TITLE = "key_share_title"
private const val KEY_SHARE_URL = "key_share_url"
private const val KEY_SHARE_CONTENT = "key_share_content"
private const val KEY_SHARE_IMAGE_URL = "key_share_image_url"
fun newInstance(shareImageUrl: String): ShareMeditationDialog {
fun newInstance(shareTitle:String,shareUrl:String,shareContent:String,shareImageUrl: String): ShareMeditationDialog {
val args = Bundle()
args.putString(KEY_SHARE_TITLE, shareTitle)
args.putString(KEY_SHARE_CONTENT, shareContent)
args.putString(KEY_SHARE_URL, shareUrl)
args.putString(KEY_SHARE_IMAGE_URL, shareImageUrl)
val fragment = ShareMeditationDialog()
fragment.arguments = args
......
......@@ -484,11 +484,11 @@ public class MineFragment extends BaseFragment implements SwipeRefreshLayout.OnR
}
ModularServiceManager.INSTANCE.provide(ICourseService.class).startMyCourseActivity(mActivity);
} else if (id == R.id.ll_meditation){ //冥想
// TODO: 2022/5/6 冥想入口
if (!OneKeyLoginHelp.INSTANCE.startLoginByStatus(mActivity,true)) {
return;
}
ToastUtil.toastShort("冥想冥想冥想");
H5Params h5Params3 = new H5Params(HttpConfig.Companion.getMH5_URL() + "meditation?hideNavBar=1", null);
NewH5Activity.start(getActivity(), h5Params3);
} else if (id == R.id.ll_call_order) {//倾诉
ActionCountUtils.Companion.count(YDL_USER_MY_MIDDLE_TYPE_CLICK,"倾诉记录");
......
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