Skip to content

Instantly share code, notes, and snippets.

Avatar

Li Zhao Tai Lang TonnyL

View GitHub Profile
View Charles usage.kt
Charles.from(this@MainActivity)
 .choose()
 .maxSelectable(9)
 .progressRate(true)
 .theme(R.style.Charles)
 .imageEngine(GlideEngine())
 .restrictOrientation(ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED)
 .forResult(REQUEST_CODE_CHOOSE)
View Charles usage 2.kt
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
super.onActivityResult(requestCode, resultCode, data)
if (requestCode == REQUEST_CODE_CHOOSE && resultCode == Activity.RESULT_OK) {
val uris = Charles.obtainResult(data)
val paths = Charles.obtainPathResult(data)
Log.d("charles", "uris: $uris")
Log.d("charles", "paths: $paths")
}
}
@TonnyL
TonnyL / schema.json
Last active Nov 6, 2019
Schema definition of GitHub GraphQL API V4
View schema.json
This file has been truncated, but you can view the full file.
{
"__schema": {
"queryType": {
"name": "Query"
},
"mutationType": {
"name": "Mutation"
},
"subscriptionType": null,