冲刺第十天
昨天的任务是查询界面的设计
今天的任务是完善代码,美化界面
困难是界面设计的具体操作
<?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"
tools:context=".Jzchaxun">
<LinearLayout
android:id="@+id/search_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<EditText
android:id="@+id/edit_donator"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="捐赠者"
android:inputType="textPersonName"
android:maxLines="1" />
<EditText
android:id="@+id/edit_location"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="地点"
android:inputType="textPersonName"
android:maxLines="1" />
<EditText
android:id="@+id/edit_classes"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="类别"
android:inputType="textPersonName"
android:maxLines="1" />
<Button
android:id="@+id/button_search"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="搜索"
android:backgroundTint="@color/Orange1"
/>
</LinearLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="412dp"
android:layout_height="541dp"
android:padding="8dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/search_layout"
app:layout_constraintVertical_bias="1.0"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
<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"
tools:context=".Jzchaxun">
<LinearLayout
android:id="@+id/search_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<EditText
android:id="@+id/edit_donator"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="捐赠者"
android:inputType="textPersonName"
android:maxLines="1" />
<EditText
android:id="@+id/edit_location"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="地点"
android:inputType="textPersonName"
android:maxLines="1" />
<EditText
android:id="@+id/edit_classes"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="类别"
android:inputType="textPersonName"
android:maxLines="1" />
<Button
android:id="@+id/button_search"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="搜索"
android:backgroundTint="@color/Orange1"
/>
</LinearLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="412dp"
android:layout_height="541dp"
android:padding="8dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/search_layout"
app:layout_constraintVertical_bias="1.0"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
/>
</androidx.constraintlayout.widget.ConstraintLayout>