Drop down menu for Android?« Back to Questions List

Please help me to add drop down in Android, thanks.

Asked by tharindu
Added June 16, 2016 8:05 pm

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>United States</item>
	<item>New Zealand</item>

Step 3 – in Java add an event listener to the spinner

my_dropdown.setOnItemSelectedListener(new MyOnItemSelectedListener());
Answer by admin
Answered On June 16, 2016 8:07 pm #
Looking for another answer? View other questions in Android or get premium support for guaranteed results.
Asked by tharindu
1 answer
Last Answered 8 years ago by admin


Recent Answers

asked by nmax
asked by shanrt
asked by Ali Sodikin
[+] View All Recent Questions

Share Your Knowledge!

Contribute to the community and help other users to benefit from your answer with experience and knowledge.