For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.lang.reflect.Field; | |
| import java.lang.reflect.Modifier; | |
| import java.util.Arrays; | |
| import java.util.Collection; | |
| import java.util.HashMap; | |
| import java.util.Map; | |
| import java.util.function.IntFunction; | |
| public class ReflectionUtils { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import android.os.Bundle | |
| import android.util.Log | |
| import androidx.appcompat.app.AppCompatActivity | |
| import androidx.lifecycle.lifecycleScope | |
| import io.ktor.client.* | |
| import io.ktor.client.engine.android.* | |
| import io.ktor.client.features.* | |
| import io.ktor.client.features.json.* | |
| import io.ktor.client.features.json.serializer.* | |
| import io.ktor.client.features.logging.* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import kotlinx.coroutines.* | |
| import kotlin.random.Random | |
| import kotlin.system.measureTimeMillis | |
| fun main(args: Array<String>) { | |
| val time = measureTimeMillis { | |
| runBlocking { | |
| val coffeePowder = async { | |
| println("Grinding coffee bean...") | |
| grindCoffeeBeans() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import kotlinx.coroutines.* | |
| import kotlin.random.Random | |
| import kotlin.system.measureTimeMillis | |
| fun main(args: Array<String>) { | |
| // measureCoroutineExecutionTime() | |
| // catchExceptionOfLaunchCoroutineBuilder() | |
| // catchExceptionOfAsyncCoroutineBuilder() | |
| // fireAndForget() | |
| // getReturnValueFromCoroutine() |
NewerOlder