File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
app/src/main/kotlin/org/fossify/notes Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -23,8 +23,6 @@ import android.util.TypedValue
2323import android.view.ActionMode
2424import android.view.Gravity
2525import android.view.MenuItem
26- import android.view.WindowManager.LayoutParams.SOFT_INPUT_STATE_VISIBLE
27- import android.view.WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN
2826import android.view.inputmethod.EditorInfo
2927import android.webkit.WebResourceRequest
3028import android.webkit.WebView
@@ -551,7 +549,6 @@ class MainActivity : SimpleActivity() {
551549 }
552550
553551 private fun initViewPager (wantedNoteId : Long? = null) {
554- window.setSoftInputMode(SOFT_INPUT_STATE_VISIBLE or SOFT_INPUT_ADJUST_PAN )
555552 NotesHelper (this ).getNotes { notes ->
556553 notes.filter { it.shouldBeUnlocked(this ) }
557554 .forEach(::removeProtection)
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ package org.fossify.notes.fragments
22
33import android.annotation.SuppressLint
44import android.content.Context
5+ import android.graphics.Rect
56import android.graphics.Typeface
67import android.os.Bundle
78import android.text.Editable
@@ -169,6 +170,12 @@ class TextFragment : NoteFragment() {
169170 requestFocus()
170171 val inputManager = requireActivity().getSystemService(Context .INPUT_METHOD_SERVICE ) as InputMethodManager
171172 inputManager.showSoftInput(this , InputMethodManager .SHOW_IMPLICIT )
173+
174+ val rect = Rect ()
175+ noteEditText.getFocusedRect(rect)
176+ binding.notesScrollview.postDelayed({
177+ binding.notesScrollview.smoothScrollTo(0 , rect.bottom)
178+ }, 1000 )
172179 }
173180 }
174181 }
You can’t perform that action at this time.
0 commit comments