Skip to content

Latest commit

 

History

History
17 lines (14 loc) · 644 Bytes

README.md

File metadata and controls

17 lines (14 loc) · 644 Bytes

跳转带返回值 startActivityForResultNow()

val intent = Intent(this, MainActivity1::class.java)
    startActivityForResultNow(ActivityResultCallback<ActivityResult> {
        /**
         * Called when result is available
         */
        HToast.showToastSuccess(it.data?.getStringExtra("key")?.toString() ?: "--")
    }, intent)

权限请求 requestPermissionForResultNowTest()

requestPermissionForResultNow(ActivityResultCallback {
        it.forEach { (t, u) ->
            HToast.showToastSuccess("$t-$u")
        }
    }, android.Manifest.permission.READ_EXTERNAL_STORAGE)