消息中心官方通知时间位置改版,标题显示两行设置

This commit is contained in:
老皮 2024-09-26 16:54:55 +08:00
parent 4029392dad
commit 265e360670
3 changed files with 26 additions and 16 deletions

View File

@ -7,7 +7,7 @@
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="24dp" android:layout_height="35dp"
android:background="@color/white" /> android:background="@color/white" />
</LinearLayout> </LinearLayout>

View File

@ -6,10 +6,26 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical"> android:orientation="vertical">
<!--这个系统消息--> <!--这个系统消息-->
<TextView
android:id="@+id/time"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="2-24 17:00"
android:textColor="#ff8c8c8c"
android:gravity="center"
android:textSize="12sp"
android:layout_marginTop="28dp"
/>
<RelativeLayout <RelativeLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="10dp" android:layout_marginStart="10dp"
android:layout_marginEnd="10dp"
android:layout_marginTop="18dp"
android:background="@drawable/background_fff"> android:background="@drawable/background_fff">
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/titleLayout" android:id="@+id/titleLayout"
@ -27,20 +43,14 @@
android:textColor="#ff161616" android:textColor="#ff161616"
android:textSize="16sp" android:textSize="16sp"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/time" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
android:maxLines="2"
android:ellipsize="end"
android:layout_marginEnd="5dp"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="2-24 17:00"
android:textColor="#ff8c8c8c"
android:textSize="12sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
@ -109,10 +119,9 @@
android:layout_width="7dp" android:layout_width="7dp"
android:layout_height="7dp" android:layout_height="7dp"
android:layout_alignParentEnd="true" android:layout_alignParentEnd="true"
android:layout_marginTop="5dp" android:layout_marginTop="10dp"
android:layout_marginEnd="5dp" android:layout_marginEnd="10dp"
app:cardBackgroundColor="#FF0000" app:cardBackgroundColor="#FF0000"
android:visibility="gone"
app:cardCornerRadius="20dp" /> app:cardCornerRadius="20dp" />
</RelativeLayout> </RelativeLayout>

View File

@ -71,6 +71,7 @@
android:layout_weight="1" android:layout_weight="1"
android:maxLines="2" android:maxLines="2"
android:text="標題" android:text="標題"
android:ellipsize="end"
android:textColor="#000000" android:textColor="#000000"
android:textSize="16sp" android:textSize="16sp"
android:textStyle="bold" /> android:textStyle="bold" />