android:Spinner 设置收起以及展开的字体大小
16lz
2021-01-23
android:Spinner 设置收起以及展开的字体大小
/** * Set the list of labels on a reminder spinner. */ private static void setReminderSpinnerLabels(Activity activity, Spinner spinner, ArrayList labels) { Resources res = activity.getResources(); spinner.setPrompt(res.getString(R.string.reminders_label)); int resource = R.layout.simple_spinner_item;// 收起字体 ArrayAdapter adapter = new ArrayAdapter(activity, resource, labels); adapter.setDropDownViewResource(R.layout.simple_spinner_dropdown_item);// // 展开字体 spinner.setAdapter(adapter); }
- R.string.reminders_label
<TextView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@android:id/text1" style="?android:attr/spinnerItemStyle" android:singleLine="true" android:textSize="12sp" android:layout_width="match_parent" android:layout_height="wrap_content" android:ellipsize="marquee" android:textAlignment="inherit"/>
- R.layout.simple_spinner_dropdown_item
<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="@dimen/list_height01" android:textSize="12sp" android:textColor="@color/color06_transparency13" android:ellipsize="marquee"/>
更多相关文章
- TextView --- 内容设置成上下滑动 和 代码设置字体颜色
- Android Studio放大缩小字体
- Android 字体颜色变化(点击)
- android 字体&颜色
- Android 字体和颜色
- Android 中使用自定义字体的方法
- 【转】Android字体小结