Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
df1cd56
fix: keyboard hiding cursor on startup
btnguyenPersonal Jul 4, 2025
7267614
update changelog
btnguyenPersonal Jul 4, 2025
1f605e2
lint
btnguyenPersonal Jul 4, 2025
2c03abc
hacky delayed scroll, has to be a better way
btnguyenPersonal Jul 5, 2025
aa79e59
use window inset listener
btnguyenPersonal Jul 5, 2025
b088ea4
Update app/src/main/kotlin/org/fossify/notes/fragments/TextFragment.kt
btnguyenPersonal Jul 6, 2025
ae80130
only run keyboard listener once and check config.placeCursorToEnd
btnguyenPersonal Jul 6, 2025
322a717
fix: keyboard hiding cursor on startup
btnguyenPersonal Jul 4, 2025
e50e931
update changelog
btnguyenPersonal Jul 4, 2025
c2903da
lint
btnguyenPersonal Jul 4, 2025
adffdb9
hacky delayed scroll, has to be a better way
btnguyenPersonal Jul 5, 2025
78bf8e2
use window inset listener
btnguyenPersonal Jul 5, 2025
5b67a7a
Update app/src/main/kotlin/org/fossify/notes/fragments/TextFragment.kt
btnguyenPersonal Jul 6, 2025
1f64122
only run keyboard listener once and check config.placeCursorToEnd
btnguyenPersonal Jul 6, 2025
232c6f1
Update app/src/main/kotlin/org/fossify/notes/fragments/TextFragment.kt
btnguyenPersonal Jul 9, 2025
35e8046
Merge branch 'keyboard_hiding_cursor' of https://github.com/btnguyenP…
btnguyenPersonal Jul 9, 2025
94709c9
add fits system windows
btnguyenPersonal Jul 9, 2025
0a62cb4
Merge branch 'main' into keyboard_hiding_cursor
btnguyenPersonal Jul 9, 2025
f8d1173
remove extra keyboard listener
btnguyenPersonal Jul 9, 2025
eb968e9
remove unused imports
btnguyenPersonal Jul 9, 2025
755b92b
style: add empty line
naveensingh Jul 9, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Updated translations

### Fixed

- Fixed keyboard hiding cursor on long notes ([#164])

## [1.2.0] - 2025-05-07

### Added
Expand Down Expand Up @@ -71,3 +75,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
[#83]: https://github.com/FossifyOrg/Notes/issues/83
[#99]: https://github.com/FossifyOrg/Notes/issues/99
[#110]: https://github.com/FossifyOrg/Notes/issues/110
[#164]: https://github.com/FossifyOrg/Notes/issues/164
18 changes: 18 additions & 0 deletions app/src/main/kotlin/org/fossify/notes/fragments/TextFragment.kt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ import android.view.ViewGroup
import android.view.inputmethod.InputMethodManager
import android.widget.ImageView
import android.widget.TextView
import androidx.core.view.ViewCompat
import androidx.core.view.WindowInsetsCompat
import androidx.viewbinding.ViewBinding
import org.fossify.commons.extensions.*
import org.fossify.commons.views.MyEditText
Expand Down Expand Up @@ -200,6 +202,22 @@ class TextFragment : NoteFragment() {
setTextWatcher()
}

override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
setupKeyboardListener()
}

private fun setupKeyboardListener() {
ViewCompat.setOnApplyWindowInsetsListener(binding.root) { view, insets ->
if (insets.isVisible(WindowInsetsCompat.Type.ime())) {
noteEditText.post {
noteEditText.bringPointIntoView(noteEditText.selectionEnd)
}
}
insets
}
}

fun setTextWatcher() {
noteEditText.apply {
removeTextChangedListener(textWatcher)
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/main_coordinator"
android:fitsSystemWindows="true"
android:layout_width="match_parent"
android:layout_height="match_parent">

Expand Down
Loading