Revert "Donwload fonts through support library. #1515"

This reverts commit 6c89207eff.
This commit is contained in:
Mygod
2017-12-23 09:20:19 +08:00
parent 6c89207eff
commit 582a6e441b
5 changed files with 16 additions and 19 deletions
@@ -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)