This is a very basic question
I'm trying to create a spinner in my android layout. Then i found a website teaching how to create an ArrayAdapter
for that spinner
ArrayAdapter<Giveaway.GiveawayCategory> dataAdapter = new ArrayAdapter<Giveaway.GiveawayCategory>(this, android.R.layout.simple_spinner_item, new ArrayList<Giveaway.GiveawayCategory>(20));
dataAdapter.add(ImportGiveawayActivity.selectCategory);
dataAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
this.spinner.setAdapter(dataAdapter);
it works very fine but there is a giant margin between the items...
So i looked into simple_spinner_dropdown_item
and found:
<CheckedTextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/text1"
style="?android:attr/spinnerDropDownItemStyle"
android:singleLine="true"
android:layout_width="match_parent"
android:layout_height="?android:attr/dropdownListPreferredItemHeight"
android:ellipsize="marquee"/>
probably the height
is not good, or the style
sets a huge margin, i tried to find those files but i couldn't
How can i override these values in my style.xml