Commit 05a81045 by 范玉宾

article_murcielago UI to be done

parent cea87958
package widget
import androidx.fragment.app.DialogFragment
class ArticleDialogFragment: DialogFragment() {
}
\ No newline at end of file
<?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
<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>
<?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
...@@ -78,7 +78,7 @@ class HomeBaseHttp { ...@@ -78,7 +78,7 @@ class HomeBaseHttp {
//首页文章请求 //首页文章请求
fun getArticleData(): Observable<BaseAPIResponse<HomeArticleBean>> { 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) return getHomePagerApi().getArticleData(perPageRows = articleListSize)
} }
......
...@@ -96,10 +96,10 @@ interface HomeBasePagerApi { ...@@ -96,10 +96,10 @@ interface HomeBasePagerApi {
@Headers(YDL_DOMAIN + YDL_DOMAIN_JAVA) @Headers(YDL_DOMAIN + YDL_DOMAIN_JAVA)
fun getFMData(@Query("perPageRows") perPageRows: String = "4"): Observable<BaseAPIResponse<HomeFMBean>> fun getFMData(@Query("perPageRows") perPageRows: String = "4"): Observable<BaseAPIResponse<HomeFMBean>>
//首页文章请求 //首页文章请求 文章改版需求改为3条
@GET("article/list/all") @GET("article/list/all")
@Headers(YDL_DOMAIN + YDL_DOMAIN_JAVA) @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 @FormUrlEncoded
......
...@@ -38,8 +38,8 @@ class HomeArticleItemView(private val mContext: Context, private var homeEvent: ...@@ -38,8 +38,8 @@ class HomeArticleItemView(private val mContext: Context, private var homeEvent:
homeModuleArticleItemViewTitle.text = bean?.title homeModuleArticleItemViewTitle.text = bean?.title
homeModuleArticleItemViewContent.text = bean?.desc homeModuleArticleItemViewContent.text = bean?.desc
homeModuleArticleItemViewAuthor.text = bean?.name homeModuleArticleItemViewAuthor.text = bean?.name
homeModuleArticleItemViewGreatNum.text = bean?.countOfFavorite.toString() homeModuleArticleItemViewGreatNum.text = "点赞${bean?.countOfFavorite}"
homeModuleArticleItemViewLookNum.text = bean?.readNum.toString() homeModuleArticleItemViewLookNum.text = "浏览${bean?.readNum}"
YDLImageCacheManager.showImage(mContext, bean?.imgUrl, homeModuleArticleItemViewImg) YDLImageCacheManager.showImage(mContext, bean?.imgUrl, homeModuleArticleItemViewImg)
setOnClickListener { setOnClickListener {
homeEvent?.articleItemClick(bean) homeEvent?.articleItemClick(bean)
......
...@@ -4,14 +4,14 @@ ...@@ -4,14 +4,14 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:paddingLeft="@dimen/platform_dp_15" android:paddingLeft="16dp"
android:paddingRight="@dimen/platform_dp_15" android:paddingRight="16dp"
android:paddingTop="@dimen/platform_dp_15"> android:paddingTop="4dp">
<androidx.cardview.widget.CardView <androidx.cardview.widget.CardView
android:id="@+id/homeModuleArticleItemViewCardImg" android:id="@+id/homeModuleArticleItemViewCardImg"
android:layout_width="@dimen/platform_dp_127" android:layout_width="70dp"
android:layout_height="@dimen/platform_dp_88" android:layout_height="70dp"
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
app:cardCornerRadius="@dimen/platform_dp_6" app:cardCornerRadius="@dimen/platform_dp_6"
app:cardElevation="0dp"> app:cardElevation="0dp">
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:scaleType="centerCrop" android:scaleType="centerCrop"
android:id="@+id/homeModuleArticleItemViewImg" android:id="@+id/homeModuleArticleItemViewImg"
android:background="@drawable/home_image_default_back"/> tools:src="@drawable/home_image_default_back"/>
</androidx.cardview.widget.CardView> </androidx.cardview.widget.CardView>
<TextView <TextView
...@@ -29,32 +29,30 @@ ...@@ -29,32 +29,30 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:maxLines="2" android:maxLines="2"
android:ellipsize="end" android:ellipsize="end"
android:textSize="@dimen/platform_dp_18" android:textSize="16sp"
android:textStyle="bold" android:textStyle="bold"
android:layout_marginTop="-2dp" android:textColor="#1C1F28"
android:textColor="@color/platform_color_222222"
android:layout_alignParentTop="true" android:layout_alignParentTop="true"
android:lineSpacingExtra="@dimen/platform_dp_1" android:lineSpacingExtra="@dimen/platform_dp_1"
tools:text="喧嚣的世界中,你的重要何以而来?喧嚣的世界中,你的重要何以而来?" tools:text="喧嚣的世界中,你的重要何以而来?喧嚣的世界中,你的重要何以而来?"
android:layout_alignParentLeft="true" android:layout_alignParentLeft="true"
android:layout_toLeftOf="@+id/homeModuleArticleItemViewCardImg" android:layout_toLeftOf="@+id/homeModuleArticleItemViewCardImg"
android:layout_marginRight="@dimen/platform_dp_20"/> android:layout_marginRight="14dp"/>
<TextView <TextView
android:id="@+id/homeModuleArticleItemViewContent" android:id="@+id/homeModuleArticleItemViewContent"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:singleLine="true"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:maxLines="2"
android:ellipsize="end" android:ellipsize="end"
android:textSize="@dimen/platform_dp_13" android:textSize="@dimen/platform_dp_13"
android:layout_marginTop="@dimen/platform_dp_4" android:layout_marginTop="5dp"
android:textColor="@color/platform_color_666666" android:textColor="#9D9EA7"
android:layout_alignParentLeft="true" android:layout_alignParentLeft="true"
android:layout_below="@+id/homeModuleArticleItemViewTitle" android:layout_below="@+id/homeModuleArticleItemViewTitle"
android:lineSpacingExtra="@dimen/platform_dp_3"
tools:text="喧嚣的世界中,你的重要何以而来?当我伫立在我所伫立之处..." tools:text="喧嚣的世界中,你的重要何以而来?当我伫立在我所伫立之处..."
android:layout_toLeftOf="@+id/homeModuleArticleItemViewCardImg" android:layout_toLeftOf="@+id/homeModuleArticleItemViewCardImg"
android:layout_marginRight="@dimen/platform_dp_20"/> android:layout_marginRight="9dp"/>
<LinearLayout <LinearLayout
android:id="@+id/homeModuleArticleItemViewBottomLayout" android:id="@+id/homeModuleArticleItemViewBottomLayout"
...@@ -62,12 +60,12 @@ ...@@ -62,12 +60,12 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="center_vertical" android:gravity="center_vertical"
android:layout_below="@+id/homeModuleArticleItemViewCardImg" android:layout_below="@+id/homeModuleArticleItemViewCardImg"
android:layout_marginTop="@dimen/platform_dp_16"> android:layout_marginTop="20dp">
<ImageView <ImageView
android:id="@+id/homeModuleArticleItemViewIcon" android:id="@+id/homeModuleArticleItemViewIcon"
android:layout_width="@dimen/platform_dp_12" android:layout_width="16dp"
android:layout_height="@dimen/platform_dp_12" android:layout_height="16dp"
android:src="@drawable/home_article_item_icon" android:src="@drawable/home_article_item_icon"
android:layout_alignParentLeft="true"/> android:layout_alignParentLeft="true"/>
...@@ -76,42 +74,28 @@ ...@@ -76,42 +74,28 @@
android:layout_width="0dp" android:layout_width="0dp"
android:layout_weight="1" android:layout_weight="1"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="@dimen/platform_dp_12" android:textSize="13sp"
android:textColor="@color/platform_color_242424" android:textColor="#666666"
android:layout_marginLeft="@dimen/platform_dp_3" android:layout_marginLeft="@dimen/platform_dp_3"
android:textStyle="bold" android:textStyle="bold"
tools:text="赵秀英"/> tools:text="赵秀英"/>
<TextView <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:id="@+id/homeModuleArticleItemViewLookNum"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
tools:text="2656" tools:text="浏览2656"
android:textSize="@dimen/platform_dp_12" android:textSize="13sp"
android:textColor="@color/platform_color_242424"/> android:textColor="#62636F"/>
<TextView <TextView
android:id="@+id/homeModuleArticleItemViewGreatNum"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="浏览" android:layout_marginStart="20dp"
android:textSize="@dimen/platform_dp_11" tools:text="点赞3327"
android:textColor="@color/platform_color_666666"/> android:textSize="13sp"
android:textColor="#62636F"/>
</LinearLayout> </LinearLayout>
...@@ -119,9 +103,10 @@ ...@@ -119,9 +103,10 @@
android:id="@+id/homeModuleArticleItemViewBottomLine" android:id="@+id/homeModuleArticleItemViewBottomLine"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="0.5dp" android:layout_height="0.5dp"
android:background="@color/platform_color_EBEBEB" android:background="#EFEFF1"
android:layout_centerInParent="true" android:layout_centerInParent="true"
android:layout_below="@+id/homeModuleArticleItemViewBottomLayout" android:layout_below="@+id/homeModuleArticleItemViewBottomLayout"
android:layout_marginTop="@dimen/platform_dp_16"/> android:layout_marginTop="20dp"
android:layout_marginBottom="20dp"/>
</RelativeLayout> </RelativeLayout>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment