lkpsounds.blogg.se

Android studio spinner setdropdownviewresource
Android studio spinner setdropdownviewresource




android studio spinner setdropdownviewresource

Let it be Tutorials, Update Change Logs, Projects that users have created or anything else, you will find it here.

android studio spinner setdropdownviewresource

Package import import 7.app.AppCompatActivity import android.os.Bundle import import import import import import import import import public class MainActivity extends AppCompatActivity implements AdapterView. Here at /r/Android Studio, we provide information regarding the Android based IDE - Android Studio. 'And sadly i get only the districts of andamanandnicobar (State/Union Territory) irrespective of which state I select. Call setAdapter () to apply the adapter to your Spinner. Activity class:( File: MainActivity.java) String States spinner.getItemAtPosition(position).toString() Have you checked the value of States using the debugger I suspect the values you have in R.array.States are not in all caps, which is what your case statements are expecting. You should then call setDropDownViewResource (int) to specify the layout the adapter should use to display the list of spinner choices ( simplespinnerdropdownitem is another standard layout defined by the platform).






Android studio spinner setdropdownviewresource