|
|
@ -31,6 +31,7 @@ import org.jetbrains.anko.toast |
|
|
|
import java.io.File |
|
|
|
import java.io.File |
|
|
|
|
|
|
|
|
|
|
|
class FontSelectDialog : BaseDialogFragment(), |
|
|
|
class FontSelectDialog : BaseDialogFragment(), |
|
|
|
|
|
|
|
FileChooserDialog.CallBack, |
|
|
|
Toolbar.OnMenuItemClickListener, |
|
|
|
Toolbar.OnMenuItemClickListener, |
|
|
|
FontAdapter.CallBack { |
|
|
|
FontAdapter.CallBack { |
|
|
|
private val fontFolderRequestCode = 35485 |
|
|
|
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?) { |
|
|
|
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) { |
|
|
|
super.onActivityResult(requestCode, resultCode, data) |
|
|
|
super.onActivityResult(requestCode, resultCode, data) |
|
|
|
when (requestCode) { |
|
|
|
when (requestCode) { |
|
|
|