


But there is no textSize attribute so idk what to do. I have made a drop-down menu and want it to be bigger.

Copy the following values in the color_spinner_layout.xml file:Ĭreate a layout for the item of the dropdown list: create new layout file name spinner_dropdown_layout.xml with TextView as a root element. Copy the following values in the strings.xml file:Ĭreate a layout for the selected item of the spinner: create new layout file name color_spinner_layout.xml with CheckedTextView as a root element. The following shows a simple array called spinner_items. Attach the adapter to Spinner and setOnItemSelectedListener to Spinner.Ĭreate a Spinner element in your XML layout: write the following code in your XML file.Ĭreate ArrayList for the spinner: you’ll need data to display into the spinner as a dropdown list so for that you’ll need to create ArrayList for the spinner.Create the spinner adapter using the Spinner Adapter class and set the CheckedTextView layout as a spinner layout and TextView for the item of the dropdown list.

Create a layout for the item of the dropdown list.Create a layout for the selected item of the spinner.Create a Spinner element in your XML layout.Follow these steps to change the color of the spinner.
