Hide "Rendering Problems" hint in android studio

Marian Klühspies picture Marian Klühspies · Jun 28, 2013 · Viewed 7.6k times · Source

Is there any possibility to hide the annoying popup in the xml editors preview which says there are rendering problems?

It overlaps half of the preview

Answer

The Hungry Androider picture The Hungry Androider · Feb 4, 2014

Rule of thumb: don't fix the symptom, fix the problem!

You only get this when you are using custom views. In this case, in your custom view Java file, you should have a section like the below to give the renderer data to work with.

    if(!this.isInEditMode()) {
        this.setTypeface(Typeface.createFromAsset(context.getAssets(),"appFont.otf"););
    }

This will set the typeface to "appFont.otf" when the renderer is trying to render your custom view in the preview window.

Hope this helps!