由于一些设计问题,我设计的旋转器具有较小的宽度和高度.而这个较小的宽度和高度没有显示在微调器的提示中写入的完整文本.
如果有任何解决方案可以减少微调器的文本大小,请帮助.
我附上问题的屏幕截图.
http://www.freeimagehosting.net/97147
解决方法:
根据您的需要使用以下代码……
ArrayAdapter adapter = ArrayAdapter.createFromresource(this, R.array.Questions, R.layout.custom_spinner_list);
adapter.setDropDownViewResource(R.layout.customer_spinner);
spin.setAdapter(adapter);
custom_spinner_list.xml
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:text="@+id/TextView01"
android:id="@+id/TextView01"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textSize="12dp"
android:textColor="#000000">
</TextView>
customer_spinner.xml
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:text="@+id/TextView01"
android:id="@+id/TextView01"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textSize="12dp"
android:textColor="#000000"
android:height="42dp"
android:gravity="center_vertical"
android:padding = "2dp">
</TextView>