0
我需要从url https://github.com/google/fonts/blob/master/apache/roboto/Roboto-Regular.ttf直接从我的android studio项目下载字体。下载的字体应该在我的工作室项目下的字体目录下。如何在android中从url下载字体?
我需要从url https://github.com/google/fonts/blob/master/apache/roboto/Roboto-Regular.ttf直接从我的android studio项目下载字体。下载的字体应该在我的工作室项目下的字体目录下。如何在android中从url下载字体?
从Github下载字体文件后,请按照下列步骤操作。
Go to the (project folder)
Then app>src>main
Create folder assets>fonts into the main folder.
Put your Roboto-Regular.ttf into the fonts folder.
通常我们这样做,但我需要通过使用URL它必须自动下载并直接保存在字体下,URL可能是动态URL。 – saiRam89
你到目前为止尝试过什么? –
,这是什么问题?你不能点击链接并下载文件吗? –
是的,我想做我可以从API获得这个URL。之后,它应该从字体目录下的URL自动下载,因此每个API调用URL可能会有所不同。 – saiRam89