You can use your View‘s getContext() method to get the current Context, then use it to get the assets:
Typeface font = Typeface.createFromAsset(getContext().getAssets(), "robotobold.ttf");
You can use your View‘s getContext() method to get the current Context, then use it to get the assets:
Typeface font = Typeface.createFromAsset(getContext().getAssets(), "robotobold.ttf");