I have an EditText and a Button. On click of the button i want to open the EditText keyboard and at the same time request focus on the
The above solutions will work if the EditText is enabled.
In my code, I have disabled the view at one point and trying to request focus later without enabling. If none of the above worked, enable the EditText and then proceed with the above solutions.
In my case it is like,
etpalletId.isEnabled = true
etpalletId.text!!.clear()
etpalletId.requestFocus()
etpalletId.isCursorVisible = true