Font in Android Library

后端 未结 9 1629
南方客
南方客 2021-02-05 15:30

At the follow link

Android Dev Guide

is write:

Library projects cannot include raw assets The tools do not support the use of raw asset files (saved in t

9条回答
  •  佛祖请我去吃肉
    2021-02-05 15:58

    So if I want to create a custom view component that use a custom font how can I access the resource?

    Your code would access it the same way that it does not. You will simply have to tell reusers of your custom view to include the font file in their assets.

    Can't I redistribute my component with my favorite font !!!!

    Sure you can. Put the font in a ZIP file along with the rest of your library project, along with instructions for where to place it in a project. Be sure to use a font that you have rights to redistribute this way, though.

提交回复
热议问题