I am currently trying to use various google android examples at http://developer.android.com/guide/tutorials/views/hello-spinner.html
BUT I cannot get this part to work, although the code is exactly the same as the one presented on the website.
Spinner s = (Spinner) findViewById (R.id.spinner);
Eclipse continues to say: โCannot be dropped from View to Spinnerโ
Do any of you guys know how to solve this?
Thanks.
Are you sure you imported android.widget.Spinner, and not something else called the same? Perhaps try the following to be sure:
android.widget.Spinner
android.widget.Spinner s = (android.widget.Spinner) findViewById(R.id.spinner);
, , .
, , android.widget.Spinner? Spinner View, .
, . , - Foo<Spinner> Foo<A>, Spinner . generic Foo<A>, Spinner .
Foo<Spinner>
Foo<A>
Spinner
( String, Spinner, )
String
spinner .
Source: https://habr.com/ru/post/1717901/More articles:How can I resize a WPF element after rotation, and not earlier? - .netHow to embed complex types in wsdl definition? - wsdlScan attachments before uploading to the server? - asp.nethow to stop selenium server when clicking a button using java? - javaGoogle Earth Discovery installs on a web page in Internet Explorer - javascriptDoes this violate SOLID principles? - c #Is there a lightweight GUI for SQL that lets you examine databases and run SQL? - user-interfaceInstalling Windows with restricted access - c ++PL / SQL Code Navigation Tool - oracleSharePoint Forms authentication provider name prefix for username - c #All Articles