当前位置: 首页>>代码示例>>Java>>正文


Java RobotoTypefaceManager类代码示例

本文整理汇总了Java中com.devspark.robototextview.util.RobotoTypefaceManager的典型用法代码示例。如果您正苦于以下问题:Java RobotoTypefaceManager类的具体用法?Java RobotoTypefaceManager怎么用?Java RobotoTypefaceManager使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


RobotoTypefaceManager类属于com.devspark.robototextview.util包,在下文中一共展示了RobotoTypefaceManager类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setActionText2

import com.devspark.robototextview.util.RobotoTypefaceManager; //导入依赖的package包/类
private void setActionText2(FacetCategory category) {
	SpannableStringBuilder sb = new SpannableStringBuilder();

	String cat = category.getDescriptor();
	String sub = getContext().getString(R.string.filter_by_all_category_with_selected);

	RobotoTypefaceSpan robotoTypefaceSpan = new RobotoTypefaceSpan(getContext(),
			RobotoTypefaceManager.Typeface.ROBOTO_BLACK);
	Spannable spannable = new SpannableString(cat);
	spannable.setSpan(robotoTypefaceSpan, 0, spannable.length() - 1,
			Spannable.SPAN_INCLUSIVE_INCLUSIVE);
	spannable.setSpan(new RelativeSizeSpan(1.5f), 0, spannable.length() - 1,
			Spannable.SPAN_INCLUSIVE_INCLUSIVE);
	Logs.ui("Span: " + spannable.getSpanStart(robotoTypefaceSpan) + "-->" +
	        spannable.getSpanEnd(robotoTypefaceSpan));

	sb.append(spannable).append("\n").append(sub);

	actionButton.setText(sb.toString());
}
 
开发者ID:iit-rende,项目名称:thesapp-android,代码行数:21,代码来源:SearchFacetsContainer.java

示例2: createHeader

import com.devspark.robototextview.util.RobotoTypefaceManager; //导入依赖的package包/类
public RobotoTextView createHeader() {
	RobotoTextView tv = new RobotoTextView(getContext());
	tv.setTextColor(getResources().getColor(R.color.category_label_header));

	Typeface typeface = RobotoTypefaceManager.obtainTypeface(getContext(),
			RobotoTypefaceManager.Typeface.ROBOTO_LIGHT);
	RobotoTextViewUtils.setTypeface(tv, typeface);

	tv.setTextSize(TypedValue.COMPLEX_UNIT_PX, getResources().getDimension(
			R.dimen.element_card_header_text_size));
	int padding = getResources().getDimensionPixelSize(R.dimen.element_card_header_padding);
	tv.setPadding(padding, padding * 2, padding, padding);

	final FlowLayout.LayoutParams params = new FlowLayout.LayoutParams(
			FlowLayout.LayoutParams.MATCH_PARENT, FlowLayout.LayoutParams.WRAP_CONTENT);

	tv.setLayoutParams(params);
	return tv;
}
 
开发者ID:iit-rende,项目名称:thesapp-android,代码行数:20,代码来源:TermsContainerWithAlphabet.java

示例3: TitleTextView

import com.devspark.robototextview.util.RobotoTypefaceManager; //导入依赖的package包/类
public TitleTextView(Context c) {
    super(c);
    if (!isInEditMode()) {
        int type = new FontPreferences(getContext()).getFontTypeTitle().getTypeface();
        Typeface typeface;
        if (type >= 0) {
            typeface = RobotoTypefaceManager.obtainTypeface(c, type);
        } else {
            typeface = Typeface.DEFAULT;
        }
        setTypeface(typeface);

    }
}
 
开发者ID:ccrama,项目名称:Slide-RSS,代码行数:15,代码来源:TitleTextView.java


注:本文中的com.devspark.robototextview.util.RobotoTypefaceManager类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。