From b840b800da77abac048db5aab1539587f183b456 Mon Sep 17 00:00:00 2001 From: kunfei Date: Thu, 29 Aug 2019 19:39:54 +0800 Subject: [PATCH] up --- .../io/legado/app/ui/widget/font/FontSelectDialog.kt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/widget/font/FontSelectDialog.kt b/app/src/main/java/io/legado/app/ui/widget/font/FontSelectDialog.kt index 5580f31a8..b276072b4 100644 --- a/app/src/main/java/io/legado/app/ui/widget/font/FontSelectDialog.kt +++ b/app/src/main/java/io/legado/app/ui/widget/font/FontSelectDialog.kt @@ -2,14 +2,15 @@ package io.legado.app.ui.widget.font import android.annotation.SuppressLint import android.content.Context -import android.content.DialogInterface import android.os.Environment import android.view.LayoutInflater import android.view.View +import androidx.appcompat.app.AlertDialog import androidx.recyclerview.widget.LinearLayoutManager import io.legado.app.R import io.legado.app.lib.dialogs.AlertBuilder import io.legado.app.lib.dialogs.alert +import io.legado.app.utils.applyTint import io.legado.app.utils.invisible import io.legado.app.utils.visible import kotlinx.android.synthetic.main.dialog_font_select.view.* @@ -20,8 +21,8 @@ class FontSelectDialog(context: Context) : FontAdapter.CallBack { private val defaultFolder = Environment.getExternalStorageDirectory().absolutePath + File.separator + "Fonts" private lateinit var adapter: FontAdapter - private var builder: AlertBuilder - private var dialog: DialogInterface? = null + private var builder: AlertBuilder + private var dialog: AlertDialog? = null @SuppressLint("InflateParams") private var view: View = LayoutInflater.from(context).inflate(R.layout.dialog_font_select, null) var curPath: String? = null @@ -39,7 +40,7 @@ class FontSelectDialog(context: Context) : FontAdapter.CallBack { } fun show() { - dialog = builder.show() + dialog = builder.show().applyTint() } private fun initData() = with(view) {