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
b513ec08
Commit
b513ec08
authored
Apr 01, 2022
by
霍志良
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:倾诉优化
parent
512b9218
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
4 deletions
+29
-4
HomeButtonBannerView.kt
m-home/src/ydl/java/com/yidianling/home/ui/view/HomeButtonBannerView.kt
+15
-1
qingsu_new_free_dynamic.gif
m-home/src/ydl/res/drawable-xhdpi/qingsu_new_free_dynamic.gif
+0
-0
qingsu_new_free_temp.gif
m-home/src/ydl/res/drawable-xhdpi/qingsu_new_free_temp.gif
+0
-0
home_button_banner_view.xml
m-home/src/ydl/res/layout/home_button_banner_view.xml
+14
-3
No files found.
m-home/src/ydl/java/com/yidianling/home/ui/view/HomeButtonBannerView.kt
View file @
b513ec08
...
...
@@ -3,11 +3,15 @@ package com.yidianling.home.ui.view
import
android.content.Context
import
android.view.View
import
android.view.ViewGroup
import
android.widget.FrameLayout
import
android.widget.LinearLayout
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.event.IHomeBaseEvent
import
com.yidianling.common.tools.RxDeviceTool
import
com.yidianling.common.tools.RxImageTool
import
kotlinx.android.synthetic.ydl.home_button_banner_view.view.*
/**
...
...
@@ -20,6 +24,8 @@ import kotlinx.android.synthetic.ydl.home_button_banner_view.view.*
class
HomeButtonBannerView
(
private
val
mContext
:
Context
,
private
var
homeEvent
:
IHomeBaseEvent
?)
:
LinearLayout
(
mContext
)
{
private
var
buttonParams
:
LinearLayout
.
LayoutParams
?
=
null
private
var
buttonParamsFrame
:
FrameLayout
.
LayoutParams
?
=
null
private
var
buttonParamsFrame2
:
FrameLayout
.
LayoutParams
?
=
null
init
{
initView
()
...
...
@@ -29,7 +35,10 @@ class HomeButtonBannerView(private val mContext: Context, private var homeEvent:
val
params
=
RecyclerView
.
LayoutParams
(
ViewGroup
.
LayoutParams
.
MATCH_PARENT
,
ViewGroup
.
LayoutParams
.
WRAP_CONTENT
)
layoutParams
=
params
View
.
inflate
(
mContext
,
R
.
layout
.
home_button_banner_view
,
this
)
Glide
.
with
(
context
)
.
load
(
R
.
drawable
.
qingsu_new_free_temp
)
.
diskCacheStrategy
(
DiskCacheStrategy
.
RESOURCE
)
.
into
(
qingsuGif
)
initButtonView
()
homeModuleButtonBannerFirst
.
setOnClickListener
{
...
...
@@ -55,6 +64,11 @@ class HomeButtonBannerView(private val mContext: Context, private var homeEvent:
var
viewWidth
=
((
screenWidth
-
2
*
9
*
RxDeviceTool
.
getScreenDensity
(
mContext
))
/
4
).
toInt
()
var
viewHeight
=
viewWidth
*
78
/
80
buttonParams
=
LinearLayout
.
LayoutParams
(
viewWidth
,
viewHeight
)
buttonParamsFrame
=
FrameLayout
.
LayoutParams
(
viewWidth
,
viewHeight
)
buttonParamsFrame2
=
FrameLayout
.
LayoutParams
((
viewWidth
/
2
)+
10
,
viewHeight
/
2
-
30
)
buttonParamsFrame2
!!
.
setMargins
(
RxImageTool
.
dp2px
((
viewWidth
/
19f
)),
0
,
0
,
0
)
qingsuGif
.
layoutParams
=
buttonParamsFrame2
homeModuleButtonBannerSecondFrame
.
layoutParams
=
buttonParamsFrame
homeModuleButtonBannerFirst
.
layoutParams
=
buttonParams
homeModuleButtonBannerSecond
.
layoutParams
=
buttonParams
homeModuleButtonBannerThird
.
layoutParams
=
buttonParams
...
...
m-home/src/ydl/res/drawable-xhdpi/qingsu_new_free_dynamic.gif
0 → 100644
View file @
b513ec08
21.1 KB
m-home/src/ydl/res/drawable-xhdpi/qingsu_new_free_temp.gif
0 → 100644
View file @
b513ec08
68.2 KB
m-home/src/ydl/res/layout/home_button_banner_view.xml
View file @
b513ec08
...
...
@@ -79,12 +79,16 @@
android:textSize=
"@dimen/platform_dp_12"
android:text=
"学习与成长"
/>
</RelativeLayout>
<RelativeLayout
<FrameLayout
android:id=
"@+id/homeModuleButtonBannerSecond"
android:layout_width=
"80dp"
android:layout_height=
"78dp"
android:background=
"@drawable/home_button_banner_fourth_img_new"
>
<RelativeLayout
android:id=
"@+id/homeModuleButtonBannerSecondFrame"
android:layout_width=
"80dp"
android:layout_height=
"78dp"
android:gravity=
"center"
>
<TextView
android:id=
"@+id/homeModuleButtonBannerSecondTitle"
...
...
@@ -94,6 +98,7 @@
android:textColor=
"@color/platform_color_FFFFFF"
android:textSize=
"@dimen/platform_dp_16"
android:text=
"即时倾诉"
/>
<TextView
android:layout_below=
"@+id/homeModuleButtonBannerSecondTitle"
android:layout_width=
"wrap_content"
...
...
@@ -102,5 +107,11 @@
android:textSize=
"@dimen/platform_dp_12"
android:text=
"24小时在线"
/>
</RelativeLayout>
<ImageView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:id=
"@+id/qingsuGif"
>
</ImageView>
</FrameLayout>
</LinearLayout>
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