Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot see "font" resource type in Android studio

I was going through the new Android O features, and one of the new thing is now app can add fonts directly into res folder. As per the android documentation for working with fonts, one of the 1st step is to create a new resource type named "font" using Right-click the res folder and go to New > Android resource directory.

But I could not see "font" option available for resource type in the drop down in android studio.

Below is the image attached. enter image description here

I am not able to see "font" option in the drop down, and hence I am unable to create font android resource directory.

My Android studio details:

Android Studio 2.3 Build #AI-162.3764568, built on February 24, 2017 JRE: 1.8.0_112-release-b06 x86_64 JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o

like image 357
AADProgramming Avatar asked Apr 01 '17 04:04

AADProgramming


People also ask

How do I get all the fonts on my Android?

Use adb shell ls /system/fonts to list them, or adb pull /system/fonts to transfer all of them to the connected computer (adb will create a folder named "fonts").

How do I use OTF files on Android?

To change font styles in GO Launcher, copy the TTF or OTF font files on your phone. Long press on the home screen and select GO Settings. Choose Font–>Select Font. Pick the font you want or tap Scan to add files stored on your device.

Where are fonts stored on Android?

Sytem fonts are kept in the fonts folder under system. > /system/fonts/> is the exact path and you find it by going to "file system root" from the top folder that you can reach where your choices are sd card -sandisk sd card (if you have one in the sd card slot.


2 Answers

One thing I noticed is that the drop down is actually scrollable but because the scrollbar is quite dark, others might not notice it. I can't find "font" at first until I scrolled it downwards.

like image 161
Jacobski Avatar answered Sep 24 '22 18:09

Jacobski


As said by Mike in comments, currently Android Studio 2.4 includes support for all the new developer features available with Android O.

I used Android Studio 2.4 Preview from Canary Channel, & I could see the option for "font" when choosing the Android resource directory.

Below is the image for the same.

enter image description here

like image 44
AADProgramming Avatar answered Sep 23 '22 18:09

AADProgramming