this question relates to this one: android.R.simple_spinner_item
Since I can't comment because of low reputation, I have an additional question:
If I copy&paste the android.R.simple_spinner_item layout, I get an error on
android:layout_height="?android:attr/dropdownListPreferredItemHeight"
saying "error: Error: Attribute is not public. (at 'layout_height' with value '?android:attr/dropdownListPreferredItemHeight')."
I just added android:gravity="right"
to get the spinner_item alignment to the right side.
How can I solve this error?
Seems to work for me if you don't prefix it with android, like so:
<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="?attr/dropdownListPreferredItemHeight"
android:ellipsize="marquee"/>