Revert "Donwload fonts through support library. #1515"
This reverts commit 6c89207eff.
This commit is contained in:
@@ -34,6 +34,9 @@
|
||||
android:value="@integer/google_play_services_version"/>
|
||||
<meta-data android:name="com.google.android.backup.api_key"
|
||||
android:value="AEdPqrEAAAAI_zVxZthz2HDuz9toTvkYvL0L5GA-OjeUIfBeXg"/>
|
||||
<meta-data
|
||||
android:name="preloaded_fonts"
|
||||
android:resource="@array/preloaded_fonts"/>
|
||||
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
|
||||
@@ -24,7 +24,6 @@ import android.app.Activity
|
||||
import android.app.backup.BackupManager
|
||||
import android.content.ActivityNotFoundException
|
||||
import android.content.Intent
|
||||
import android.graphics.Typeface
|
||||
import android.net.Uri
|
||||
import android.net.VpnService
|
||||
import android.nfc.NdefMessage
|
||||
@@ -34,7 +33,6 @@ import android.os.SystemClock
|
||||
import android.support.customtabs.CustomTabsIntent
|
||||
import android.support.design.widget.Snackbar
|
||||
import android.support.v4.content.ContextCompat
|
||||
import android.support.v4.content.res.ResourcesCompat
|
||||
import android.support.v7.app.AlertDialog
|
||||
import android.support.v7.app.AppCompatActivity
|
||||
import android.support.v7.content.res.AppCompatResources
|
||||
@@ -215,7 +213,6 @@ class MainActivity : AppCompatActivity(), ShadowsocksConnection.Interface, Drawe
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.layout_main)
|
||||
|
||||
val drawerBuilder = DrawerBuilder()
|
||||
.withActivity(this)
|
||||
.withTranslucentStatusBar(true)
|
||||
@@ -276,12 +273,6 @@ class MainActivity : AppCompatActivity(), ShadowsocksConnection.Interface, Drawe
|
||||
})
|
||||
} else drawer = drawerBuilder.build()
|
||||
|
||||
val drawerTitle = drawer.getHeader().findViewById<TextView>(R.id.drawer_title)
|
||||
ResourcesCompat.getFont(this, R.font.iceland, object : ResourcesCompat.FontCallback() {
|
||||
override fun onFontRetrievalFailed(reason: Int) {} // Do nothing
|
||||
override fun onFontRetrieved(typeface: Typeface) { drawerTitle.setTypeface(typeface) }
|
||||
}, null)
|
||||
|
||||
if (savedInstanceState == null) displayFragment(ProfilesFragment())
|
||||
previousSelectedDrawer = drawer.currentSelection
|
||||
statusText = findViewById(R.id.status)
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<font-family xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
app:fontProviderAuthority="com.google.android.gms.fonts"
|
||||
app:fontProviderPackage="com.google.android.gms"
|
||||
app:fontProviderQuery="Iceland"
|
||||
app:fontProviderCerts="@array/com_google_android_gms_fonts_certs"
|
||||
android:fontProviderAuthority="com.google.android.gms.fonts"
|
||||
android:fontProviderPackage="com.google.android.gms"
|
||||
android:fontProviderQuery="Iceland"
|
||||
android:fontProviderCerts="@array/com_google_android_gms_fonts_certs" />
|
||||
<font-family xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
app:fontProviderAuthority="com.google.android.gms.fonts"
|
||||
app:fontProviderPackage="com.google.android.gms"
|
||||
app:fontProviderQuery="Iceland"
|
||||
app:fontProviderCerts="@array/com_google_android_gms_fonts_certs">
|
||||
</font-family>
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:fontFamily="@font/iceland"
|
||||
android:gravity="center"
|
||||
android:text="shadowsocks"
|
||||
android:textColor="@android:color/white"
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<array name="preloaded_fonts" translatable="false">
|
||||
<item>@font/iceland</item>
|
||||
</array>
|
||||
</resources>
|
||||
Reference in New Issue
Block a user