Photography_Wallpapers_com..../app/src/main/res/layout/activity_search.xml
2025-05-27 14:18:26 +08:00

114 lines
4.0 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout 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:paddingTop="30dp">
<ImageView
android:id="@+id/imageview_back"
android:layout_width="45dp"
android:layout_height="45dp"
android:layout_gravity="center"
android:background="@drawable/oval"
android:padding="13dp"
android:layout_marginStart="7dp"
android:layout_alignTop="@id/title"
android:src="@drawable/image_black_back"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<com.wall.photography.wallpapers.tool.MyText
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:padding="10dp"
android:layout_marginTop="12dp"
android:text="@string/app_name"
android:textColor="@color/black"
android:textSize="17sp"
app:apply_font="true" />
<RelativeLayout
android:id="@+id/et_parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/title"
android:layout_marginStart="15dp"
android:layout_marginTop="5dp"
android:layout_marginEnd="5dp"
android:layout_toStartOf="@id/btn_search"
android:background="@drawable/rect_stoke_16">
<EditText
android:id="@+id/et"
android:layout_width="match_parent"
android:layout_height="41dp"
android:background="@color/color_0"
android:hint="@string/please_input_keyword"
android:imeOptions="actionSearch"
android:inputType="text"
android:maxLines="1"
android:paddingStart="11dp"
android:paddingEnd="10dp"
android:textColorHint="@color/sub_title_color"
android:textSize="16sp" />
</RelativeLayout>
<ImageView
android:id="@+id/btn_search"
android:layout_width="55dp"
android:layout_height="wrap_content"
android:layout_alignTop="@id/et_parent"
android:layout_alignBottom="@id/et_parent"
android:layout_alignParentEnd="true"
android:layout_marginEnd="10dp"
android:paddingStart="15dp"
android:paddingTop="6dp"
android:paddingEnd="15dp"
android:paddingBottom="6dp"
android:src="@drawable/image_search_white" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/result_recycler"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@id/et_parent"
android:layout_marginTop="10dp" />
<LinearLayout
android:id="@+id/empty_layout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:gravity="center"
android:orientation="vertical"
android:visibility="gone">
<ImageView
android:layout_width="100dp"
android:layout_height="100dp"
android:src="@drawable/img_empty_result" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:text="@string/no_search_result"
android:textColor="@color/sub_title_color" />
</LinearLayout>
<ProgressBar
android:id="@+id/search_pb"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:indeterminateTint="@color/color_FEA7F5"
android:visibility="gone" />
</RelativeLayout>