In an XML file, we can assign an ID to a view like android:id="@+id/something"
and then call findViewById()
, but when creating a view programmatically, how do I assign an ID?
I think setId()
is not the same as default assignment. setId()
is extra.
Can anybody correct me?