第九天 | |
所花时间 | 1h |
代码量 | 50行 |
博客量 | 1篇 |
学到的知识 | 按钮图片的插入 |
<?xml version="1.0" encoding="utf-8"?> <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" 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" android:background="#FFFFFF" tools:context=".stud"> <TextView android:id="@+id/timeTextView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="24sp" android:textStyle="bold" android:textColor="#808080" tools:ignore="MissingConstraints" /> <ImageView android:id="@+id/addButton" android:layout_width="33dp" android:layout_height="19dp" android:layout_margin="16dp" android:layout_marginTop="16dp" android:layout_marginEnd="44dp" android:contentDescription="Add" android:src="@drawable/ic_add" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintTop_toTopOf="parent" /> <TextView android:id="@+id/addHint" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="点击加号进行添加待办" android:textColor="#000000" android:textSize="8sp" app:layout_constraintEnd_toEndOf="@id/addButton" app:layout_constraintHorizontal_bias="0.659" app:layout_constraintStart_toStartOf="@id/addButton" app:layout_constraintTop_toBottomOf="@id/addButton" /> <View android:id="@+id/backgroundView" android:layout_width="match_parent" android:layout_height="20dp" android:background="#87CEFA" app:layout_constraintTop_toBottomOf="@id/addHint" tools:layout_editor_absoluteX="-16dp" /> <Button android:id="@+id/studyLogButton" android:layout_width="406dp" android:layout_height="44dp" android:layout_marginTop="4dp" android:background="@drawable/button_background" android:text="进行打卡/添加今日学习记录" android:textColor="#000000" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintHorizontal_bias="0.4" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@id/backgroundView" /> <Button android:id="@+id/viewTodoButton" android:layout_width="406dp" android:layout_height="44dp" android:layout_marginTop="4dp" android:background="@drawable/ic_back" android:text="查看今日待办" android:textColor="#000000" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintHorizontal_bias="0.4" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@id/studyLogButton" /> <Button android:id="@+id/statisticsButton" android:layout_width="406dp" android:layout_height="44dp" android:layout_marginTop="4dp" android:background="@drawable/button" android:text="统计本月打卡数" android:textColor="#000000" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintHorizontal_bias="0.4" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@id/viewTodoButton" /> </androidx.constraintlayout.widget.ConstraintLayout>
标签:学到,第九天,3.15,50,按钮,1h From: https://www.cnblogs.com/dmx-03/p/18087872