JianShu/app/src/main/res/layout/perception_item.xml

169 lines
6.7 KiB
XML
Raw Normal View History

2024-04-25 10:33:59 +08:00
<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
2024-04-25 10:33:59 +08:00
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="8dp"
android:background="@drawable/mybookinfback"
app:cardCornerRadius="8dp"
app:cardElevation="4dp">
2024-04-25 10:33:59 +08:00
<LinearLayout
2024-04-25 10:33:59 +08:00
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
2024-04-25 10:33:59 +08:00
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
2024-04-25 10:33:59 +08:00
android:layout_marginTop="10dp"
android:orientation="horizontal">
<ImageView
android:id="@+id/perception_avatar"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_marginLeft="10dp" />
<TextView
android:id="@+id/perception_username"
android:layout_width="wrap_content"
android:layout_height="30dp"
android:layout_marginLeft="10dp"
android:gravity="center_vertical"
android:text="张三" />
</LinearLayout>
2024-04-25 10:33:59 +08:00
<TextView
android:id="@+id/perception_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:layout_weight="1"
android:lines="3"
android:ellipsize="end"
android:text="如果有人钟爱着一朵独一无二的盛开在浩瀚星海里的花。那么,当他抬头仰望繁星时,便会心满意足。
他会告诉自己:“我心爱的花在那里,在那颗遥远的星星上。”可是,如果羊把花吃掉了。那么,对他来说,所有的星光变
会在刹那间暗淡无光!而你却认为这并不重要!" />
2024-04-25 10:33:59 +08:00
<LinearLayout
android:id="@+id/perception_bookInf"
2024-04-25 10:33:59 +08:00
android:clickable="true"
android:layout_width="match_parent"
android:layout_height="100dp"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:layout_marginBottom="10dp"
2024-04-25 10:33:59 +08:00
android:orientation="horizontal"
2024-05-22 14:01:53 +08:00
android:background="@drawable/color_lightsteelblue"
2024-04-25 10:33:59 +08:00
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent">
2024-04-25 10:33:59 +08:00
<ImageView
android:id="@+id/perception_bookpic"
android:layout_width="100dp"
2024-04-25 10:33:59 +08:00
android:layout_height="89dp"
android:layout_marginLeft="10dp"
android:layout_marginTop="5dp"
app:srcCompat="@drawable/pre_load" />
2024-04-25 10:33:59 +08:00
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<LinearLayout
android:layout_width="160dp"
2024-04-25 10:33:59 +08:00
android:layout_height="75dp"
android:layout_marginTop="10dp"
android:orientation="vertical">
<TextView
android:id="@+id/perception_bookName"
2024-04-25 10:33:59 +08:00
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:ellipsize="end"
android:lines="1"
android:paddingTop="10dp"
android:text="围城"
2024-04-25 10:33:59 +08:00
android:textColor="@color/white"
android:textSize="15sp" />
<TextView
android:id="@+id/perception_bookAuthor"
2024-04-25 10:33:59 +08:00
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginTop="10dp"
android:text="钱钟书"
2024-04-25 10:33:59 +08:00
android:textColor="@color/white"
android:textSize="15sp" />
</LinearLayout>
<ImageView
android:layout_width="wrap_content"
android:layout_marginTop="30dp"
android:layout_height="wrap_content"
android:src="@drawable/wanttosee"/>
</LinearLayout>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginStart="15dp"
android:layout_marginEnd="10dp"
android:layout_marginBottom="5dp"
android:background="#CCCCCC" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
2024-04-25 10:33:59 +08:00
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal">
2024-04-25 10:33:59 +08:00
<ImageView
2024-05-22 14:01:53 +08:00
android:id="@+id/perception_likeicon"
android:layout_width="25dp"
android:layout_height="25dp"
android:layout_marginLeft="50dp"
android:src="@drawable/like1" />
2024-04-25 10:33:59 +08:00
<TextView
2024-05-22 14:01:53 +08:00
android:layout_gravity="center"
android:layout_marginLeft="@dimen/s_dp_5"
android:id="@+id/perception_likecnt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="点赞数" />
</LinearLayout>
2024-04-25 10:33:59 +08:00
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal"
android:gravity="end">
2024-04-25 10:33:59 +08:00
<ImageView
2024-05-22 14:01:53 +08:00
android:id="@+id/perception_collecticon"
android:layout_width="25dp"
android:layout_height="25dp"
2024-05-20 14:13:21 +08:00
android:src="@drawable/collect" />
<TextView
2024-05-22 14:01:53 +08:00
android:layout_gravity="center"
android:layout_marginLeft="@dimen/s_dp_5"
android:id="@+id/perception_collectcnt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="50dp"
2024-05-20 14:13:21 +08:00
android:text="收藏数" />
</LinearLayout>
</LinearLayout>
2024-04-25 10:33:59 +08:00
</LinearLayout>
</androidx.cardview.widget.CardView>