aaa
Some checks failed
Flask 提示词大师 - CI/CD 流水线 / 代码质量检查 (push) Has been cancelled
Flask 提示词大师 - CI/CD 流水线 / 单元测试 (push) Has been cancelled
Flask 提示词大师 - CI/CD 流水线 / 集成测试 (push) Has been cancelled
Flask 提示词大师 - CI/CD 流水线 / 构建Docker镜像 (push) Has been cancelled
Flask 提示词大师 - CI/CD 流水线 / 部署到测试环境 (push) Has been cancelled
Flask 提示词大师 - CI/CD 流水线 / 部署到生产环境 (push) Has been cancelled
Flask 提示词大师 - CI/CD 流水线 / 部署监控系统 (push) Has been cancelled
6
example/app/src/main/res/anim/dialog_dismiss.xml
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<translate
|
||||
android:toYDelta="100%p"
|
||||
android:duration="500" />
|
||||
</set>
|
||||
18
example/app/src/main/res/anim/dialog_in_anim.xml
Normal file
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!--
|
||||
有四种动画:alpha (透明变化) translate(位置移动) scale(缩放) rotate(旋转),
|
||||
android:duration: 动画运行时间,定义在多次时间(ms)内完成动画
|
||||
android:startOffset: 延迟一定时间后运行动画
|
||||
fromXDelta: X轴方向开始位置,可以是%,也可以是具体的像素 具体见图
|
||||
toXDelta: X轴方向结束位置,可以是%,也可以是具体的像素
|
||||
fromYDelta: Y轴方向开始位置,可以是%,也可以是具体的像素
|
||||
toYDelta: Y轴方向结束位置,可以是%,也可以是具体的像素
|
||||
-->
|
||||
<translate
|
||||
android:duration="500"
|
||||
android:fromXDelta="0"
|
||||
android:fromYDelta="100%p"
|
||||
android:toXDelta="0"
|
||||
android:toYDelta="0%p" />
|
||||
</set>
|
||||
9
example/app/src/main/res/anim/dialog_out_anim.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<translate
|
||||
android:duration="500"
|
||||
android:fromXDelta="0"
|
||||
android:fromYDelta="0%p"
|
||||
android:toXDelta="0"
|
||||
android:toYDelta="100%p" />
|
||||
</set>
|
||||
6
example/app/src/main/res/anim/dialog_show.xml
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<translate
|
||||
android:fromYDelta="100%p"
|
||||
android:duration="500" />
|
||||
</set>
|
||||
8
example/app/src/main/res/anim/push_bottom_in2.xml
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!-- 上下滑入式 -->
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<translate
|
||||
android:duration="200"
|
||||
android:fromYDelta="100%p"
|
||||
android:toYDelta="0%p" />
|
||||
</set>
|
||||
11
example/app/src/main/res/anim/push_bottom_out2.xml
Normal file
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!-- 上下滑入式 -->
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
|
||||
<translate
|
||||
android:duration="200"
|
||||
android:fromYDelta="0"
|
||||
android:toYDelta="100%p" />
|
||||
|
||||
|
||||
</set>
|
||||
6
example/app/src/main/res/anim/scale_in.xml
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<alpha xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:duration="300"
|
||||
android:fromAlpha="0.0"
|
||||
android:interpolator="@android:anim/accelerate_interpolator"
|
||||
android:toAlpha="1.0" />
|
||||
6
example/app/src/main/res/anim/scale_out.xml
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<alpha xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:duration="300"
|
||||
android:fromAlpha="1.0"
|
||||
android:interpolator="@android:anim/accelerate_interpolator"
|
||||
android:toAlpha="0.0" />
|
||||
16
example/app/src/main/res/anim/slide_in_bottom.xml
Normal file
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:interpolator="@android:interpolator/accelerate_decelerate"
|
||||
>
|
||||
|
||||
<translate
|
||||
android:duration="@android:integer/config_mediumAnimTime"
|
||||
android:fromYDelta="100%p"
|
||||
android:toYDelta="0" />
|
||||
|
||||
<alpha
|
||||
android:duration="@android:integer/config_mediumAnimTime"
|
||||
android:fromAlpha="0.95"
|
||||
android:toAlpha="1" />
|
||||
|
||||
</set>
|
||||
14
example/app/src/main/res/anim/slide_out_bottom.xml
Normal file
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
|
||||
<translate
|
||||
android:duration="@android:integer/config_mediumAnimTime"
|
||||
android:fromYDelta="0"
|
||||
android:toYDelta="100%p" />
|
||||
|
||||
<alpha
|
||||
android:duration="@android:integer/config_mediumAnimTime"
|
||||
android:fromAlpha="1"
|
||||
android:toAlpha="0.95" />
|
||||
|
||||
</set>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:color="@color/colorAccent" android:state_selected="true"/>
|
||||
<item android:color="@color/colorTextDark" android:state_selected="false"/>
|
||||
</selector>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:color="@color/colorAccent" android:state_enabled="true"/>
|
||||
<item android:color="@color/colorText" android:state_enabled="false"/>
|
||||
</selector>
|
||||
5
example/app/src/main/res/color/selector_tag_text.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:color="@color/colorPrimary" android:state_checked="true" />
|
||||
<item android:color="@color/colorAccent" />
|
||||
</selector><!-- From: file:/D:/Android/work/MerchantEdition/app/src/main/res/drawable/main_menu_selector.xml -->
|
||||
BIN
example/app/src/main/res/drawable-hdpi/ic_launcher.png
Normal file
|
After Width: | Height: | Size: 9.2 KiB |
BIN
example/app/src/main/res/drawable-mdpi/ic_launcher.png
Normal file
|
After Width: | Height: | Size: 5.1 KiB |
@@ -0,0 +1,34 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:aapt="http://schemas.android.com/aapt"
|
||||
android:width="108dp"
|
||||
android:height="108dp"
|
||||
android:viewportHeight="108"
|
||||
android:viewportWidth="108">
|
||||
<path
|
||||
android:fillType="evenOdd"
|
||||
android:pathData="M32,64C32,64 38.39,52.99 44.13,50.95C51.37,48.37 70.14,49.57 70.14,49.57L108.26,87.69L108,109.01L75.97,107.97L32,64Z"
|
||||
android:strokeColor="#00000000"
|
||||
android:strokeWidth="1">
|
||||
<aapt:attr name="android:fillColor">
|
||||
<gradient
|
||||
android:endX="78.5885"
|
||||
android:endY="90.9159"
|
||||
android:startX="48.7653"
|
||||
android:startY="61.0927"
|
||||
android:type="linear">
|
||||
<item
|
||||
android:color="#44000000"
|
||||
android:offset="0.0" />
|
||||
<item
|
||||
android:color="#00000000"
|
||||
android:offset="1.0" />
|
||||
</gradient>
|
||||
</aapt:attr>
|
||||
</path>
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:fillType="nonZero"
|
||||
android:pathData="M66.94,46.02L66.94,46.02C72.44,50.07 76,56.61 76,64L32,64C32,56.61 35.56,50.11 40.98,46.06L36.18,41.19C35.45,40.45 35.45,39.3 36.18,38.56C36.91,37.81 38.05,37.81 38.78,38.56L44.25,44.05C47.18,42.57 50.48,41.71 54,41.71C57.48,41.71 60.78,42.57 63.68,44.05L69.11,38.56C69.84,37.81 70.98,37.81 71.71,38.56C72.44,39.3 72.44,40.45 71.71,41.19L66.94,46.02ZM62.94,56.92C64.08,56.92 65,56.01 65,54.88C65,53.76 64.08,52.85 62.94,52.85C61.8,52.85 60.88,53.76 60.88,54.88C60.88,56.01 61.8,56.92 62.94,56.92ZM45.06,56.92C46.2,56.92 47.13,56.01 47.13,54.88C47.13,53.76 46.2,52.85 45.06,52.85C43.92,52.85 43,53.76 43,54.88C43,56.01 43.92,56.92 45.06,56.92Z"
|
||||
android:strokeColor="#00000000"
|
||||
android:strokeWidth="1" />
|
||||
</vector>
|
||||
BIN
example/app/src/main/res/drawable-xhdpi/buybuybuy.png
Normal file
|
After Width: | Height: | Size: 9.8 KiB |
BIN
example/app/src/main/res/drawable-xhdpi/chat_left_bg.9.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
example/app/src/main/res/drawable-xhdpi/chat_left_qp.9.png
Normal file
|
After Width: | Height: | Size: 488 B |
BIN
example/app/src/main/res/drawable-xhdpi/chat_right_bg.9.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
example/app/src/main/res/drawable-xhdpi/chat_right_qp.9.png
Normal file
|
After Width: | Height: | Size: 567 B |
BIN
example/app/src/main/res/drawable-xhdpi/ic_launcher.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
example/app/src/main/res/drawable-xhdpi/to_down.png
Normal file
|
After Width: | Height: | Size: 549 B |
BIN
example/app/src/main/res/drawable-xhdpi/video_icon.png
Normal file
|
After Width: | Height: | Size: 469 B |
BIN
example/app/src/main/res/drawable-xxhdpi/ic_launcher.png
Normal file
|
After Width: | Height: | Size: 19 KiB |
170
example/app/src/main/res/drawable/ic_launcher_background.xml
Normal file
@@ -0,0 +1,170 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="108dp"
|
||||
android:height="108dp"
|
||||
android:viewportHeight="108"
|
||||
android:viewportWidth="108">
|
||||
<path
|
||||
android:fillColor="#26A69A"
|
||||
android:pathData="M0,0h108v108h-108z" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M9,0L9,108"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,0L19,108"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M29,0L29,108"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M39,0L39,108"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M49,0L49,108"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M59,0L59,108"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M69,0L69,108"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M79,0L79,108"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M89,0L89,108"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M99,0L99,108"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,9L108,9"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,19L108,19"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,29L108,29"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,39L108,39"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,49L108,49"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,59L108,59"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,69L108,69"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,79L108,79"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,89L108,89"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,99L108,99"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,29L89,29"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,39L89,39"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,49L89,49"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,59L89,59"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,69L89,69"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,79L89,79"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M29,19L29,89"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M39,19L39,89"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M49,19L49,89"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M59,19L59,89"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M69,19L69,89"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M79,19L79,89"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
</vector>
|
||||
6
example/app/src/main/res/drawable/shape_dialog.xml
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape android:shape="rectangle"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="#ff848484" />
|
||||
<corners android:topLeftRadius="13dp" android:topRightRadius="13dp" android:bottomLeftRadius="13dp" android:bottomRightRadius="13dp" />
|
||||
</shape>
|
||||
288
example/app/src/main/res/layout/activity_main.xml
Normal file
@@ -0,0 +1,288 @@
|
||||
<?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:background="@color/colorSurface"
|
||||
android:fillViewport="true">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<!-- 标题栏:应用名 + 设置 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_marginBottom="16dp">
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/app_name"
|
||||
android:textColor="@color/colorPrimary"
|
||||
android:textSize="24sp"
|
||||
android:textStyle="bold" />
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_settings"
|
||||
style="@style/Widget.MaterialComponents.Button.TextButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="设置" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 预设提示区 -->
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="常用提示"
|
||||
android:textColor="@color/colorTextSecondary"
|
||||
android:textSize="12sp"
|
||||
android:layout_marginBottom="8dp" />
|
||||
<com.google.android.material.chip.ChipGroup
|
||||
android:id="@+id/preset_chip_group"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:singleSelection="false"
|
||||
app:selectionRequired="false"
|
||||
android:layout_marginBottom="16dp">
|
||||
|
||||
<com.google.android.material.chip.Chip
|
||||
android:id="@+id/preset_email"
|
||||
style="@style/Widget.MaterialComponents.Chip.Choice"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/preset_email" />
|
||||
<com.google.android.material.chip.Chip
|
||||
android:id="@+id/preset_product"
|
||||
style="@style/Widget.MaterialComponents.Chip.Choice"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/preset_product" />
|
||||
<com.google.android.material.chip.Chip
|
||||
android:id="@+id/preset_story"
|
||||
style="@style/Widget.MaterialComponents.Chip.Choice"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/preset_story" />
|
||||
<com.google.android.material.chip.Chip
|
||||
android:id="@+id/preset_summary"
|
||||
style="@style/Widget.MaterialComponents.Chip.Choice"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/preset_summary" />
|
||||
<com.google.android.material.chip.Chip
|
||||
android:id="@+id/preset_poem"
|
||||
style="@style/Widget.MaterialComponents.Chip.Choice"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/preset_poem" />
|
||||
</com.google.android.material.chip.ChipGroup>
|
||||
|
||||
<!-- 输入区 -->
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/prompt_hint"
|
||||
app:boxBackgroundColor="@color/colorCard"
|
||||
app:boxStrokeColor="@color/colorPrimary"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
android:layout_marginBottom="12dp">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/input_prompt"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minLines="4"
|
||||
android:gravity="top"
|
||||
android:inputType="textMultiLine|textCapSentences" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<!-- 生成长度 -->
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="生成长度"
|
||||
android:textColor="@color/colorTextSecondary"
|
||||
android:textSize="12sp"
|
||||
android:layout_marginBottom="4dp" />
|
||||
<com.google.android.material.slider.Slider
|
||||
android:id="@+id/slider_length"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:valueFrom="0"
|
||||
android:valueTo="2"
|
||||
android:stepSize="1"
|
||||
android:value="1"
|
||||
app:labelBehavior="gone"
|
||||
android:layout_marginBottom="8dp" />
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginBottom="12dp">
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/length_short"
|
||||
android:textSize="12sp"
|
||||
android:textColor="@color/colorTextSecondary" />
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/length_medium"
|
||||
android:textSize="12sp"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/colorTextSecondary" />
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/length_long"
|
||||
android:textSize="12sp"
|
||||
android:gravity="end"
|
||||
android:textColor="@color/colorTextSecondary" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 创意程度 -->
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="创意程度"
|
||||
android:textColor="@color/colorTextSecondary"
|
||||
android:textSize="12sp"
|
||||
android:layout_marginBottom="4dp" />
|
||||
<com.google.android.material.slider.Slider
|
||||
android:id="@+id/slider_temperature"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:valueFrom="0"
|
||||
android:valueTo="2"
|
||||
android:stepSize="1"
|
||||
android:value="1"
|
||||
app:labelBehavior="gone"
|
||||
android:layout_marginBottom="8dp" />
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginBottom="16dp">
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/temp_conservative"
|
||||
android:textSize="12sp"
|
||||
android:textColor="@color/colorTextSecondary" />
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/temp_balanced"
|
||||
android:textSize="12sp"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/colorTextSecondary" />
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/temp_creative"
|
||||
android:textSize="12sp"
|
||||
android:gravity="end"
|
||||
android:textColor="@color/colorTextSecondary" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 生成按钮 -->
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_generate"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="56dp"
|
||||
android:text="@string/btn_generate"
|
||||
app:backgroundTint="@color/colorPrimary"
|
||||
android:textColor="@color/colorWhite"
|
||||
android:layout_marginBottom="20dp" />
|
||||
|
||||
<!-- 加载指示 -->
|
||||
<ProgressBar
|
||||
android:id="@+id/progress_bar"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:visibility="gone"
|
||||
android:layout_marginBottom="16dp" />
|
||||
|
||||
<!-- 结果展示区 -->
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="生成结果"
|
||||
android:textColor="@color/colorTextSecondary"
|
||||
android:textSize="12sp"
|
||||
android:layout_marginBottom="8dp" />
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:cardBackgroundColor="@color/colorCard"
|
||||
app:cardElevation="2dp"
|
||||
app:cardCornerRadius="12dp"
|
||||
android:minHeight="120dp"
|
||||
android:layout_marginBottom="12dp">
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:fillViewport="true"
|
||||
android:padding="16dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/result_text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/result_placeholder"
|
||||
android:textColor="@color/colorText"
|
||||
android:textSize="15sp"
|
||||
android:lineSpacingMultiplier="1.2"
|
||||
tools:text="这里是流式显示的结果文本…" />
|
||||
</ScrollView>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<!-- 操作按钮栏 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingBottom="24dp">
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_copy"
|
||||
style="@style/Widget.MaterialComponents.Button.TextButton"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/btn_copy" />
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_regenerate"
|
||||
style="@style/Widget.MaterialComponents.Button.TextButton"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/btn_regenerate" />
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_continue"
|
||||
style="@style/Widget.MaterialComponents.Button.TextButton"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/btn_continue" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
30
example/app/src/main/res/layout/dialog_loading.xml
Normal file
@@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/shape_dialog"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:padding="24dp">
|
||||
|
||||
<ProgressBar
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:indeterminateTint="@color/colorPrimary" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
android:text="@string/loading"
|
||||
android:textColor="@color/colorTextDark"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@drawable/ic_launcher_background" />
|
||||
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
||||
</adaptive-icon>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@drawable/ic_launcher_background" />
|
||||
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
||||
</adaptive-icon>
|
||||
BIN
example/app/src/main/res/mipmap-hdpi/add_icon.png
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
BIN
example/app/src/main/res/mipmap-hdpi/address_icon.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
example/app/src/main/res/mipmap-hdpi/camera_icon.png
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
example/app/src/main/res/mipmap-hdpi/chakan_icon.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
example/app/src/main/res/mipmap-hdpi/daifukuan_icon.png
Normal file
|
After Width: | Height: | Size: 809 B |
BIN
example/app/src/main/res/mipmap-hdpi/feiyong_icon.jpg
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
example/app/src/main/res/mipmap-hdpi/fragment_my_bg.png
Normal file
|
After Width: | Height: | Size: 9.2 KiB |
BIN
example/app/src/main/res/mipmap-hdpi/fuwubiaozun_icon.png
Normal file
|
After Width: | Height: | Size: 6.5 KiB |
BIN
example/app/src/main/res/mipmap-hdpi/fuwuzhong_icon.png
Normal file
|
After Width: | Height: | Size: 857 B |
BIN
example/app/src/main/res/mipmap-hdpi/fw_icon.png
Normal file
|
After Width: | Height: | Size: 8.3 KiB |
BIN
example/app/src/main/res/mipmap-hdpi/home_bj.png
Normal file
|
After Width: | Height: | Size: 36 KiB |
BIN
example/app/src/main/res/mipmap-hdpi/ic_launcher.png
Normal file
|
After Width: | Height: | Size: 3.0 KiB |
BIN
example/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
Normal file
|
After Width: | Height: | Size: 4.9 KiB |
BIN
example/app/src/main/res/mipmap-hdpi/icon_activity.png
Normal file
|
After Width: | Height: | Size: 869 B |
BIN
example/app/src/main/res/mipmap-hdpi/icon_add_des.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
example/app/src/main/res/mipmap-hdpi/icon_address_blue.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
example/app/src/main/res/mipmap-hdpi/icon_balance.png
Normal file
|
After Width: | Height: | Size: 953 B |
BIN
example/app/src/main/res/mipmap-hdpi/icon_cheched_false.png
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
example/app/src/main/res/mipmap-hdpi/icon_cheched_true.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
example/app/src/main/res/mipmap-hdpi/icon_clear.png
Normal file
|
After Width: | Height: | Size: 697 B |
BIN
example/app/src/main/res/mipmap-hdpi/icon_cus_new.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
example/app/src/main/res/mipmap-hdpi/icon_default_empty.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
example/app/src/main/res/mipmap-hdpi/icon_default_head.png
Normal file
|
After Width: | Height: | Size: 3.3 KiB |
BIN
example/app/src/main/res/mipmap-hdpi/icon_delete.png
Normal file
|
After Width: | Height: | Size: 683 B |
BIN
example/app/src/main/res/mipmap-hdpi/icon_down.png
Normal file
|
After Width: | Height: | Size: 421 B |
BIN
example/app/src/main/res/mipmap-hdpi/icon_error.png
Normal file
|
After Width: | Height: | Size: 23 KiB |
BIN
example/app/src/main/res/mipmap-hdpi/icon_fenpei.png
Normal file
|
After Width: | Height: | Size: 575 B |
BIN
example/app/src/main/res/mipmap-hdpi/icon_fudong.png
Normal file
|
After Width: | Height: | Size: 4.0 KiB |
BIN
example/app/src/main/res/mipmap-hdpi/icon_historytime.png
Normal file
|
After Width: | Height: | Size: 653 B |
BIN
example/app/src/main/res/mipmap-hdpi/icon_live.png
Normal file
|
After Width: | Height: | Size: 789 B |
BIN
example/app/src/main/res/mipmap-hdpi/icon_logo.png
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
example/app/src/main/res/mipmap-hdpi/icon_nodata.png
Normal file
|
After Width: | Height: | Size: 25 KiB |
BIN
example/app/src/main/res/mipmap-hdpi/icon_per_data.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
example/app/src/main/res/mipmap-hdpi/icon_pro_ima_bq.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
example/app/src/main/res/mipmap-hdpi/icon_pro_ima_cj.png
Normal file
|
After Width: | Height: | Size: 2.7 KiB |
BIN
example/app/src/main/res/mipmap-hdpi/icon_pro_ima_jd.png
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
BIN
example/app/src/main/res/mipmap-hdpi/icon_quxiao.png
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
example/app/src/main/res/mipmap-hdpi/icon_reply_sty.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
example/app/src/main/res/mipmap-hdpi/icon_setting.png
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
BIN
example/app/src/main/res/mipmap-hdpi/icon_time.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
example/app/src/main/res/mipmap-hdpi/icon_time_b.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
example/app/src/main/res/mipmap-hdpi/icon_version.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
example/app/src/main/res/mipmap-hdpi/icon_vip_one.png
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
example/app/src/main/res/mipmap-hdpi/icon_watch_blue.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
example/app/src/main/res/mipmap-hdpi/icon_watch_k.png
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
example/app/src/main/res/mipmap-hdpi/icon_wode.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
example/app/src/main/res/mipmap-hdpi/icon_ycj.png
Normal file
|
After Width: | Height: | Size: 7.7 KiB |
BIN
example/app/src/main/res/mipmap-hdpi/icon_yihuishou.png
Normal file
|
After Width: | Height: | Size: 6.4 KiB |
BIN
example/app/src/main/res/mipmap-hdpi/icon_yinsi.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
example/app/src/main/res/mipmap-hdpi/lianxi_icon.png
Normal file
|
After Width: | Height: | Size: 792 B |
BIN
example/app/src/main/res/mipmap-hdpi/liaojie_icon.png
Normal file
|
After Width: | Height: | Size: 2.9 KiB |
BIN
example/app/src/main/res/mipmap-hdpi/marking_down_pic.png
Normal file
|
After Width: | Height: | Size: 305 B |
BIN
example/app/src/main/res/mipmap-hdpi/page_welcome.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
example/app/src/main/res/mipmap-hdpi/peihu_icon.png
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
BIN
example/app/src/main/res/mipmap-hdpi/phgl.png
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
example/app/src/main/res/mipmap-hdpi/phgl_hui.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
example/app/src/main/res/mipmap-hdpi/quanbu_icon.png
Normal file
|
After Width: | Height: | Size: 714 B |
BIN
example/app/src/main/res/mipmap-hdpi/setting_icon.png
Normal file
|
After Width: | Height: | Size: 552 B |
BIN
example/app/src/main/res/mipmap-hdpi/shenfen_down_icon.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
example/app/src/main/res/mipmap-hdpi/shenfen_up_icon.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
example/app/src/main/res/mipmap-hdpi/time_icon.png
Normal file
|
After Width: | Height: | Size: 698 B |
BIN
example/app/src/main/res/mipmap-hdpi/xindingdan_icon.png
Normal file
|
After Width: | Height: | Size: 4.5 KiB |
BIN
example/app/src/main/res/mipmap-hdpi/yiwancheng_icon.png
Normal file
|
After Width: | Height: | Size: 765 B |
BIN
example/app/src/main/res/mipmap-hdpi/yiyuan_icon.png
Normal file
|
After Width: | Height: | Size: 485 B |
BIN
example/app/src/main/res/mipmap-hdpi/yiyuantwo_icon.png
Normal file
|
After Width: | Height: | Size: 1013 B |
BIN
example/app/src/main/res/mipmap-hdpi/ziliao_icon.png
Normal file
|
After Width: | Height: | Size: 515 B |
BIN
example/app/src/main/res/mipmap-mdpi/add_icon.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
example/app/src/main/res/mipmap-mdpi/address_icon.png
Normal file
|
After Width: | Height: | Size: 749 B |
BIN
example/app/src/main/res/mipmap-mdpi/camera_icon.png
Normal file
|
After Width: | Height: | Size: 997 B |