本文整理汇总了Java中com.onegravity.rteditor.toolbar.spinner.SpinnerItems类的典型用法代码示例。如果您正苦于以下问题:Java SpinnerItems类的具体用法?Java SpinnerItems怎么用?Java SpinnerItems使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
SpinnerItems类属于com.onegravity.rteditor.toolbar.spinner包,在下文中一共展示了SpinnerItems类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getFontItems
import com.onegravity.rteditor.toolbar.spinner.SpinnerItems; //导入依赖的package包/类
private SpinnerItems<FontSpinnerItem> getFontItems() {
/*
* Retrieve the fonts.
*//*
SortedSet<RTTypeface> fonts = FontManager.getFonts(getContext());
*//*
* Create the spinner items
*//*
spinnerItems.add(new FontSpinnerItem(null)); // empty element
for (RTTypeface typeface : fonts) {
spinnerItems.add(new FontSpinnerItem(typeface));
}*/
SpinnerItems<FontSpinnerItem> spinnerItems = new SpinnerItems<FontSpinnerItem>();
return spinnerItems;
}
示例2: getTextSizeItems
import com.onegravity.rteditor.toolbar.spinner.SpinnerItems; //导入依赖的package包/类
private SpinnerItems<FontSizeSpinnerItem> getTextSizeItems() {
SpinnerItems<FontSizeSpinnerItem> spinnerItems = new SpinnerItems<FontSizeSpinnerItem>();
Resources res = getResources();
// empty size
spinnerItems.add(new FontSizeSpinnerItem(-1, "", true));
// regular sizes
String[] fontSizeEntries = res.getStringArray(R.array.rte_toolbar_fontsizes_entries);
int[] fontSizeValues = res.getIntArray(R.array.rte_toolbar_fontsizes_values);
for (int i = 0; i < fontSizeEntries.length; i++) {
spinnerItems.add(new FontSizeSpinnerItem(fontSizeValues[i], fontSizeEntries[i], false));
}
return spinnerItems;
}
示例3: getFontItems
import com.onegravity.rteditor.toolbar.spinner.SpinnerItems; //导入依赖的package包/类
private SpinnerItems<FontSpinnerItem> getFontItems() {
/*
* Retrieve the fonts.
*//*
SortedSet<RTTypeface> fonts = FontManager.getFonts(getContext());
*//*
* Create the spinner items
*//*
spinnerItems.add(new FontSpinnerItem(null)); // empty element
for (RTTypeface typeface : fonts) {
spinnerItems.add(new FontSpinnerItem(typeface));
}*/
SpinnerItems<FontSpinnerItem> spinnerItems = new SpinnerItems<>();
return spinnerItems;
}
示例4: getTextSizeItems
import com.onegravity.rteditor.toolbar.spinner.SpinnerItems; //导入依赖的package包/类
private SpinnerItems<FontSizeSpinnerItem> getTextSizeItems() {
SpinnerItems<FontSizeSpinnerItem> spinnerItems = new SpinnerItems<>();
Resources res = getResources();
// empty size
spinnerItems.add(new FontSizeSpinnerItem(-1, "", true));
// regular sizes
String[] fontSizeEntries = res.getStringArray(R.array.rte_toolbar_fontsizes_entries);
int[] fontSizeValues = res.getIntArray(R.array.rte_toolbar_fontsizes_values);
for (int i = 0; i < fontSizeEntries.length; i++) {
spinnerItems.add(new FontSizeSpinnerItem(fontSizeValues[i], fontSizeEntries[i], false));
}
return spinnerItems;
}
示例5: getFontItems
import com.onegravity.rteditor.toolbar.spinner.SpinnerItems; //导入依赖的package包/类
private SpinnerItems<FontSpinnerItem> getFontItems() {
/*
* Retrieve the fonts.
*/
SortedSet<RTTypeface> fonts = FontManager.getFonts(getContext());
/*
* Create the spinner items
*/
SpinnerItems<FontSpinnerItem> spinnerItems = new SpinnerItems<FontSpinnerItem>();
spinnerItems.add(new FontSpinnerItem(null)); // empty element
for (RTTypeface typeface : fonts) {
spinnerItems.add(new FontSpinnerItem(typeface));
}
return spinnerItems;
}
示例6: getTextSizeItems
import com.onegravity.rteditor.toolbar.spinner.SpinnerItems; //导入依赖的package包/类
private SpinnerItems<FontSizeSpinnerItem> getTextSizeItems() {
SpinnerItems<FontSizeSpinnerItem> spinnerItems = new SpinnerItems<FontSizeSpinnerItem>();
Resources res = getResources();
// empty size
// spinnerItems.add(new FontSizeSpinnerItem(-1, "", true));
// regular sizes
String[] fontSizeEntries = res.getStringArray(R.array.rte_toolbar_fontsizes_entries);
int[] fontSizeValues = res.getIntArray(R.array.rte_toolbar_fontsizes_values);
for (int i = 0; i < fontSizeEntries.length; i++) {
spinnerItems.add(new FontSizeSpinnerItem(fontSizeValues[i], fontSizeEntries[i], false));
}
return spinnerItems;
}