I have this variable defined in a Kotlin file, but Android Studio doesn't suggest implementing methods, am I missing something :
private val mGestureListener = object : GestureDetector.SimpleOnGestureListener() {
}
SimpleOnGestureListener
is a non-abstract class. Hence the IDE doesn't show the Implement methods
options by default. The IDE shows this option only when there is at least one method that's not implemented in the class.
If you want to show the Override methods
option, then place the cursor inside the braces and choose Code -> Override Methods...
(Ctrl+O), or if you already know the methods that you want to override, just start typing the method name and it will show up in auto complete.
You can use Ctrl+O inside the object : Xxx
block to open a dialog to see methods to override, and Ctrl+I to see methods to implement.
This is nearly the same as Henry's answer, but he uses mouse, I use keyboard.
Click or press enter on some methods to generate empty implementations, and type letters to do text-based search.
If you didn't find what you expected, you're probably overriding the wrong class/interface.
If you have abstract methods not overriden, you'll see red wave line under object
. Alt+Enter will help you solve problem in such situation.
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