/**
* Sets the fonts used in the dialog, by file names. This also uses TypefaceHelper in order
* to avoid any un-needed allocations (it recycles typefaces for you).
*
* @param medium The name of font in assets/fonts, minus the extension (null uses device default). E.g. [your-project]/app/main/assets/fonts/[medium].ttf
* @param regular The name of font in assets/fonts, minus the extension (null uses device default). E.g. [your-project]/app/main/assets/fonts/[regular].ttf
* @return The Builder instance so you can chain calls to it.
*/
public Builder typeface(String medium, String regular) {
if (medium != null)
this.mediumFont = TypefaceHelper.get(this.context, medium);
if (regular != null)
this.regularFont = TypefaceHelper.get(this.context, regular);
this.useCustomFonts = true;
return this;
}
MaterialDialog.java 文件源码
java
阅读 28
收藏 0
点赞 0
评论 0
项目:puautologin
作者:
评论列表
文章目录