Skip to content

Commit ed4f59f

Browse files
committed
Update
1 parent 4750eda commit ed4f59f

2 files changed

Lines changed: 6 additions & 7 deletions

File tree

app/src/main/java/com/tool/tree/TextEditorActivity.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -184,12 +184,12 @@ class TextEditorActivity : AppCompatActivity() {
184184
this,
185185
title = getString(R.string.editor_unsaved_title),
186186
message = getString(R.string.editor_unsaved_message),
187-
onConfirm = DialogHelper.DialogButton(getString(R.string.editor_save)) {
187+
onConfirm = DialogHelper.DialogButton(getString(R.string.editor_save), onClick = Runnable {
188188
saveFile { success -> if (success) finish() }
189-
},
190-
onCancel = DialogHelper.DialogButton(getString(R.string.editor_discard)) {
189+
}),
190+
onCancel = DialogHelper.DialogButton(getString(R.string.editor_discard), onClick = Runnable {
191191
finish()
192-
}
192+
})
193193
)
194194
}
195195

app/src/main/res/layout/activity_text_editor.xml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,19 @@
1616
<HorizontalScrollView
1717
android:id="@+id/editor_scroll_horizontal"
1818
android:layout_width="match_parent"
19-
android:layout_height="wrap_content"
19+
android:layout_height="match_parent"
2020
android:fillViewport="true"
2121
android:scrollbarStyle="insideOverlay">
2222

2323
<EditText
2424
android:id="@+id/editor_content"
2525
android:layout_width="match_parent"
26-
android:layout_height="wrap_content"
26+
android:layout_height="match_parent"
2727
android:background="@android:color/transparent"
2828
android:gravity="top|start"
2929
android:hint="@string/editor_hint_empty"
3030
android:inputType="textMultiLine|textNoSuggestions"
3131
android:imeOptions="flagNoExtractUi"
32-
android:minHeight="match_parent"
3332
android:padding="16dp"
3433
android:textColor="?android:attr/textColorPrimary"
3534
android:textColorHint="?android:attr/textColorSecondary"

0 commit comments

Comments
 (0)