|
|
@ -67,6 +67,9 @@ class MyFragment : BaseFragment(R.layout.fragment_my_config) { |
|
|
|
putPrefBoolean(PreferKey.webService, WebService.isRun) |
|
|
|
putPrefBoolean(PreferKey.webService, WebService.isRun) |
|
|
|
addPreferencesFromResource(R.xml.pref_main) |
|
|
|
addPreferencesFromResource(R.xml.pref_main) |
|
|
|
findPreference<SwitchPreference>("webService")?.onLongClick { |
|
|
|
findPreference<SwitchPreference>("webService")?.onLongClick { |
|
|
|
|
|
|
|
if (!WebService.isRun) { |
|
|
|
|
|
|
|
return@onLongClick false |
|
|
|
|
|
|
|
} |
|
|
|
context?.selector(arrayListOf("复制地址", "浏览器打开")) { _, i -> |
|
|
|
context?.selector(arrayListOf("复制地址", "浏览器打开")) { _, i -> |
|
|
|
when (i) { |
|
|
|
when (i) { |
|
|
|
0 -> context?.sendToClip(it.summary.toString()) |
|
|
|
0 -> context?.sendToClip(it.summary.toString()) |
|
|
|