如何在微调器中放置textcolr和更改大小
答案 0 :(得分:0)
答案 1 :(得分:0)
当然不能改变它:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout android:id="@+id/RelativeLayout01"
android:layout_width="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android" android:layout_height="50dip">
<RelativeLayout android:id="@+id/RelativeLayout02"
android:layout_width="wrap_content" android:layout_height="wrap_content">
<TextView android:text="@+id/TextView01"
android:layout_marginRight="10dip" android:id="@+id/imageNameSpinner" android:layout_alignParentLeft="true"
android:layout_centerInParent="false"
android:layout_centerHorizontal="false"
android:layout_centerVertical="true" android:textColor="@color/black_color" android:layout_marginLeft="10dip" android:layout_width="90dip" android:layout_height="50dip"></TextView>
<ImageView android:layout_marginRight="10dip"
android:id="@+id/imageIconSpinner" android:layout_marginLeft="10dip" android:layout_toRightOf="@+id/imageNameSpinner" android:layout_height="50dip" android:layout_width="50dip"></ImageView>
</RelativeLayout>
</RelativeLayout>
这是自定义微调器的xml。它还显示了如何在微调器中包含imageview。
在定义适配器时使用如下:
adapterForImageSpinner = new SimpleAdapter(this, true,
spinnerData, R.layout.spinner_view, new String[] { "Name",
"Icon" }, new int[] { R.id.imageNameSpinner,
R.id.imageIconSpinner });