Android: IntelliJ IDEA 12.1 Parameter view never used

You see this warning because the Unused symbol inspection is enabled by default and is configured to show any unused parameters as well. While it's not an issue in this specific case, it may help you to trace bugs in other cases (like when you are using a local variable with similar name because of the typo instead of the actual method parameter).

This inspection provides a lot of options and you can tune it for your needs, for example by disabling the Check Parameters option. Or you can define annotations like @Unused so that IDE will ignore any parameters with these annotations, or you can just suppress this inspection from the Alt+Enter Menu, right arrow sub menu (suppress for class/method/statement, edit inspection settings or disable it completely).

unused symbol

suppress


I don't think that changing the warning setting would be the best solution.

Instead you can try this code:

public void onClick(@SuppressWarnings("UnusedParameters")View ignored) { // Parameter 'ignored' never used
    Toast.makeText(this, "Hello", Toast.LENGTH_LONG).show();
}

For Kotlin, use this sentence to supress this warning :

fun onClick(@Suppress("UNUSED_PARAMETER")view: View) {

}