I’m trying to make my edit texts and spinners on the right side of the my application aligned and all the same size but I can’t seem to change the width of the spinner. I have figured out how to change the amount of characters are shown in the words in the spinner but I can’t figure out how to change the size of the actual spinner. Any suggestions? This is my xml for my spinner layout:
spinner_layout.xml:
<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/title_text_view"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="center"
android:maxLength="15" />
and this is how i’m calling it in my activity:
ArrayAdapter<String> dataAdapter = new ArrayAdapter<String>(this,R.layout.spinner_layout,actions);
dataAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
spinner.setAdapter(dataAdapter);
Try to change the code as, It might be helps you.