I tried a lot ways and it's not working tho, not sure is it because i'm using shared transition from fragment to activity containing the edit text.
Btw my edittext is also wrapped in LinearLayout.
I added a slight delay to request focus and below code worked for me: (Kotlin)
et_search.postDelayed({
editText.requestFocus()
showKeyboard()
},400) //only 400 is working fine, even 300 / 350, the cursor is not showing
showKeyboard()
val imm = getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager
imm.toggleSoftInput(InputMethodManager.SHOW_FORCED, 0)