From the course: Android Development Tips

Unlock this course with a free trial

Join today to access over 22,600 courses taught by industry experts.

Use XML and downloadable fonts

Use XML and downloadable fonts - Android Tutorial

From the course: Android Development Tips

Use XML and downloadable fonts

- [Instructor] Android 8, and the Android support libraries have a new feature that lets you use downloadable fonts in your apps. A downloadable font is a font file that's stored on a server somewhere, and in your app you define the downloadable font, indicating its location, and providing authentication credentials. When the app first starts up, it pre loads the font over the web, and then that font can be used just as easily as if it's bundled with the app. But the result is that the APK file, that's the package you upload to the Google Play store, or another app store to deploy the app, can be a lot smaller. Because it doesn't have to store the font file. Configuring a downloadable font takes quite a few configuration files, but Android Studio makes it easy to set up. To demonstrate this, I'll go to my app's content_main layout file. This is where I have a text view component that I'm using to log information and display it to the user. Right now, I'm using the app's default font…

Contents