Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
YDL-Component-Medical
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
杨凯
YDL-Component-Medical
Commits
c6b43e16
Commit
c6b43e16
authored
May 23, 2022
by
范玉宾
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
to be test
parent
deddb032
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
95 additions
and
31 deletions
+95
-31
config.gradle
config.gradle
+10
-10
PlayMeditationActivity.kt
m-muse/src/main/java/com/yidianling/muse/activity/PlayMeditationActivity.kt
+0
-0
FloatViewTouchListener.kt
m-muse/src/main/java/com/yidianling/muse/helper/FloatViewTouchListener.kt
+39
-0
MediaPlayerManager.kt
m-muse/src/main/java/com/yidianling/muse/helper/MediaPlayerManager.kt
+1
-0
MeditationViewModel.kt
m-muse/src/main/java/com/yidianling/muse/helper/MeditationViewModel.kt
+16
-0
ShareMeditationDialog.kt
m-muse/src/main/java/com/yidianling/muse/widget/ShareMeditationDialog.kt
+27
-19
MineFragment.java
m-user/src/main/java/com/yidianling/user/mine/MineFragment.java
+2
-2
No files found.
config.gradle
View file @
c6b43e16
...
...
@@ -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.0
4
"
,
"m-home"
:
"0.0.23.
35
"
,
"m-user"
:
"0.0.62.0
5
"
,
"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.2
8
"
,
"m-muse"
:
"0.0.28.2
9
"
,
"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.7
1
"
,
"ydl-webview"
:
"0.0.38.7
3
"
,
"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.0
4
"
,
"m-home"
:
"0.0.23.
35
"
,
"m-user"
:
"0.0.62.0
5
"
,
"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.2
8
"
,
"m-muse"
:
"0.0.28.2
9
"
,
"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.7
1
"
,
"ydl-webview"
:
"0.0.38.7
3
"
,
"ydl-media"
:
"0.0.21.44"
,
"ydl-pay"
:
"0.0.18.19"
,
"m-audioim"
:
"0.0.49.29.85"
,
...
...
m-muse/src/main/java/com/yidianling/muse/activity/PlayMeditationActivity.kt
View file @
c6b43e16
This diff is collapsed.
Click to expand it.
m-muse/src/main/java/com/yidianling/muse/helper/FloatViewTouchListener.kt
0 → 100644
View file @
c6b43e16
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
m-muse/src/main/java/com/yidianling/muse/helper/MediaPlayerManager.kt
View file @
c6b43e16
...
...
@@ -21,6 +21,7 @@ class MediaPlayerManager private constructor() {
}
}
fun
getMediaPlayer
():
MediaPlayer
=
mMediaPlayer
fun
getAudioPath
():
String
?
=
mPath
...
...
m-muse/src/main/java/com/yidianling/muse/helper/MeditationViewModel.kt
0 → 100644
View file @
c6b43e16
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
m-muse/src/main/java/com/yidianling/muse/widget/ShareMeditationDialog.kt
View file @
c6b43e16
...
...
@@ -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"
,
i
mageUrl
shareTitle
,
shareUrl
,
shareContent
,
shareI
mageUrl
)
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"
,
i
mageUrl
shareTitle
,
shareUrl
,
shareContent
,
shareI
mageUrl
)
dismiss
()
}
...
...
@@ -112,10 +114,10 @@ class ShareMeditationDialog : DialogFragment() {
ShareUtils
.
shareTo
(
SHARE_MEDIA
.
QZONE
,
activity
as
Activity
,
"share_title"
,
"http://www.baidu.com"
,
"share_context"
,
i
mageUrl
shareTitle
,
shareUrl
,
shareContent
,
shareI
mageUrl
)
dismiss
()
}
...
...
@@ -124,10 +126,10 @@ class ShareMeditationDialog : DialogFragment() {
ShareUtils
.
shareTo
(
SHARE_MEDIA
.
QQ
,
activity
as
Activity
,
"share_title"
,
"http://www.baidu.com"
,
"share_context"
,
i
mageUrl
shareTitle
,
shareUrl
,
shareContent
,
shareI
mageUrl
)
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
(
share
Title
:
String
,
shareUrl
:
String
,
shareContent
:
String
,
share
ImageUrl
:
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
...
...
m-user/src/main/java/com/yidianling/user/mine/MineFragment.java
View file @
c6b43e16
...
...
@@ -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
,
"倾诉记录"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment