Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
beyond-clouds-android
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
云深项目组
beyond-clouds-android
Commits
bc14ee9f
Commit
bc14ee9f
authored
Mar 14, 2020
by
段启岩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
博客列表优化
parent
d8ffc637
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
5 deletions
+9
-5
app/src/main/java/cn/yunliyunwai/beyondclouds/adapter/BlogListAdapter.java
+4
-1
app/src/main/res/layout/blog_item.xml
+5
-4
No files found.
app/src/main/java/cn/yunliyunwai/beyondclouds/adapter/BlogListAdapter.java
View file @
bc14ee9f
...
@@ -53,7 +53,7 @@ public class BlogListAdapter extends BaseQuickAdapter<Blog , BlogListAdapter.Blo
...
@@ -53,7 +53,7 @@ public class BlogListAdapter extends BaseQuickAdapter<Blog , BlogListAdapter.Blo
BlogItemBinding
binding
=
helper
.
binding
;
BlogItemBinding
binding
=
helper
.
binding
;
binding
.
txtTitle
.
setText
(
blog
.
getBlogTitle
());
binding
.
txtTitle
.
setText
(
blog
.
getBlogTitle
());
binding
.
txtAbstract
.
setText
(
blog
.
getBlogAbstract
());
binding
.
txtAbstract
.
setText
(
blog
.
getBlogAbstract
());
if
(
null
!=
blog
.
getCover
()
&&
!
TextUtils
.
isEmpty
(
blog
.
getCover
()))
{
if
(
null
!=
blog
.
getCover
()
&&
!
TextUtils
.
isEmpty
(
blog
.
getCover
()
.
trim
()
))
{
RequestOptions
options
=
new
RequestOptions
()
RequestOptions
options
=
new
RequestOptions
()
.
centerCrop
()
.
centerCrop
()
.
placeholder
(
R
.
drawable
.
pic1
)
//预加载图片
.
placeholder
(
R
.
drawable
.
pic1
)
//预加载图片
...
@@ -62,6 +62,8 @@ public class BlogListAdapter extends BaseQuickAdapter<Blog , BlogListAdapter.Blo
...
@@ -62,6 +62,8 @@ public class BlogListAdapter extends BaseQuickAdapter<Blog , BlogListAdapter.Blo
.
diskCacheStrategy
(
DiskCacheStrategy
.
NONE
)
//缓存
.
diskCacheStrategy
(
DiskCacheStrategy
.
NONE
)
//缓存
.
transform
(
new
GlideRoundTransform
(
3
));
//圆角
.
transform
(
new
GlideRoundTransform
(
3
));
//圆角
Glide
.
with
(
helper
.
binding
.
getRoot
().
getContext
()).
load
(
blog
.
getCover
()).
apply
(
options
).
into
(
binding
.
blogCover
);
Glide
.
with
(
helper
.
binding
.
getRoot
().
getContext
()).
load
(
blog
.
getCover
()).
apply
(
options
).
into
(
binding
.
blogCover
);
}
else
{
binding
.
blogCover
.
setVisibility
(
View
.
GONE
);
}
}
}
}
}
}
\ No newline at end of file
app/src/main/res/layout/blog_item.xml
View file @
bc14ee9f
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"22dp"
android:layout_height=
"22dp"
android:text=
"SpringBoot迭代发布JRA瘦身配置"
android:text=
"SpringBoot迭代发布JRA瘦身配置"
android:textSize=
"1
5
sp"
android:textSize=
"1
6
sp"
android:textColor=
"@color/colorTextAccent"
android:textColor=
"@color/colorTextAccent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
app:layout_constraintTop_toTopOf=
"parent"
/>
...
@@ -34,8 +34,9 @@
...
@@ -34,8 +34,9 @@
android:id=
"@+id/txt_abstract"
android:id=
"@+id/txt_abstract"
android:layout_marginTop=
"10dp"
android:layout_marginTop=
"10dp"
android:layout_width=
"0dp"
android:layout_width=
"0dp"
android:layout_height=
"55dp"
android:layout_height=
"wrap_content"
android:textSize=
"13sp"
android:maxHeight=
"55dp"
android:textSize=
"12sp"
android:text=
"我们所处的时代我们所处的时代我们所处的时代我们所处的时代我们所处的时代我们所处的时代我们所处的时代我们所处的时代"
android:text=
"我们所处的时代我们所处的时代我们所处的时代我们所处的时代我们所处的时代我们所处的时代我们所处的时代我们所处的时代"
app:layout_constraintTop_toBottomOf=
"@id/barrier_title"
app:layout_constraintTop_toBottomOf=
"@id/barrier_title"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
...
@@ -57,7 +58,7 @@
...
@@ -57,7 +58,7 @@
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
app:barrierDirection=
"bottom"
app:barrierDirection=
"bottom"
app:constraint_referenced_ids=
"txt_abstract"
app:constraint_referenced_ids=
"txt_abstract
,blog_cover
"
tools:layout_editor_absoluteX=
"12dp"
tools:layout_editor_absoluteX=
"12dp"
tools:layout_editor_absoluteY=
"16dp"
/>
tools:layout_editor_absoluteY=
"16dp"
/>
...
...
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