将首页返回结果从 TextView 改为 EditText,支持编辑和自动高度
This commit is contained in:
@@ -51,7 +51,7 @@
|
||||
- **提示词选择器**:下拉菜单选择系统提示词,显示提示词内容预览
|
||||
- **输入区域**:多行文本输入,字符计数显示
|
||||
- **发送/停止**:发送按钮 + 生成中可停止
|
||||
- **结果展示区**:状态标签 + 结果文本 + 复制按钮
|
||||
- **结果展示区**:状态标签 + 可编辑结果文本 + 复制按钮
|
||||
|
||||
## 构建说明
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ class MainActivity : AppCompatActivity() {
|
||||
private lateinit var inputEditText: EditText
|
||||
private lateinit var configButton: Button
|
||||
private lateinit var outputStatusLabel: TextView
|
||||
private lateinit var outputTextView: TextView
|
||||
private lateinit var outputTextView: EditText
|
||||
private lateinit var promptSelector: Spinner
|
||||
private lateinit var promptNameText: TextView
|
||||
private lateinit var promptContentText: TextView
|
||||
@@ -68,7 +68,7 @@ class MainActivity : AppCompatActivity() {
|
||||
val sendButton = findViewById<Button>(R.id.sendButton)
|
||||
val stopButton = findViewById<Button>(R.id.stopButton)
|
||||
outputStatusLabel = findViewById<TextView>(R.id.outputStatusLabel)
|
||||
outputTextView = findViewById<TextView>(R.id.outputTextView)
|
||||
outputTextView = findViewById<EditText>(R.id.outputTextView)
|
||||
val btnCopyResult = findViewById<Button>(R.id.btnCopyResult)
|
||||
val headerTitle = findViewById<TextView>(R.id.headerTitle)
|
||||
val headerModelName = findViewById<TextView>(R.id.headerModelName)
|
||||
|
||||
@@ -259,14 +259,17 @@
|
||||
android:textColor="@color/primary"
|
||||
android:layout_marginBottom="8dp"/>
|
||||
|
||||
<TextView
|
||||
<EditText
|
||||
android:id="@+id/outputTextView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minLines="3"
|
||||
android:textSize="14sp"
|
||||
android:text="发送消息后结果将在此显示"
|
||||
android:textColor="@color/text_secondary"/>
|
||||
android:textColor="@color/text_secondary"
|
||||
android:editable="true"
|
||||
android:gravity="top"
|
||||
android:background="@android:drawable/edit_text"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
|
||||
Reference in New Issue
Block a user