首页 > 解决方案 > How to find usages of an Inteface used by Class.this in Intellij

问题描述

For example, I have an inteface View.OnClickListener implemented in MainActivity class:

public class MainActivity implements View.OnClickListener {
   @Override
   void onClick(View var1){
      // do things
   }
}

Later it is used using this:

btn.setOnClickListener(MainActivity.this);

I want to locate just the code which use the OnClickListener of MainActivity. Does Intellij have a function to do that?

标签: javaandroid-studiointellij-idea

解决方案


您可以按住 ctrl 然后左键单击该方法。


推荐阅读