手机适配
This commit is contained in:
142
app/src/main/res/layout/item_circle_chat_page.xml
Normal file
142
app/src/main/res/layout/item_circle_chat_page.xml
Normal file
@@ -0,0 +1,142 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- circle每个页面的布局文件 -->
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/pageBackground"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layerType="hardware"
|
||||
android:scaleType="centerCrop"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/page"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/sw_60dp"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingStart="@dimen/sw_16dp"
|
||||
android:paddingEnd="@dimen/sw_16dp"
|
||||
android:textColor="#111111"
|
||||
android:textSize="@dimen/sw_16sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.example.myapplication.ui.circle.EdgeAwareRecyclerView
|
||||
android:id="@+id/chatRv"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:overScrollMode="never"
|
||||
app:layout_constraintBottom_toTopOf="@+id/chatFooter"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/page" />
|
||||
|
||||
<!-- ai角色详情 -->
|
||||
<FrameLayout
|
||||
android:id="@+id/chatFooter"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/sw_90dp"
|
||||
android:layout_marginBottom="@dimen/sw_40dp"
|
||||
android:background="@android:color/transparent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<de.hdodenhof.circleimageview.CircleImageView
|
||||
android:id="@+id/avatar"
|
||||
android:layout_width="@dimen/sw_54dp"
|
||||
android:layout_height="@dimen/sw_54dp"
|
||||
android:layout_marginStart="@dimen/sw_16dp"
|
||||
android:src="@drawable/default_avatar"
|
||||
android:clickable="true"
|
||||
android:focusable="true"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/pageTitle"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginStart="@dimen/sw_16dp"
|
||||
android:layout_marginEnd="@dimen/sw_16dp"
|
||||
android:gravity="center_vertical"
|
||||
android:text=""
|
||||
android:textSize="@dimen/sw_14sp"
|
||||
android:textColor="#FFFFFF" />
|
||||
|
||||
<!-- 点赞 -->
|
||||
<LinearLayout
|
||||
android:id="@+id/likeContainer"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/sw_18dp"
|
||||
android:layout_marginEnd="@dimen/sw_18dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:foreground="?attr/selectableItemBackgroundBorderless"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/like"
|
||||
android:layout_width="@dimen/sw_21dp"
|
||||
android:layout_height="@dimen/sw_19dp"
|
||||
android:layout_marginBottom="@dimen/sw_4dp"
|
||||
android:src="@drawable/like" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/likeCount"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="1"
|
||||
android:textSize="@dimen/sw_12sp"
|
||||
android:textColor="#FFFFFF" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 评论 -->
|
||||
<LinearLayout
|
||||
android:id="@+id/commentContainer"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/sw_18dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:foreground="?attr/selectableItemBackgroundBorderless"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/comment"
|
||||
android:layout_width="@dimen/sw_20dp"
|
||||
android:layout_height="@dimen/sw_18dp"
|
||||
android:layout_marginBottom="@dimen/sw_4dp"
|
||||
android:src="@drawable/comment" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/commentCount"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="1"
|
||||
android:textSize="@dimen/sw_12sp"
|
||||
android:textColor="#FFFFFF" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
Reference in New Issue
Block a user