My custom font not setting up in edit text

前端 未结 2 646
误落风尘
误落风尘 2021-01-27 08:29
mEditText = (EditText) getContentView().findViewById( R.id.custom_text );
AssetManager assests=getContext().getBaseContext().getAssets();
Typeface tf = Typeface.createFr         


        
2条回答
  •  太阳男子
    2021-01-27 08:44

    Have a try with

    mEditText.setTypeface(Typeface.createFromAsset(context.getAssets(),"fonts/DroidSansFallback.ttf"));
    

提交回复
热议问题