I guess accidentally pressing a key or a combination changed a setting in Android Studio after which android studio is acting weird and won't let me select code properly.
Look at following image.
I have checked Android Studio setting and couldn't find anything related to it.
P.S I am using Windows 10.