Bug P3
Status Update
Comments
lb...@gmail.com <lb...@gmail.com>
mm...@google.com <mm...@google.com>
ku...@google.com <ku...@google.com>
an...@google.com <an...@google.com> #3
Ideally the API should either be marked with @NonNull
, or documentation updated to specify when this parameter can be null.
lb...@gmail.com <lb...@gmail.com> #4
@3 Wait, it can be null? How?
Description
1. Use this, and try to add onClick, to be completed by the IDE:
findViewById<View>(R.id.textView).setOnClickListener(object:OnClickListener{
}
The bug is that it makes it nullable, despite the docs:
findViewById<View>(R.id.textView).setOnClickListener(object:OnClickListener{
override fun onClick(v: View?) {
TODO("Not yet implemented")
}
})
"Params:
v – The view that was clicked.
"
In fact, the docs don't say when it's nullable.
Maybe it's for some case that we don't offer it, in the code behind? Maybe for custom Views?
------------------
Studio Build:
Version of Gradle Plugin:
Version of Gradle:
Version of Java:
OS:
Android Studio Flamingo | 2022.2.1 Canary 4
Build #AI-222.4167.29.2221.9153536, built on October 8, 2022
Runtime version: 17.0.4.1+0-b2043.56-9127311 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Windows 11 10.0
GC: G1 Young Generation, G1 Old Generation
Memory: 9048M
Cores: 12
Registry:
external.system.auto.import.disabled=true
debugger.watches.in.variables=false
ide.text.editor.with.preview.show.floating.toolbar=false
ide.images.show.chessboard=true
Non-Bundled Plugins:
idea.plugin.protoeditor (222.4167.21)
com.intellij.marketplace (222.4167.37)
com.dubreuia (2.3.0)
com.dethlex.numberconverter (1.5.0)
String Manipulation (9.5.1)
Show As ... (1.0.3)
GenerateSerializationHelpers (1.0.6)
GenerateSerialVersionUID (3.0.3)
com.google.mad-scorecard (1.2)
net.aquadc.mike.plugin (0.26)
izhangzhihao.rainbow.brackets (6.26)
com.ppismerov.ksvu (0.0.1)