3

I have a Edittext view to post comments on the feeds which are in Edittext. when i put a lot of text inside Edittext and scrollbar appears i cannot scroll my Edittext's text content. Recyclerview scrolls up when i want to scroll in Edittext. How can i solve this. Please suggest.

Goku
  • 8,198
  • 4
  • 33
  • 67
BHARAT GUPTA
  • 342
  • 2
  • 8
  • *look at here:* https://stackoverflow.com/questions/24428808/how-to-scroll-the-edittext-inside-the-scrollview *and* https://stackoverflow.com/questions/36314836/recycler-view-inside-nestedscrollview-causes-scroll-to-start-in-the-middle/40474022#40474022 – MAhipal Singh Nov 30 '17 at 09:08

3 Answers3

2
textInputField.setOnTouchListener { v, _ ->
  v.parent.requestDisallowInterceptTouchEvent(true)
  false
}
Amit kumar
  • 91
  • 11
0

It is always a challenge to solve problems without seeing some code to reference, but one guesses might be:

  • The focus might be taken off of the EditText from the RecyclerView, you can call setFocusable(boolean) on your EditText to gain focus from touch input

Checkout the Google docs on View under Focus Handling and Touch Mode to see if it helps solve your problem.

https://developer.android.com/reference/android/view/View.html

-2

Use android:nestedScrollingEnabled="true" , android:scrollbars="vertical" , android:overScrollMode="ifContentScrolls" on your EditText.

AGM Tazim
  • 1,954
  • 2
  • 13
  • 24
  • this is not working in recyclerview edit text. i want to add text in edittext recyclerview and saved in it when i swipe up or down and comeback at same position my text appear. – Adnan haider Mar 26 '21 at 05:39