Explain me please, why IntelliJ IDEA shows me Parameter never used?
public void onClick(View view) { // Parameter 'view' never used Toast.makeText(this, "Hello", Toast.LENGTH_LONG).show(); } <ToggleButton ... android:onClick="onClick"/>
But I know, if I delete this never used parameter (view), Android will throw me Runtime Exception.
Why IntelliJ IDEA v12.1 shows such warnings but Eclipse doesn't show. How to configure IntelliJ IDEA to hide such warnings for all Android projects?
For Kotlin, use this sentence to supress this warning :
fun onClick(@Suppress("UNUSED_PARAMETER")view: View) { }
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