I've downloaded a library from github and I would like to edit the class to suit my needs. But Android Studio won't allow me saying "File is read only" when I try to type and edit the class.

I think, the file is locked as READ-ONLY.

You can click on the lock icon to toggle the READ-ONLY Option.The option can be found at the BOTTOM-RIGHT Corner of the Android Studio.
Try this: Go to the file in the Windows explorer and make an rightclick and then click on properties. Uncheck write protect! If this not function try to start Andruid Studio as adminstrator.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With