There are many ways to set custom font family on field and I am using like that below.
To add fonts as resources, perform the following steps in the Android Studio:
1) Right-click the res folder and go to New > Android resource directory. The New Resource Directory window appears.
2) In the Resource type list, select font, and then click OK.
Note: The name of the resource directory must be font.
3) Add your font files in the font folder.
Add font in desired view in your xml file:
Note: But you required the following things for that:
Android Studio above to 3.0 canary.
Your Activity extends AppCompatActivity.
Update your Gradle file like that:
compileSdkVersion 26
buildToolsVersion "26.0.1"
defaultConfig {
minSdkVersion 19
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildtoolsVersion
above to 26 and minimum targetSdkVersion
required 26
classpath 'com.android.tools.build:gradle:3.0.0-beta4'
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip