|
|
|
@ -31,6 +31,7 @@ import org.jetbrains.anko.toast |
|
|
|
|
import java.io.File |
|
|
|
|
|
|
|
|
|
class FontSelectDialog : BaseDialogFragment(), |
|
|
|
|
FileChooserDialog.CallBack, |
|
|
|
|
Toolbar.OnMenuItemClickListener, |
|
|
|
|
FontAdapter.CallBack { |
|
|
|
|
private val fontFolderRequestCode = 35485 |
|
|
|
@ -218,6 +219,15 @@ class FontSelectDialog : BaseDialogFragment(), |
|
|
|
|
?: "" |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
override fun onFilePicked(requestCode: Int, currentPath: String) { |
|
|
|
|
when (requestCode) { |
|
|
|
|
fontFolderRequestCode -> { |
|
|
|
|
putPrefString(PreferKey.fontFolder, currentPath) |
|
|
|
|
getFontFilesByPermission(currentPath) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) { |
|
|
|
|
super.onActivityResult(requestCode, resultCode, data) |
|
|
|
|
when (requestCode) { |
|
|
|
|