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
02f43bf2
Commit
02f43bf2
authored
Jun 15, 2022
by
fengquan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 倾诉列表添加空白页
parent
8c41ac44
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
58 additions
and
0 deletions
+58
-0
ConfideHomeActivity.kt
m-confide/src/main/java/com/ydl/confide/home/ConfideHomeActivity.kt
+5
-0
ConfideHomeAdapter.kt
m-confide/src/main/java/com/ydl/confide/home/adapter/ConfideHomeAdapter.kt
+8
-0
IConfideHomeConfig.kt
m-confide/src/main/java/com/ydl/confide/home/config/IConfideHomeConfig.kt
+2
-0
confide_empty_layout.xml
m-confide/src/main/res/layout/confide_empty_layout.xml
+43
-0
No files found.
m-confide/src/main/java/com/ydl/confide/home/ConfideHomeActivity.kt
View file @
02f43bf2
...
...
@@ -524,6 +524,11 @@ class ConfideHomeActivity :
if
(
null
!=
soundBean
)
{
(
cacheList
as
ArrayList
).
add
(
soundBean
)
}
if
(
bean
?.
body
!=
null
&&
bean
?.
body
.
size
==
0
)
{
cacheList
?.
add
(
ConfideHomeDataBean
(
IConfideHomeConfig
.
TYPE_EMPTY
,
null
,
null
,
null
,
-
1
))
}
listScrollListener
?.
moveToPosition
(
rv_list
)
}
...
...
m-confide/src/main/java/com/ydl/confide/home/adapter/ConfideHomeAdapter.kt
View file @
02f43bf2
...
...
@@ -148,6 +148,11 @@ class ConfideHomeAdapter(
)
}
//空白页
IConfideHomeConfig
.
TYPE_EMPTY
->
{
return
EmptyView
(
LayoutInflater
.
from
(
mContext
).
inflate
(
R
.
layout
.
confide_empty_layout
,
parent
,
false
))
}
// //听声寻人
// IConfideHomeConfig.TYPE_SOUND -> {
//// return ConfideHomeListenAndFoundViewHolder(ConfideHomeListenAndFoundView(parent.context, confideHomeEvent))
...
...
@@ -249,6 +254,9 @@ class ConfideHomeAdapter(
*/
inner
class
SearchViewHolder
(
var
searchView
:
View
)
:
RecyclerView
.
ViewHolder
(
searchView
)
inner
class
EmptyView
(
var
emptyView
:
View
):
RecyclerView
.
ViewHolder
(
emptyView
)
/**
* 听声寻人 viewHolder
*/
...
...
m-confide/src/main/java/com/ydl/confide/home/config/IConfideHomeConfig.kt
View file @
02f43bf2
...
...
@@ -21,6 +21,7 @@ interface IConfideHomeConfig{
const
val
TYPE_SOUND
=
6
const
val
TYPE_VIDEO_SHOW
=
7
const
val
TYPE_SEARCH
=
8
const
val
TYPE_EMPTY
=
9
const
val
TYPE_FOOTER
=
999
/**
* section id. 与上面相对应
...
...
@@ -33,6 +34,7 @@ interface IConfideHomeConfig{
const
val
SECTION_SOUND
=
10006
const
val
SECTION_CONSULTANT
=
10007
const
val
SECTION_SEARCH
=
10008
const
val
SECTION_EMPTY
=
10009
const
val
SECTION_FOOTER
=
19999
...
...
m-confide/src/main/res/layout/confide_empty_layout.xml
0 → 100644
View file @
02f43bf2
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:background=
"@color/white"
android:layout_height=
"match_parent"
>
<LinearLayout
android:id=
"@+id/empty_rl"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:gravity=
"center_horizontal"
android:orientation=
"vertical"
>
<View
android:layout_width=
"1dp"
android:layout_height=
"0dp"
android:layout_weight=
"2"
/>
<ImageView
android:id=
"@+id/empty_img"
android:layout_width=
"180dp"
android:layout_height=
"120dp"
android:src=
"@drawable/platform_ydl_net_loss"
/>
<TextView
android:id=
"@+id/hint_msg"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/platform_dp_35"
android:text=
"没有搜到相关信息,换个关键词看看吧"
android:textColor=
"@color/platform_color_999999"
android:textSize=
"14dp"
/>
<View
android:layout_width=
"1dp"
android:layout_height=
"0dp"
android:layout_weight=
"10"
/>
</LinearLayout>
</RelativeLayout>
\ No newline at end of file
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