在 RemoteViewsService.RemoteViewsFactory 下
public RemoteViews getViewAt(int position) {
final int itemId = (position % 2 == 0 ? R.layout.light_widget_item
: R.layout.dark_widget_item);
RemoteViews rv = new RemoteViews(mContext.getPackageName(), itemId);
rv.setTextViewText(R.id.widget_item, text);
// rv.setTextSize(mPrefs.getTextsize().getValue());
return rv;
}
如何以编程方式更改文本大小?