简体   繁体   中英

DropdownMenu with flags using compose?

I am trying to create a dropdown menu using flags but not sure exactly how to do this. I am familiar with creating a simple dropdown menu but how would I go about doing so with flags? Does kotlin have a built in library or something similar with all flags or do I need to use retrofit? Any tips are appreciated!

I am thinking of something similar to this: https://gyazo.com/5517b0a51218f32c58fe21ab1ae373a5

Update 2022.08.02

I managed to solve this issue. This might not be the most optimal method to do it but it works relatively well!

To save your time, you can download my project from github:

https://github.com/JosefMG2022/FlagTesting

Hope this help. Feel free to improve it and modify it on your own, Also, if you find a better solution to this problem, feel free to post it here for everyone!

Happy Coding!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM