增加修改背景图片的按钮和修改状态栏的颜色的布局,完成布局文件的修改。

This commit is contained in:
2024-10-01 22:23:38 +08:00
parent 5b9964ece7
commit 32afb87664
3 changed files with 63 additions and 9 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

View File

@@ -119,7 +119,7 @@
<TextView
android:id="@+id/statusTextView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="20dp"
android:background="@android:color/holo_blue_dark"
android:textColor="@android:color/white"
android:textSize="12sp" />

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res - app"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
@@ -103,7 +103,6 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/choosepictextView"
android:text="选择图片" />
</RelativeLayout>
<RelativeLayout
@@ -114,15 +113,70 @@
android:id="@+id/statustextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="设置状态栏的颜色"
android:text="点击以下按钮,设置主页状态栏的颜色"
android:textSize="16sp" />
<Button
android:id="@+id/button"
android:layout_width="wrap_content"
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/statustextView"
android:text="选择图片" />
android:layout_below="@id/statustextView">
<Button
android:id="@+id/button1"
android:layout_width="0dp"
android:layout_height="20dp"
android:layout_marginEnd="5dp"
android:background="@android:color/holo_red_light"
app:layout_constraintEnd_toStartOf="@+id/button2"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintHorizontal_weight="1"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="TouchTargetSizeCheck,SpeakableTextPresentCheck" />
<Button
android:id="@+id/button2"
android:layout_width="0dp"
android:layout_height="20dp"
android:layout_marginEnd="5dp"
android:background="@android:color/holo_green_light"
app:layout_constraintEnd_toStartOf="@+id/button3"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintHorizontal_weight="1"
app:layout_constraintStart_toEndOf="@+id/button1"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="TouchTargetSizeCheck,SpeakableTextPresentCheck" />
<Button
android:id="@+id/button3"
android:layout_width="0dp"
android:layout_height="20dp"
android:layout_marginEnd="5dp"
android:background="@android:color/holo_blue_light"
app:layout_constraintEnd_toStartOf="@+id/button4"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintHorizontal_weight="1"
app:layout_constraintStart_toEndOf="@+id/button2"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="TouchTargetSizeCheck,SpeakableTextPresentCheck" />
<Button
android:id="@+id/button4"
android:layout_width="0dp"
android:layout_height="20dp"
android:layout_marginEnd="5dp"
android:background="@android:color/holo_orange_light"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintHorizontal_weight="1"
app:layout_constraintStart_toEndOf="@+id/button3"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="TouchTargetSizeCheck,SpeakableTextPresentCheck" />
</androidx.constraintlayout.widget.ConstraintLayout>
</RelativeLayout>
</LinearLayout>
</ScrollView>