I set the cursor of Edit Text in activity_main.xml in android

android:textCursorDrawable="@drawable/large_cursor"

I want to change the cursor to "@drawable/small_cursor" BY JAVA CODE. Can anyone know what JAVA CODE to do this task?