步驟1.將JitPack存儲庫添加到構(gòu)建文件中
將其添加到存儲庫末尾的根build.gradle中:
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
步驟2.添加依賴項(xiàng)
dependencies {
implementation 'com.github.ha-excited:fontawesome:0.1'
}
步驟 3. 使用 fontAwesome
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="@font/fontawesome"
android:text="@string/fa_glass" />