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
05a81045
Commit
05a81045
authored
Jul 04, 2022
by
范玉宾
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
article_murcielago UI to be done
parent
cea87958
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
195 additions
and
49 deletions
+195
-49
ArticleDialogFragment.kt
m-article/src/main/java/widget/ArticleDialogFragment.kt
+10
-0
article_bg_publish.xml
m-article/src/main/res/drawable/article_bg_publish.xml
+10
-0
article_close_dialog.xml
m-article/src/main/res/drawable/article_close_dialog.xml
+84
-0
layout_comment_article.xml
m-article/src/main/res/layout/layout_comment_article.xml
+57
-0
HomeBaseHttp.kt
m-home/src/main/java/com/yidianling/home/http/HomeBaseHttp.kt
+1
-1
HomeBasePagerApi.kt
m-home/src/main/java/com/yidianling/home/http/HomeBasePagerApi.kt
+2
-2
HomeArticleItemView.kt
m-home/src/ydl/java/com/yidianling/home/ui/view/HomeArticleItemView.kt
+2
-2
home_article_item_view.xml
m-home/src/ydl/res/layout/home_article_item_view.xml
+29
-44
No files found.
m-article/src/main/java/widget/ArticleDialogFragment.kt
0 → 100644
View file @
05a81045
package
widget
import
androidx.fragment.app.DialogFragment
class
ArticleDialogFragment
:
DialogFragment
()
{
}
\ No newline at end of file
m-article/src/main/res/drawable/article_bg_publish.xml
0 → 100644
View file @
05a81045
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<corners
android:radius=
"4dp"
/>
<solid
android:color=
"#1DA1F2"
/>
</shape>
\ No newline at end of file
m-article/src/main/res/drawable/article_close_dialog.xml
0 → 100644
View file @
05a81045
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"24dp"
android:height=
"24dp"
android:viewportWidth=
"24"
android:viewportHeight=
"24"
>
<path
android:pathData=
"M-13,-228h375v813h-375z"
android:strokeWidth=
"1"
android:fillColor=
"#FAFAFB"
android:fillType=
"evenOdd"
android:strokeColor=
"#00000000"
/>
<path
android:pathData=
"M-13,-76h375v333h-375z"
android:strokeWidth=
"1"
android:fillColor=
"#FFFFFF"
android:fillType=
"evenOdd"
android:strokeColor=
"#00000000"
/>
<path
android:pathData=
"M-14,-246h376v854h-376z"
android:strokeAlpha=
"0.452821"
android:strokeWidth=
"1"
android:fillColor=
"#000000"
android:fillType=
"evenOdd"
android:strokeColor=
"#00000000"
android:fillAlpha=
"0.452821"
/>
<path
android:pathData=
"M-5,-15L355,-15C359.4183,-15 363,-11.4183 363,-7L363,262L363,262L-13,262L-13,-7C-13,-11.4183 -9.4183,-15 -5,-15Z"
android:strokeWidth=
"1"
android:fillColor=
"#000000"
android:fillType=
"evenOdd"
android:strokeColor=
"#00000000"
/>
<path
android:pathData=
"M-5,-15L355,-15C359.4183,-15 363,-11.4183 363,-7L363,262L363,262L-13,262L-13,-7C-13,-11.4183 -9.4183,-15 -5,-15Z"
android:strokeWidth=
"1"
android:fillColor=
"#FFFFFF"
android:fillType=
"evenOdd"
android:strokeColor=
"#00000000"
/>
<path
android:pathData=
"M6.6504,17.4636L17.6504,6.4636M17.6504,17.4636L6.6504,6.4636"
android:strokeWidth=
"1.8"
android:fillColor=
"#00000000"
android:strokeColor=
"#242424"
android:fillType=
"evenOdd"
android:strokeLineCap=
"round"
/>
<path
android:pathData=
"M-13,-228h375v813h-375z"
android:strokeWidth=
"1"
android:fillColor=
"#FAFAFB"
android:fillType=
"evenOdd"
android:strokeColor=
"#00000000"
/>
<path
android:pathData=
"M-13,-76h375v333h-375z"
android:strokeWidth=
"1"
android:fillColor=
"#FFFFFF"
android:fillType=
"evenOdd"
android:strokeColor=
"#00000000"
/>
<path
android:pathData=
"M-14,-246h376v854h-376z"
android:strokeAlpha=
"0.452821"
android:strokeWidth=
"1"
android:fillColor=
"#000000"
android:fillType=
"evenOdd"
android:strokeColor=
"#00000000"
android:fillAlpha=
"0.452821"
/>
<path
android:pathData=
"M-5,-15L355,-15C359.4183,-15 363,-11.4183 363,-7L363,262L363,262L-13,262L-13,-7C-13,-11.4183 -9.4183,-15 -5,-15Z"
android:strokeWidth=
"1"
android:fillColor=
"#000000"
android:fillType=
"evenOdd"
android:strokeColor=
"#00000000"
/>
<path
android:pathData=
"M-5,-15L355,-15C359.4183,-15 363,-11.4183 363,-7L363,262L363,262L-13,262L-13,-7C-13,-11.4183 -9.4183,-15 -5,-15Z"
android:strokeWidth=
"1"
android:fillColor=
"#FFFFFF"
android:fillType=
"evenOdd"
android:strokeColor=
"#00000000"
/>
<path
android:pathData=
"M6.6504,17.4636L17.6504,6.4636M17.6504,17.4636L6.6504,6.4636"
android:strokeWidth=
"1.8"
android:fillColor=
"#00000000"
android:strokeColor=
"#242424"
android:fillType=
"evenOdd"
android:strokeLineCap=
"round"
/>
</vector>
m-article/src/main/res/layout/layout_comment_article.xml
0 → 100644
View file @
05a81045
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
>
<ImageView
android:id=
"@+id/iv_close_dialog"
android:layout_width=
"50dp"
android:layout_height=
"50dp"
android:layout_marginTop=
"2dp"
android:padding=
"13dp"
android:src=
"@drawable/article_close_dialog"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"发布评论"
android:textStyle=
"bold"
android:textSize=
"16sp"
android:textColor=
"#1C1F28"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintTop_toTopOf=
"@id/iv_close_dialog"
app:layout_constraintBottom_toBottomOf=
"@id/iv_close_dialog"
/>
<TextView
android:id=
"@+id/tv_publish_comment"
android:layout_width=
"55dp"
android:layout_height=
"28dp"
android:gravity=
"center"
android:layout_marginEnd=
"15dp"
android:text=
"发布"
android:textColor=
"@color/white"
android:textStyle=
"bold"
android:textSize=
"14sp"
android:background=
"@drawable/article_bg_publish"
app:layout_constraintTop_toTopOf=
"@id/iv_close_dialog"
app:layout_constraintBottom_toBottomOf=
"@id/iv_close_dialog"
app:layout_constraintEnd_toEndOf=
"parent"
/>
<androidx.appcompat.widget.AppCompatEditText
android:id=
"@+id/et_article_comment"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:padding=
"20dp"
android:minHeight=
"260dp"
android:hint=
"请输入你的评论"
android:textColorHint=
"#C3C4CA"
android:textSize=
"16sp"
app:layout_constraintTop_toBottomOf=
"@id/iv_close_dialog"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
m-home/src/main/java/com/yidianling/home/http/HomeBaseHttp.kt
View file @
05a81045
...
...
@@ -78,7 +78,7 @@ class HomeBaseHttp {
//首页文章请求
fun
getArticleData
():
Observable
<
BaseAPIResponse
<
HomeArticleBean
>>
{
articleListSize
=
if
(
YdlCommonOut
.
getApp
().
packageName
==
"com.cxzapp.xinlizixun"
)
"6"
else
"
4
"
articleListSize
=
if
(
YdlCommonOut
.
getApp
().
packageName
==
"com.cxzapp.xinlizixun"
)
"6"
else
"
3
"
return
getHomePagerApi
().
getArticleData
(
perPageRows
=
articleListSize
)
}
...
...
m-home/src/main/java/com/yidianling/home/http/HomeBasePagerApi.kt
View file @
05a81045
...
...
@@ -96,10 +96,10 @@ interface HomeBasePagerApi {
@Headers
(
YDL_DOMAIN
+
YDL_DOMAIN_JAVA
)
fun
getFMData
(
@Query
(
"perPageRows"
)
perPageRows
:
String
=
"4"
):
Observable
<
BaseAPIResponse
<
HomeFMBean
>>
//首页文章请求
//首页文章请求
文章改版需求改为3条
@GET
(
"article/list/all"
)
@Headers
(
YDL_DOMAIN
+
YDL_DOMAIN_JAVA
)
fun
getArticleData
(
@Query
(
"perPageRows"
)
perPageRows
:
String
=
"
4
"
):
Observable
<
BaseAPIResponse
<
HomeArticleBean
>>
fun
getArticleData
(
@Query
(
"perPageRows"
)
perPageRows
:
String
=
"
3
"
):
Observable
<
BaseAPIResponse
<
HomeArticleBean
>>
//首页问答 - 点赞
@FormUrlEncoded
...
...
m-home/src/ydl/java/com/yidianling/home/ui/view/HomeArticleItemView.kt
View file @
05a81045
...
...
@@ -38,8 +38,8 @@ class HomeArticleItemView(private val mContext: Context, private var homeEvent:
homeModuleArticleItemViewTitle
.
text
=
bean
?.
title
homeModuleArticleItemViewContent
.
text
=
bean
?.
desc
homeModuleArticleItemViewAuthor
.
text
=
bean
?.
name
homeModuleArticleItemViewGreatNum
.
text
=
bean
?.
countOfFavorite
.
toString
()
homeModuleArticleItemViewLookNum
.
text
=
bean
?.
readNum
.
toString
()
homeModuleArticleItemViewGreatNum
.
text
=
"点赞${bean?.countOfFavorite}"
homeModuleArticleItemViewLookNum
.
text
=
"浏览${bean?.readNum}"
YDLImageCacheManager
.
showImage
(
mContext
,
bean
?.
imgUrl
,
homeModuleArticleItemViewImg
)
setOnClickListener
{
homeEvent
?.
articleItemClick
(
bean
)
...
...
m-home/src/ydl/res/layout/home_article_item_view.xml
View file @
05a81045
...
...
@@ -4,14 +4,14 @@
android:layout_height=
"wrap_content"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
android:paddingLeft=
"
@dimen/platform_dp_15
"
android:paddingRight=
"
@dimen/platform_dp_15
"
android:paddingTop=
"
@dimen/platform_dp_15
"
>
android:paddingLeft=
"
16dp
"
android:paddingRight=
"
16dp
"
android:paddingTop=
"
4dp
"
>
<androidx.cardview.widget.CardView
android:id=
"@+id/homeModuleArticleItemViewCardImg"
android:layout_width=
"
@dimen/platform_dp_127
"
android:layout_height=
"
@dimen/platform_dp_88
"
android:layout_width=
"
70dp
"
android:layout_height=
"
70dp
"
android:layout_alignParentRight=
"true"
app:cardCornerRadius=
"@dimen/platform_dp_6"
app:cardElevation=
"0dp"
>
...
...
@@ -20,7 +20,7 @@
android:layout_height=
"match_parent"
android:scaleType=
"centerCrop"
android:id=
"@+id/homeModuleArticleItemViewImg"
android:background
=
"@drawable/home_image_default_back"
/>
tools:src
=
"@drawable/home_image_default_back"
/>
</androidx.cardview.widget.CardView>
<TextView
...
...
@@ -29,32 +29,30 @@
android:layout_height=
"wrap_content"
android:maxLines=
"2"
android:ellipsize=
"end"
android:textSize=
"
@dimen/platform_dp_18
"
android:textSize=
"
16sp
"
android:textStyle=
"bold"
android:layout_marginTop=
"-2dp"
android:textColor=
"@color/platform_color_222222"
android:textColor=
"#1C1F28"
android:layout_alignParentTop=
"true"
android:lineSpacingExtra=
"@dimen/platform_dp_1"
tools:text=
"喧嚣的世界中,你的重要何以而来?喧嚣的世界中,你的重要何以而来?"
android:layout_alignParentLeft=
"true"
android:layout_toLeftOf=
"@+id/homeModuleArticleItemViewCardImg"
android:layout_marginRight=
"
@dimen/platform_dp_20
"
/>
android:layout_marginRight=
"
14dp
"
/>
<TextView
android:id=
"@+id/homeModuleArticleItemViewContent"
android:layout_width=
"wrap_content"
android:singleLine=
"true"
android:layout_height=
"wrap_content"
android:maxLines=
"2"
android:ellipsize=
"end"
android:textSize=
"@dimen/platform_dp_13"
android:layout_marginTop=
"
@dimen/platform_dp_4
"
android:textColor=
"
@color/platform_color_666666
"
android:layout_marginTop=
"
5dp
"
android:textColor=
"
#9D9EA7
"
android:layout_alignParentLeft=
"true"
android:layout_below=
"@+id/homeModuleArticleItemViewTitle"
android:lineSpacingExtra=
"@dimen/platform_dp_3"
tools:text=
"喧嚣的世界中,你的重要何以而来?当我伫立在我所伫立之处..."
android:layout_toLeftOf=
"@+id/homeModuleArticleItemViewCardImg"
android:layout_marginRight=
"
@dimen/platform_dp_20
"
/>
android:layout_marginRight=
"
9dp
"
/>
<LinearLayout
android:id=
"@+id/homeModuleArticleItemViewBottomLayout"
...
...
@@ -62,12 +60,12 @@
android:layout_height=
"wrap_content"
android:gravity=
"center_vertical"
android:layout_below=
"@+id/homeModuleArticleItemViewCardImg"
android:layout_marginTop=
"
@dimen/platform_dp_16
"
>
android:layout_marginTop=
"
20dp
"
>
<ImageView
android:id=
"@+id/homeModuleArticleItemViewIcon"
android:layout_width=
"
@dimen/platform_dp_12
"
android:layout_height=
"
@dimen/platform_dp_12
"
android:layout_width=
"
16dp
"
android:layout_height=
"
16dp
"
android:src=
"@drawable/home_article_item_icon"
android:layout_alignParentLeft=
"true"
/>
...
...
@@ -76,42 +74,28 @@
android:layout_width=
"0dp"
android:layout_weight=
"1"
android:layout_height=
"wrap_content"
android:textSize=
"
@dimen/platform_dp_12
"
android:textColor=
"
@color/platform_color_242424
"
android:textSize=
"
13sp
"
android:textColor=
"
#666666
"
android:layout_marginLeft=
"@dimen/platform_dp_3"
android:textStyle=
"bold"
tools:text=
"赵秀英"
/>
<TextView
android:id=
"@+id/homeModuleArticleItemViewGreatNum"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
tools:text=
"3327"
android:textSize=
"@dimen/platform_dp_12"
android:textColor=
"@color/platform_color_242424"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"点赞"
android:textSize=
"@dimen/platform_dp_11"
android:layout_marginRight=
"@dimen/platform_dp_12"
android:textColor=
"@color/platform_color_666666"
/>
<TextView
android:id=
"@+id/homeModuleArticleItemViewLookNum"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
tools:text=
"2656"
android:textSize=
"
@dimen/platform_dp_12
"
android:textColor=
"
@color/platform_color_242424
"
/>
tools:text=
"
浏览
2656"
android:textSize=
"
13sp
"
android:textColor=
"
#62636F
"
/>
<TextView
android:id=
"@+id/homeModuleArticleItemViewGreatNum"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"浏览"
android:textSize=
"@dimen/platform_dp_11"
android:textColor=
"@color/platform_color_666666"
/>
android:layout_marginStart=
"20dp"
tools:text=
"点赞3327"
android:textSize=
"13sp"
android:textColor=
"#62636F"
/>
</LinearLayout>
...
...
@@ -119,9 +103,10 @@
android:id=
"@+id/homeModuleArticleItemViewBottomLine"
android:layout_width=
"match_parent"
android:layout_height=
"0.5dp"
android:background=
"
@color/platform_color_EBEBEB
"
android:background=
"
#EFEFF1
"
android:layout_centerInParent=
"true"
android:layout_below=
"@+id/homeModuleArticleItemViewBottomLayout"
android:layout_marginTop=
"@dimen/platform_dp_16"
/>
android:layout_marginTop=
"20dp"
android:layout_marginBottom=
"20dp"
/>
</RelativeLayout>
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