android - Set Spinner id bt Java Code -


I know that my question is not good enough, but I really can not answer. My question is how

You can add id file to your resorces in the value directory.

For example:

  & lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; Resources & gt; & Lt; Item type = "id" name = "my_id" /> & Lt; / Resources & gt;   

You can then set this user spinner to id :

  yourspinner.setId (R.id.my_id );    

Comments

Popular posts from this blog

asp.net - Procedure or function "Procedure name" expects a parameter "Param name" which was not supplied occurs rarely -

c# - The item with identity 'Id' already exists in the metadata collection. Parameter name: item -

c++ - Redefined variable in the other module -