|
@@ -0,0 +1,40 @@
|
|
|
+<?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=".ui.fragment.UniqueRequestFragment">
|
|
|
+
|
|
|
+ <TextView
|
|
|
+ android:layout_width="match_parent"
|
|
|
+ android:layout_height="50dp"
|
|
|
+ android:gravity="center_vertical"
|
|
|
+ android:paddingHorizontal="16dp"
|
|
|
+ android:text="重复发起相同网络请求时, 取消上次未完成请求"
|
|
|
+ android:textSize="12dp"
|
|
|
+ app:layout_constraintTop_toTopOf="parent" />
|
|
|
+
|
|
|
+ <Button
|
|
|
+ android:id="@+id/btn_request"
|
|
|
+ android:layout_width="wrap_content"
|
|
|
+ android:layout_height="wrap_content"
|
|
|
+ android:layout_gravity="center"
|
|
|
+ android:text="发起请求"
|
|
|
+ app:layout_constraintBottom_toBottomOf="parent"
|
|
|
+ app:layout_constraintLeft_toLeftOf="parent"
|
|
|
+ app:layout_constraintRight_toRightOf="parent"
|
|
|
+ app:layout_constraintTop_toTopOf="parent" />
|
|
|
+
|
|
|
+ <TextView
|
|
|
+ android:id="@+id/tv_result"
|
|
|
+ android:layout_width="match_parent"
|
|
|
+ android:layout_height="wrap_content"
|
|
|
+ android:layout_marginTop="32dp"
|
|
|
+ android:gravity="center"
|
|
|
+ android:paddingHorizontal="16dp"
|
|
|
+ android:textColor="@color/black"
|
|
|
+ app:layout_constraintTop_toBottomOf="@id/btn_request"
|
|
|
+ tools:text="请求结果" />
|
|
|
+
|
|
|
+</androidx.constraintlayout.widget.ConstraintLayout>
|