private static SnipettyAttr getDefaultAttr(Context context) {
SnipettyAttr attr = new SnipettyAttr();
Resources resources = context.getResources();
attr.leadGap = resources.getDimensionPixelOffset(R.dimen.space_medium);
attr.gapWidth = resources.getDimensionPixelOffset(R.dimen.space_xlarge);
attr.textColor = ContextCompat.getColor(context, R.color.secondary_text);
attr.titleTextSize = resources.getDimensionPixelOffset(R.dimen.text_xlarge);
attr.subTitleTextSize = resources.getDimensionPixelOffset(R.dimen.text_medium);
attr.titleTextColor = ContextCompat.getColor(context, R.color.primary_text);
attr.subTitleTextColor = ContextCompat.getColor(context, R.color.primary_text);
attr.titleTextFont = Typeface.createFromAsset(context.getAssets(),
context.getString(R.string.font_roboto_bold));
attr.subtitleTextFont = Typeface.createFromAsset(context.getAssets(),
context.getString(R.string.font_roboto_medium));
return attr;
}
SnippetyUtil.java 文件源码
java
阅读 32
收藏 0
点赞 0
评论 0
项目:snippety
作者:
评论列表
文章目录