Android Spinner with Dialog Box
Why this post? Sometimes for visual effect, we need to show the spinner item in a dialog box which is most customizable and designable. UX engineers also try to make the more complex situation. That's why I made a spinner where spinners item will be shown in the dialogue box. Techniques which I used: For this purpose, I used Dialog, RecyclerView and EditText. 1. When clicked on EditText a Dialog Box will appear. 2. Dialog box holds a RecyclerView with an adapter where adapter holds a TextView. 3. Then implement a OnItemClick listener in RecyclerView. 4. Then item text will set on EditText. Codes with Description: Dialog layout: dialog.xml <? xml version= "1.0" encoding= "utf-8" ?> < LinearLayout xmlns: android = "http://schemas.android.com/apk/res/android" android :orientation= "vertical" android :layout_width= "match_parent" android :layout_height= "match_parent" > <