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
6ade7eda
Commit
6ade7eda
authored
Aug 27, 2022
by
刘鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 安卓心理咨询首页金刚区样式统一完成
parent
5afb5b4e
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
544 additions
and
158 deletions
+544
-158
YDLavManager.kt
m-audioim/src/main/java/com/ydl/audioim/YDLavManager.kt
+15
-11
build.gradle
m-home/build.gradle
+3
-2
HomeButtonBannerView.kt
m-home/src/xlzx/java/com/yidianling/home/ui/view/HomeButtonBannerView.kt
+21
-16
LoopScrollAvatar.kt
m-home/src/xlzx/java/com/yidianling/home/ui/view/LoopScrollAvatar.kt
+214
-0
XCRoundImageView.kt
m-home/src/xlzx/java/com/yidianling/home/ui/view/XCRoundImageView.kt
+67
-0
home_button_banner_view.xml
m-home/src/xlzx/res/layout/home_button_banner_view.xml
+224
-129
home_banner_first_bg.png
m-home/src/xlzx/res/mipmap-xhdpi/home_banner_first_bg.png
+0
-0
home_banner_header1.png
m-home/src/xlzx/res/mipmap-xhdpi/home_banner_header1.png
+0
-0
home_banner_header2.png
m-home/src/xlzx/res/mipmap-xhdpi/home_banner_header2.png
+0
-0
home_banner_header3.png
m-home/src/xlzx/res/mipmap-xhdpi/home_banner_header3.png
+0
-0
home_banner_header4.png
m-home/src/xlzx/res/mipmap-xhdpi/home_banner_header4.png
+0
-0
home_banner_header5.png
m-home/src/xlzx/res/mipmap-xhdpi/home_banner_header5.png
+0
-0
home_banner_second_bg.png
m-home/src/xlzx/res/mipmap-xhdpi/home_banner_second_bg.png
+0
-0
home_banner_test_bg.png
m-home/src/xlzx/res/mipmap-xhdpi/home_banner_test_bg.png
+0
-0
home_banner_third_bg.png
m-home/src/xlzx/res/mipmap-xhdpi/home_banner_third_bg.png
+0
-0
No files found.
m-audioim/src/main/java/com/ydl/audioim/YDLavManager.kt
View file @
6ade7eda
...
...
@@ -432,18 +432,22 @@ class YDLavManager {
override
fun
onFailure
(
msg
:
String
?)
{
if
(
msg
!=
"LOGIN_ERR_ALREADY_LOGGED_IN"
)
{
Apm
.
reportEvent
(
"rtm_android"
,
"connectionstate_error"
,
msg
?:
""
)
Apm
.
reportEvent
(
"rtm_android"
,
"connectionstate_error"
,
msg
?:
""
)
LogUtil
.
e
(
"[agora]实时消息登录失败:$msg"
)
writeAgoraLog
(
"声网rtm登录失败:$msg-------Time:${
AudioLogUtils
.
format
.
format
(
Calendar
.
getInstance
().
time
)
}
", "
confide
.
log
", true
)
AliYunRichLogsHelper
.
getInstance
()
.
sendRichLog
(
AliYunLogConfig
.
AGORA
,
"声网rtm登录失败:$msg"
)
}
LogUtil
.
e
(
"[agora]实时消息登录失败:$msg"
)
writeAgoraLog
(
"声网rtm登录失败:$msg-------Time:${
AudioLogUtils
.
format
.
format
(
Calendar
.
getInstance
().
time
)
}
", "
confide
.
log
", true
)
AliYunRichLogsHelper
.
getInstance
()
.
sendRichLog
(
AliYunLogConfig
.
AGORA
,
"声网rtm登录失败:$msg"
)
event
(
false
,
msg
)
}
...
...
m-home/build.gradle
View file @
6ade7eda
...
...
@@ -27,7 +27,6 @@ android {
versionName
"1.0"
multiDexEnabled
true
testInstrumentationRunner
'androidx.test.runner.AndroidJUnitRunner'
flavorDimensions
"versionCode"
vectorDrawables
.
useSupportLibrary
=
true
}
...
...
@@ -49,7 +48,9 @@ android {
ydl
{}
xlzx
{}
}
dataBinding
{
enabled
true
}
sourceSets
{
main
{
res
.
srcDirs
=
[
'src/main/res'
]
...
...
m-home/src/xlzx/java/com/yidianling/home/ui/view/HomeButtonBannerView.kt
View file @
6ade7eda
package
com.yidianling.home.ui.view
import
android.content.Context
import
android.view.
View
import
android.view.
LayoutInflater
import
android.view.ViewGroup
import
android.widget.LinearLayout
import
androidx.databinding.DataBindingUtil
import
androidx.recyclerview.widget.RecyclerView
import
com.bumptech.glide.Glide
import
com.bumptech.glide.load.engine.DiskCacheStrategy
import
com.yidianling.home.R
import
com.yidianling.home.databinding.HomeButtonBannerViewBinding
import
com.yidianling.home.event.IHomeBaseEvent
import
com.yidianling.home.model.bean.HomeHeaderBean
import
kotlinx.android.synthetic.xlzx.home_button_banner_view.view.*
/**
* @author <a href="https://www.jianshu.com/u/c1e5310dd724">xujian</a>
...
...
@@ -21,6 +20,7 @@ import kotlinx.android.synthetic.xlzx.home_button_banner_view.view.*
*/
class
HomeButtonBannerView
(
private
val
mContext
:
Context
,
private
var
homeEvent
:
IHomeBaseEvent
?)
:
LinearLayout
(
mContext
)
{
private
var
dataBinding
:
HomeButtonBannerViewBinding
?
=
null
init
{
initView
()
...
...
@@ -32,33 +32,37 @@ class HomeButtonBannerView(private val mContext: Context, private var homeEvent:
ViewGroup
.
LayoutParams
.
WRAP_CONTENT
)
layoutParams
=
params
View
.
inflate
(
mContext
,
R
.
layout
.
home_button_banner_view
,
this
)
dataBinding
=
DataBindingUtil
.
inflate
(
LayoutInflater
.
from
(
mContext
),
R
.
layout
.
home_button_banner_view
,
this
,
true
)
Glide
.
with
(
context
)
.
load
(
R
.
drawable
.
qingsu_new_free_dynamic
)
.
diskCacheStrategy
(
DiskCacheStrategy
.
RESOURCE
)
.
into
(
qingsuGif
)
homeModuleButtonBannerFirst
.
setOnClickListener
{
dataBinding
?.
homeModuleButtonBannerFirst
?.
setOnClickListener
{
homeEvent
?.
reservationExpertsClick
()
}
homeModuleButtonBannerSecond
.
setOnClickListener
{
dataBinding
?.
homeModuleButtonBannerSecond
?
.
setOnClickListener
{
homeEvent
?.
askMoreClick
()
}
homeModuleButtonBannerThird
.
setOnClickListener
{
dataBinding
?.
homeModuleButtonBannerThird
?
.
setOnClickListener
{
homeEvent
?.
nowConfideClick
(
false
)
}
homeModuleButtonBannerFourth
.
setOnClickListener
{
dataBinding
?.
homeModuleButtonBannerFourth
?
.
setOnClickListener
{
homeEvent
?.
psychologyTestClick
()
}
dataBinding
?.
loopAvatar
?.
stopLoop
()
dataBinding
?.
loopAvatar
?.
startLoop
()
}
fun
initData
(
homeCategory
:
List
<
HomeHeaderBean
.
CategoryGoldListDataBean
>?
)
{
homeEvent
?.
let
{
home_category_view
.
setEvent
(
it
)
}
home_category_view
.
initData
(
homeCategory
)
homeEvent
?.
let
{
dataBinding
?.
homeCategoryView
?.
setEvent
(
it
)
}
dataBinding
?.
homeCategoryView
?.
initData
(
homeCategory
)
}
}
\ No newline at end of file
m-home/src/xlzx/java/com/yidianling/home/ui/view/LoopScrollAvatar.kt
0 → 100644
View file @
6ade7eda
package
com.yidianling.home.ui.view
import
android.animation.Animator
import
android.animation.AnimatorListenerAdapter
import
android.app.Activity
import
android.content.Context
import
android.os.Handler
import
android.os.Message
import
android.util.AttributeSet
import
android.util.Log
import
android.widget.ImageView
import
android.widget.RelativeLayout
import
com.blankj.utilcode.util.SizeUtils
import
com.yidianling.home.R
import
java.lang.ref.WeakReference
const
val
START_AVATAR_LOOP
=
111
class
LoopScrollAvatar
@JvmOverloads
constructor
(
context
:
Context
,
attrs
:
AttributeSet
?
=
null
,
defStyleAttr
:
Int
=
0
)
:
RelativeLayout
(
context
,
attrs
,
defStyleAttr
)
{
//动画播放时长
private
val
animDuration
=
500L
//动画间隔播放时间
private
val
animIntervalTime
=
2000L
//两边头像的缩放程度
private
val
scaleFrom
=
0.7F
//头像大小
private
val
avatarSize
=
SizeUtils
.
dp2px
(
18F
)
//从当前位置滚动到下一位置需要移动的距离
private
var
scrollLength
=
0F
//下次要显示的图片角标
private
var
index
=
0
private
val
res
=
arrayOf
(
R
.
mipmap
.
home_banner_header1
,
R
.
mipmap
.
home_banner_header2
,
R
.
mipmap
.
home_banner_header3
,
R
.
mipmap
.
home_banner_header4
,
R
.
mipmap
.
home_banner_header5
)
//缓存复用ImageView
private
val
ivCache
=
mutableListOf
(
createImageView
(),
createImageView
(),
createImageView
(),
createImageView
()
)
private
val
handler
by
lazy
{
LoopHandler
(
this
)
}
init
{
//前三位的头像先addView显示出来
//放左边
addImageView
(
ALIGN_PARENT_LEFT
)
//放中间
addImageView
(
CENTER_HORIZONTAL
)
//默认放右边
addImageView
()
}
class
LoopHandler
()
:
Handler
()
{
private
var
lWeak
:
WeakReference
<
LoopScrollAvatar
>?
=
null
constructor
(
loopScrollAvatar
:
LoopScrollAvatar
)
:
this
()
{
lWeak
=
WeakReference
(
loopScrollAvatar
)
}
override
fun
handleMessage
(
msg
:
Message
)
{
super
.
handleMessage
(
msg
)
lWeak
?.
get
()
?.
apply
{
if
((
context
as
?
Activity
)
?.
isDestroyed
==
false
)
{
startAnimMove
()
sendLoopMsg
()
}
}
}
}
override
fun
onSizeChanged
(
w
:
Int
,
h
:
Int
,
oldw
:
Int
,
oldh
:
Int
)
{
super
.
onSizeChanged
(
w
,
h
,
oldw
,
oldh
)
scrollLength
=
(
width
-
avatarSize
)
/
2F
}
/**
* 创建圆形头像ImageView
*/
private
fun
createImageView
():
ImageView
{
return
XCRoundImageView
(
context
)
}
/**
* 摆放头像ImageView
*/
private
fun
addImageView
(
rule
:
Int
=
ALIGN_PARENT_RIGHT
)
{
//复用缓存
val
iv
=
if
(
ivCache
.
size
>
0
)
{
ivCache
[
0
]
}
else
{
createImageView
()
}
//当前已在屏幕显示的控件不要复用,防止params混乱
ivCache
.
remove
(
iv
)
iv
.
setImageResource
(
res
[
index
])
iv
.
scaleType
=
ImageView
.
ScaleType
.
FIT_XY
//图片资源全部播放完之后要从头重播
index
=
(
index
+
1
)
%
res
.
size
//设置在RelativeLayout中的显示位置
val
lp
=
LayoutParams
(
avatarSize
,
avatarSize
)
lp
.
addRule
(
rule
)
iv
.
layoutParams
=
lp
addView
(
iv
)
}
/**
* 轮播滚动动效
*/
private
fun
startAnimMove
()
{
//添加一个即将从右边移进屏幕的ImageView
addImageView
()
//上行代码刚添加进来的最右边头像(此时RelativeLayout的mChildrenCount=4)
getChildAt
(
3
)
?.
apply
{
//设置起始的低透明度 和 小size
alpha
=
0.6F
scaleX
=
scaleFrom
scaleY
=
scaleFrom
//先设置左边部分向左移出控件,即挡住左边不显示(然后才能translationXBy移进屏幕)
translationX
=
scrollLength
//translationXBy指的是从当前位置开始移动多少距离(区别于translationX)
//alpha是从当前透明度(即0.6F)变为设置的透明度(即1F)
//scaleX是从当前宽度比例(即scaleFrom)变为设置的宽度比例(即1F)
animate
().
translationXBy
(-
scrollLength
).
alpha
(
1F
).
scaleX
(
1F
).
scaleY
(
1F
)
.
setDuration
(
animDuration
).
start
()
}
//中间俩头像只需设置平移的距离即可
getChildAt
(
1
)
?.
apply
{
animate
().
translationXBy
(-
scrollLength
).
setDuration
(
animDuration
).
start
()
}
//设置平移的距离
getChildAt
(
2
)
?.
apply
{
animate
().
translationXBy
(-
scrollLength
).
setDuration
(
animDuration
).
start
()
}
//最左边的头像(从完整显示 到 透明度和大小都变小,并且左移出屏幕)(因为是最先add进来的View,所以index=0)
getChildAt
(
0
)
?.
let
{
iv
->
iv
.
animate
().
translationXBy
(
0f
).
alpha
(
0F
).
scaleX
(
scaleFrom
).
scaleY
(
scaleFrom
)
.
setDuration
(
animDuration
)
.
setListener
(
object
:
AnimatorListenerAdapter
()
{
override
fun
onAnimationEnd
(
animation
:
Animator
?)
{
super
.
onAnimationEnd
(
animation
)
//清除ImageView已有属性,并添加进ivCache缓存
iv
.
animate
().
setListener
(
null
)
iv
.
clearAnimation
()
iv
.
translationX
=
0F
iv
.
scaleX
=
1.0F
iv
.
scaleY
=
1.0F
iv
.
alpha
=
1F
//从RelativeLayout移出
removeView
(
iv
)
ivCache
.
add
(
0
,
iv
as
ImageView
)
try
{
if
((
context
as
Activity
).
isFinishing
)
{
stopLoop
()
}
}
catch
(
e
:
Exception
)
{
e
.
printStackTrace
()
}
}
}).
start
()
}
}
private
fun
sendLoopMsg
()
{
handler
.
sendEmptyMessageDelayed
(
START_AVATAR_LOOP
,
animIntervalTime
+
animDuration
)
}
private
var
looping
=
false
/**
* 开始轮播
*/
fun
startLoop
()
{
if
(
looping
)
{
Log
.
e
(
"startLoop"
,
"startLoop cannot be called twice"
)
}
looping
=
true
sendLoopMsg
()
}
/**
* 停止轮播
*/
fun
stopLoop
()
{
looping
=
false
handler
.
removeCallbacksAndMessages
(
null
)
}
}
\ No newline at end of file
m-home/src/xlzx/java/com/yidianling/home/ui/view/XCRoundImageView.kt
0 → 100644
View file @
6ade7eda
package
com.yidianling.home.ui.view
import
android.annotation.SuppressLint
import
android.content.Context
import
android.graphics.*
import
android.graphics.drawable.BitmapDrawable
import
android.util.AttributeSet
import
androidx.appcompat.widget.AppCompatImageView
/**
* @author liupeng
*/
class
XCRoundImageView
@JvmOverloads
constructor
(
context
:
Context
,
attrs
:
AttributeSet
?
=
null
,
defStyle
:
Int
=
0
)
:
AppCompatImageView
(
context
,
attrs
,
defStyle
)
{
private
val
paint
:
Paint
=
Paint
()
/**
* 绘制圆形图片
* @author caizhiming
*/
@SuppressLint
(
"DrawAllocation"
)
override
fun
onDraw
(
canvas
:
Canvas
)
{
val
drawable
=
drawable
if
(
null
!=
drawable
)
{
val
bitmap
=
(
drawable
as
BitmapDrawable
).
bitmap
val
b
=
getCircleBitmap
(
bitmap
,
14
)
val
rectSrc
=
Rect
(
0
,
0
,
b
.
width
,
b
.
height
)
val
rectDest
=
Rect
(
0
,
0
,
width
,
height
)
paint
.
reset
()
canvas
.
drawBitmap
(
b
,
rectSrc
,
rectDest
,
paint
)
}
else
{
super
.
onDraw
(
canvas
)
}
}
/**
* 获取圆形图片方法
* @param bitmap
* @param pixels
* @return Bitmap
* @author caizhiming
*/
private
fun
getCircleBitmap
(
bitmap
:
Bitmap
,
pixels
:
Int
):
Bitmap
{
val
output
=
Bitmap
.
createBitmap
(
bitmap
.
width
,
bitmap
.
height
,
Bitmap
.
Config
.
ARGB_8888
)
val
canvas
=
Canvas
(
output
)
val
color
=
-
0
xbdbdbe
val
rect
=
Rect
(
0
,
0
,
bitmap
.
width
,
bitmap
.
height
)
paint
.
isAntiAlias
=
true
canvas
.
drawARGB
(
0
,
0
,
0
,
0
)
paint
.
color
=
color
val
x
=
bitmap
.
width
canvas
.
drawCircle
((
x
/
2
).
toFloat
(),
(
x
/
2
).
toFloat
(),
(
x
/
2
).
toFloat
(),
paint
)
paint
.
xfermode
=
PorterDuffXfermode
(
PorterDuff
.
Mode
.
SRC_IN
)
canvas
.
drawBitmap
(
bitmap
,
rect
,
rect
,
paint
)
return
output
}
}
\ No newline at end of file
m-home/src/xlzx/res/layout/home_button_banner_view.xml
View file @
6ade7eda
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:id=
"@+id/ll_home_module_button"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"17dp"
android:orientation=
"vertical"
>
<com.yidianling.home.ui.widget.HomeModuleCategoryView
android:id=
"@+id/home_category_view"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
/>
<layout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
>
<LinearLayout
android:id=
"@+id/ll_home_module_button"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"4dp"
android:layout_marginTop=
"15dp"
android:layout_marginRight=
"4dp"
android:gravity=
"center_horizontal|bottom"
android:orientation=
"horizontal"
android:paddingBottom=
"12dp"
>
android:layout_marginTop=
"17dp"
android:orientation=
"vertical"
>
<LinearLayout
android:id=
"@+id/homeModuleButtonBannerFirst"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:gravity=
"center"
android:orientation=
"vertical"
>
<ImageView
android:layout_width=
"52dp"
android:layout_height=
"52dp"
android:scaleType=
"fitXY"
android:src=
"@drawable/home_banner_first_icon"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"6dp"
android:text=
"心理咨询"
android:textColor=
"@color/platform_color_242424"
android:textSize=
"13dp"
android:textStyle=
"bold"
/>
</LinearLayout>
<com.yidianling.home.ui.widget.HomeModuleCategoryView
android:id=
"@+id/home_category_view"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
/>
<LinearLayout
android:id=
"@+id/homeModuleButtonBannerFourth"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:gravity=
"center"
android:orientation=
"vertical"
>
<ImageView
android:layout_width=
"54dp"
android:layout_height=
"52dp"
android:scaleType=
"fitXY"
android:src=
"@drawable/home_banner_fourth_icon"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"6dp"
android:text=
"心理测试"
android:textColor=
"@color/platform_color_242424"
android:textSize=
"13dp"
android:textStyle=
"bold"
/>
</LinearLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id=
"@+id/homeModuleButtonBannerThird"
android:layout_width=
"0dp"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:gravity=
"center"
android:orientation=
"vertical"
>
<ImageView
android:id=
"@+id/third_icon"
android:layout_width=
"71dp"
android:layout_height=
"64dp"
android:paddingLeft=
"7dp"
android:paddingTop=
"12dp"
android:paddingRight=
"12dp"
android:scaleType=
"fitXY"
android:src=
"@drawable/home_banner_third_icon"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
<ImageView
android:id=
"@+id/qingsuGif"
android:layout_width=
"45dp"
android:layout_height=
"24dp"
app:layout_constraintRight_toRightOf=
"@id/third_icon"
app:layout_constraintTop_toTopOf=
"@id/third_icon"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_below=
"@id/third_icon"
android:layout_marginTop=
"6dp"
android:text=
"倾诉热线"
android:textColor=
"@color/platform_color_242424"
android:textSize=
"13dp"
android:textStyle=
"bold"
app:layout_constraintLeft_toLeftOf=
"@id/third_icon"
app:layout_constraintRight_toRightOf=
"@id/third_icon"
app:layout_constraintTop_toBottomOf=
"@id/third_icon"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
android:layout_marginLeft=
"16dp"
android:layout_marginTop=
"15dp"
android:layout_marginRight=
"16dp"
android:gravity=
"center_horizontal|bottom"
android:orientation=
"horizontal"
android:paddingBottom=
"12dp"
>
<androidx.constraintlayout.widget.ConstraintLayout
android:id=
"@+id/homeModuleButtonBannerFirst"
android:layout_width=
"0dp"
android:layout_height=
"84dp"
android:layout_weight=
"1"
android:background=
"@mipmap/home_banner_first_bg"
>
<TextView
android:id=
"@+id/homeModuleButtonBannerFirstTitle"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"10dp"
android:text=
"心理咨询"
android:textColor=
"@color/white"
android:textSize=
"16dp"
android:textStyle=
"bold"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
<TextView
android:id=
"@+id/homeModuleFirstDec"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"3W+师资"
android:layout_marginTop=
"2dp"
android:textColor=
"@color/white"
android:textSize=
"11dp"
app:layout_constraintLeft_toLeftOf=
"@id/homeModuleButtonBannerFirstTitle"
app:layout_constraintTop_toBottomOf=
"@id/homeModuleButtonBannerFirstTitle"
/>
<com.yidianling.home.ui.view.LoopScrollAvatar
android:id=
"@+id/loop_avatar"
android:layout_marginTop=
"8dp"
android:visibility=
"visible"
android:src=
"@mipmap/home_banner_header1"
app:layout_constraintTop_toBottomOf=
"@id/homeModuleFirstDec"
app:layout_constraintLeft_toLeftOf=
"@id/homeModuleButtonBannerFirstTitle"
android:layout_width=
"50dp"
app:layout_constraintHorizontal_weight=
"1"
android:layout_height=
"20dp"
/>
<!-- <ImageView-->
<!-- android:id="@+id/header1"-->
<!-- android:layout_marginTop="8dp"-->
<!-- android:visibility="visible"-->
<!-- android:src="@mipmap/home_banner_header1"-->
<!-- app:layout_constraintTop_toBottomOf="@id/homeModuleFirstDec"-->
<!-- app:layout_constraintLeft_toLeftOf="@id/homeModuleButtonBannerFirstTitle"-->
<!-- android:layout_width="18dp"-->
<!-- android:layout_height="18dp"/>-->
<!-- <ImageView-->
<!-- android:id="@+id/header2"-->
<!-- android:layout_marginTop="8dp"-->
<!-- android:src="@mipmap/home_banner_header1"-->
<!-- android:layout_marginLeft="14dp"-->
<!-- android:visibility="visible"-->
<!-- app:layout_constraintTop_toBottomOf="@id/homeModuleFirstDec"-->
<!-- app:layout_constraintLeft_toLeftOf="@id/header1"-->
<!-- android:layout_width="18dp"-->
<!-- android:layout_height="18dp" />-->
<!-- <ImageView-->
<!-- android:id="@+id/header3"-->
<!-- android:layout_marginTop="8dp"-->
<!-- android:src="@mipmap/home_banner_header2"-->
<!-- android:layout_marginLeft="14dp"-->
<!-- android:visibility="visible"-->
<!-- app:layout_constraintTop_toBottomOf="@id/homeModuleFirstDec"-->
<!-- app:layout_constraintLeft_toLeftOf="@id/header2"-->
<!-- android:layout_width="18dp"-->
<!-- android:layout_height="18dp" />-->
<!-- <ImageView-->
<!-- android:id="@+id/header4"-->
<!-- android:layout_marginTop="8dp"-->
<!-- android:src="@mipmap/home_banner_header1"-->
<!-- android:layout_marginLeft="14dp"-->
<!-- android:visibility="gone"-->
<!-- app:layout_constraintTop_toBottomOf="@id/homeModuleFirstDec"-->
<!-- app:layout_constraintLeft_toLeftOf="@id/header3"-->
<!-- android:layout_width="18dp"-->
<!-- android:layout_height="18dp" />-->
<!-- <ImageView-->
<!-- android:id="@+id/header5"-->
<!-- android:layout_marginTop="8dp"-->
<!-- android:src="@mipmap/home_banner_header2"-->
<!-- android:layout_marginLeft="12dp"-->
<!-- android:visibility="gone"-->
<!-- app:layout_constraintTop_toBottomOf="@id/homeModuleFirstDec"-->
<!-- app:layout_constraintLeft_toLeftOf="@id/header4"-->
<!-- android:layout_width="18dp"-->
<!-- android:layout_height="18dp" />-->
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id=
"@+id/homeModuleButtonBannerFourth"
android:layout_width=
"0dp"
android:layout_height=
"84dp"
android:layout_marginLeft=
"8dp"
android:layout_weight=
"1"
android:background=
"@mipmap/home_banner_test_bg"
>
<TextView
android:id=
"@+id/homeModuleButtonBannerFourthTitle"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"10dp"
android:text=
"心理测试"
android:textColor=
"@color/white"
android:textSize=
"16dp"
android:textStyle=
"bold"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
<TextView
android:id=
"@+id/homeModuleTestDec"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"抑郁测量"
android:textColor=
"@color/white"
android:layout_marginTop=
"2dp"
android:textSize=
"11dp"
app:layout_constraintLeft_toLeftOf=
"@id/homeModuleButtonBannerFourthTitle"
app:layout_constraintTop_toBottomOf=
"@id/homeModuleButtonBannerFourthTitle"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id=
"@+id/homeModuleButtonBannerThird"
android:layout_width=
"0dp"
android:layout_height=
"84dp"
android:layout_marginLeft=
"8dp"
android:layout_weight=
"1"
android:background=
"@mipmap/home_banner_third_bg"
android:gravity=
"center"
android:orientation=
"vertical"
>
<TextView
android:id=
"@+id/homeModuleButtonBannerThirdTitle"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"10dp"
android:text=
"心理课堂"
android:textColor=
"@color/white"
android:textSize=
"16dp"
android:textStyle=
"bold"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
<TextView
android:id=
"@+id/homeModuleThirdDec"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"2dp"
android:text=
"学习与成长"
android:textColor=
"@color/white"
android:textSize=
"11dp"
app:layout_constraintLeft_toLeftOf=
"@id/homeModuleButtonBannerThirdTitle"
app:layout_constraintTop_toBottomOf=
"@id/homeModuleButtonBannerThirdTitle"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id=
"@+id/homeModuleButtonBannerSecond"
android:layout_width=
"0dp"
android:layout_height=
"84dp"
android:layout_weight=
"1"
android:layout_marginLeft=
"8dp"
android:background=
"@mipmap/home_banner_second_bg"
android:gravity=
"center"
android:orientation=
"vertical"
>
<TextView
android:id=
"@+id/homeModuleButtonBannerSecondTitle"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"10dp"
android:text=
"心理课堂"
android:textColor=
"@color/white"
android:textSize=
"16dp"
android:textStyle=
"bold"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
<TextView
android:id=
"@+id/homeModuleSecondDec"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"2dp"
android:text=
"学习与成长"
android:textColor=
"@color/white"
android:textSize=
"11dp"
app:layout_constraintLeft_toLeftOf=
"@id/homeModuleButtonBannerSecondTitle"
app:layout_constraintTop_toBottomOf=
"@id/homeModuleButtonBannerSecondTitle"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
<LinearLayout
android:id=
"@+id/homeModuleButtonBannerSecond"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:gravity=
"center"
android:orientation=
"vertical"
>
<ImageView
android:layout_width=
"52dp"
android:layout_height=
"52dp"
android:scaleType=
"fitXY"
android:src=
"@drawable/home_banner_second_icon"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"6dp"
android:text=
"心理问答"
android:textColor=
"@color/platform_color_242424"
android:textSize=
"13dp"
android:textStyle=
"bold"
/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</layout>
m-home/src/xlzx/res/mipmap-xhdpi/home_banner_first_bg.png
0 → 100644
View file @
6ade7eda
6.75 KB
m-home/src/xlzx/res/mipmap-xhdpi/home_banner_header1.png
0 → 100644
View file @
6ade7eda
2.96 MB
m-home/src/xlzx/res/mipmap-xhdpi/home_banner_header2.png
0 → 100644
View file @
6ade7eda
150 KB
m-home/src/xlzx/res/mipmap-xhdpi/home_banner_header3.png
0 → 100644
View file @
6ade7eda
407 KB
m-home/src/xlzx/res/mipmap-xhdpi/home_banner_header4.png
0 → 100644
View file @
6ade7eda
484 KB
m-home/src/xlzx/res/mipmap-xhdpi/home_banner_header5.png
0 → 100644
View file @
6ade7eda
691 KB
m-home/src/xlzx/res/mipmap-xhdpi/home_banner_second_bg.png
0 → 100644
View file @
6ade7eda
5.84 KB
m-home/src/xlzx/res/mipmap-xhdpi/home_banner_test_bg.png
0 → 100644
View file @
6ade7eda
6.44 KB
m-home/src/xlzx/res/mipmap-xhdpi/home_banner_third_bg.png
0 → 100644
View file @
6ade7eda
5.64 KB
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