Drop down menu for Android?« Back to Questions List
Please help me to add drop down in Android, thanks. |
Do you have the right answer? If you do other users will benefit from your contribution, share your knowledge with the community!
Hi, this is easy to do with Class Tag. Step 1 – Create the Spinner${class|Spinner:android:entries="@array/country_arrays"} my dropdown You may need to add additional props in the export due to the max char limit in PSD layer names – After your export –Step 2 – add your string values<string-array name="country_arrays"> <item>Malaysia</item> <item>United States</item> <item>Indonesia</item> <item>France</item> <item>Italy</item> <item>Singapore</item> <item>New Zealand</item> <item>India</item> </string-array> Step 3 – in Java add an event listener to the spinnermy_dropdown.setOnItemSelectedListener(new MyOnItemSelectedListener()); |
Share Your Knowledge!
Contribute to the community and help other users to benefit from your answer with experience and knowledge.