Skip to content

Commit

Permalink
fix #290, open the keyboard by default at the file editor at empty files
Browse files Browse the repository at this point in the history
  • Loading branch information
tibbi committed Feb 16, 2019
1 parent 1d4e098 commit 16d315d
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ class ReadTextActivity : SimpleActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_read_text)
hideKeyboard()

handlePermission(PERMISSION_WRITE_STORAGE) {
if (it) {
Expand Down Expand Up @@ -144,5 +143,10 @@ class ReadTextActivity : SimpleActivity() {
}

read_text_view.setText(originalText)
if (originalText.isNotEmpty()) {
hideKeyboard()
} else {
showKeyboard(read_text_view)
}
}
}

0 comments on commit 16d315d

Please sign in to comment.