修改主页样式,修复时钟不准确

This commit is contained in:
2022-09-14 22:37:43 +08:00
parent cce03a09b4
commit c4e2f11922
19 changed files with 208 additions and 25 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

@@ -19,7 +19,7 @@
android:layout_marginStart="8dp"
android:adjustViewBounds="true"
android:scaleType="centerCrop"
android:src="@drawable/back"
android:src="@drawable/back_white"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

View File

@@ -17,7 +17,7 @@
android:adjustViewBounds="true"
android:layout_marginStart="8dp"
android:scaleType="centerCrop"
android:src="@drawable/back"
android:src="@drawable/back_white"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

View File

@@ -104,6 +104,7 @@
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/iv_head"
android:layout_width="100dp"
android:layout_height="100dp"
android:adjustViewBounds="true"
@@ -114,6 +115,16 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_2"
android:textColor="@color/black"
app:layout_constraintEnd_toEndOf="@+id/iv_head"
app:layout_constraintStart_toStartOf="@+id/iv_head"
app:layout_constraintTop_toBottomOf="@+id/iv_head" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout

View File

@@ -9,12 +9,12 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
android:orientation="horizontal">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="3">
android:layout_height="match_parent"
android:layout_weight="1">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="0dp"
@@ -22,7 +22,7 @@
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="4dp"
android:layout_marginBottom="4dp"
android:layout_marginBottom="8dp"
android:layout_weight="1"
android:background="@drawable/custom_background">
@@ -170,9 +170,16 @@
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:layout_weight="1">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="0dp"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginStart="4dp"
android:layout_marginTop="8dp"
@@ -258,20 +265,14 @@
app:layout_constraintEnd_toEndOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="2">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_activity"
android:layout_width="0dp"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginStart="8dp"
android:layout_marginStart="4dp"
android:layout_marginTop="4dp"
android:layout_marginEnd="4dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="8dp"
android:layout_weight="1"
android:background="@drawable/custom_background">
@@ -389,6 +390,7 @@
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_demand"
android:layout_width="0dp"
android:visibility="gone"
android:layout_height="match_parent"
android:layout_marginStart="4dp"
android:layout_marginTop="4dp"
@@ -510,6 +512,4 @@
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>
</LinearLayout>
</FrameLayout>

View File

@@ -19,7 +19,7 @@
android:layout_marginStart="8dp"
android:adjustViewBounds="true"
android:scaleType="centerCrop"
android:src="@drawable/back"
android:src="@drawable/back_white"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

View File

@@ -17,7 +17,7 @@
android:adjustViewBounds="true"
android:layout_marginStart="8dp"
android:scaleType="centerCrop"
android:src="@drawable/back"
android:src="@drawable/back_white"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

View File

@@ -7,8 +7,44 @@
tools:context=".activity.alarm.AlarmClockActivity">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/constraintLayout4"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="32dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:id="@+id/iv_back"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:adjustViewBounds="true"
android:scaleType="centerCrop"
android:src="@drawable/back_black"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="爱心闹钟"
android:textSize="@dimen/sp_16"
android:textColor="@color/black"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginTop="@dimen/dp_4"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@+id/constraintLayout4">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView"