Hành động của tôi hiện là như thế này:Làm cách nào để thay đổi màu chữ của IcsSpinner trên ActionBarSherlock?
tôi muốn nó được như thế này:
bỏ qua các đường màu đen bên cạnh biểu tượng. Chủ yếu là những gì tôi muốn là để change the color of the text in the IcsSpinner to white
mã ngành của tôi là:
ArrayAdapter<String> listAdapter = new ArrayAdapter<String>(this,
R.layout.sherlock_spinner_item, cities);
listAdapter
.setDropDownViewResource(R.layout.sherlock_spinner_dropdown_item);
setContentView(mViewPager);
final ActionBar bar = getSupportActionBar();
bar.setCustomView(R.layout.custom_actionbar);
bar.setIcon(R.drawable.logo);
bar.setDisplayShowCustomEnabled(true);
IcsSpinner citySpinner = (IcsSpinner) (bar.getCustomView())
.findViewById(R.id.city_spinner);
citySpinner.setAdapter(listAdapter);
và custom_actionbar.xml của tôi là:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:gravity="right|center_vertical"
android:orientation="horizontal" >
<com.actionbarsherlock.internal.widget.IcsSpinner
android:id="@+id/city_spinner"
android:layout_width="wrap_content"
android:layout_height="match_parent"/>
</RelativeLayout>
Tôi thậm chí còn muốn spinner là just left to the refresh icon
. Giống như trong hình ảnh thứ hai.
Cảm ơn bạn
yeah đó giải quyết trong việc thay đổi màu sắc văn bản. cảm ơn rất nhiều. nhưng làm thế nào tôi có thể thay đổi vị trí IcsSpinner sang bên phải ??. như trong hình ảnh thứ hai –
Bạn không thể thay đổi vị trí hiển thị hình ảnh. Nếu bạn cần kiểm soát nhiều hơn một thứ như thế, bạn phải sử dụng chế độ xem tác vụ tùy chỉnh. –