| <?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-auto" |
| xmlns:tools="http://schemas.android.com/tools" |
| android:layout_width="match_parent" |
| android:layout_height="match_parent" |
| android:fillViewport="true" |
| tools:context=".MainActivity"> |
| <androidx.appcompat.widget.LinearLayoutCompat |
| android:orientation="vertical" |
| android:layout_width="match_parent" |
| android:layout_height="match_parent" |
| android:padding="16dp"> |
| <Button |
| android:id="@+id/copy" |
| android:text="复制Assets到模型路径" |
| android:layout_width="match_parent" |
| android:layout_height="wrap_content"/> |
| <androidx.appcompat.widget.LinearLayoutCompat |
| android:layout_marginTop="10dp" |
| android:orientation="horizontal" |
| android:layout_width="match_parent" |
| android:layout_height="wrap_content"> |
| <androidx.appcompat.widget.AppCompatSpinner |
| android:id="@+id/width" |
| android:entries="@array/Resolution" |
| android:layout_weight="1" |
| android:layout_width="0dp" |
| android:layout_height="wrap_content"/> |
| <androidx.appcompat.widget.AppCompatSpinner |
| android:id="@+id/height" |
| android:entries="@array/Resolution" |
| android:layout_weight="1" |
| android:layout_width="0dp" |
| android:layout_height="wrap_content"/> |
| </androidx.appcompat.widget.LinearLayoutCompat> |
| <androidx.appcompat.widget.LinearLayoutCompat |
| android:orientation="horizontal" |
| android:layout_width="match_parent" |
| android:layout_height="wrap_content"> |
| <EditText |
| android:id="@+id/guidance" |
| android:text="7.5" |
| android:gravity="center" |
| android:inputType="numberDecimal" |
| android:maxLines="1" |
| android:layout_weight="1" |
| android:layout_width="0dp" |
| android:layout_height="wrap_content"/> |
| <EditText |
| android:id="@+id/step" |
| android:text="8" |
| android:inputType="numberDecimal" |
| android:gravity="center" |
| android:maxLines="1" |
| android:layout_weight="1" |
| android:layout_width="0dp" |
| android:layout_height="wrap_content"/> |
| </androidx.appcompat.widget.LinearLayoutCompat> |
| <EditText |
| android:id="@+id/prompt" |
| android:text="Japanese garden at wildlife river and mountain range, highly detailed, digital illustration, artstation, concept art, matte, sharp focus, illustration, dramatic, sunset, hearthstone, art by Artgerm and Greg Rutkowski and Alphonse Mucha." |
| android:lines="2" |
| android:maxLines="2" |
| android:layout_width="match_parent" |
| android:layout_height="wrap_content"/> |
| <EditText |
| android:id="@+id/neg_prompt" |
| android:hint="Neg prompt" |
| android:lines="2" |
| android:maxLines="2" |
| android:layout_width="match_parent" |
| android:layout_height="wrap_content"/> |
| <androidx.appcompat.widget.LinearLayoutCompat |
| android:orientation="horizontal" |
| android:layout_width="match_parent" |
| android:layout_height="wrap_content"> |
| <TextView |
| android:text="seed:" |
| android:layout_gravity="center_vertical" |
| android:layout_width="wrap_content" |
| android:layout_height="wrap_content"/> |
| <EditText |
| android:id="@+id/seed" |
| android:inputType="number" |
| android:maxLines="1" |
| android:text="0" |
| android:textSize="16sp" |
| android:gravity="center" |
| android:layout_marginLeft="4dp" |
| android:layout_marginRight="4dp" |
| android:layout_gravity="center_vertical" |
| android:layout_width="100dp" |
| android:layout_height="wrap_content"/> |
| <Button |
| android:id="@+id/generate" |
| android:text="生成" |
| android:layout_gravity="center_vertical" |
| android:layout_weight="1" |
| android:layout_width="0dp" |
| android:layout_height="wrap_content"/> |
| </androidx.appcompat.widget.LinearLayoutCompat> |
| <TextView |
| android:id="@+id/msg" |
| android:gravity="center" |
| android:layout_width="match_parent" |
| android:layout_height="45dp"/> |
| <com.example.open.diffusion.SquareImageView |
| android:id="@+id/image" |
| android:scaleType="centerCrop" |
| android:layout_width="match_parent" |
| android:layout_height="wrap_content"/> |
| </androidx.appcompat.widget.LinearLayoutCompat> |
| </ScrollView> |