This is a good article : Customizing the Action Bar
And also you can try this :
Design you own customized drawable for spinner background and apply to it.
For spinnerbackground.xml images you can refer the images from the SDK. recreate the images as per your design requirements
"Android-sdk\platforms\android-9\data\res\drawable-hdpi\*.png"
spinnerbackground.xml
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:state_window_focused="false" android:state_enabled="true"
android:drawable="@drawable/wlbtn_dropdown_normal" />
<item
android:state_window_focused="false" android:state_enabled="false"
android:drawable="@drawable/wlbtn_dropdown_disabled" />
<item
android:state_pressed="true"
android:drawable="@drawable/wlbtn_dropdown_pressed" />
<item
android:state_focused="true" android:state_enabled="true"
android:drawable="@drawable/wlbtn_dropdown_selected" />
<item
android:state_enabled="true"
android:drawable="@drawable/wlbtn_dropdown_normal" />
<item
android:state_focused="true"
android:drawable="@drawable/wlbtn_dropdown_disabled_focused" />
<item
android:drawable="@drawable/wlbtn_dropdown_disabled" />
</selector>
then for spinner widget apply your custom drawable:
<Spinner android:background="@drawable/spinnerbackground"
android:id="@+id/spinnerIDr"
android:layout_height="wrap_content"
android:layout_width="fill_parent">
</Spinner>
Edited :
<Spinner android:background="@drawable/spinnerbackground"
android:id="@+id/spinnerIDr"
android:popupBackground="@drawable/popup_background"
android:layout_height="wrap_content"
android:layout_width="fill_parent">
</Spinner>
where popup_background is :

and
Design your custom layout for spinner texts as (name : custom_spiner.xml)
<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="4dp"
android:textSize="14sp"
android:typeface="serif"
android:singleLine="true"
android:layout_marginLeft="2dip"
android:layout_marginRight="5dip"
android:ellipsize="marquee"
android:textColor="#000000">
</TextView>
and use it as
adapter.setDropDownViewResource(R.layout.custom_spiner);
in your code.
Edited 2:
if you want to do this using java code read about PopupWindow
And may be useful : custom-spinner