For example, you want to set 40% alpha transparence to #000000
(black color), you need to add 66
like this #66000000
.
This file contains 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 androidx.compose.animation.AnimatedContent | |
import androidx.compose.animation.core.tween | |
import androidx.compose.animation.fadeIn | |
import androidx.compose.animation.fadeOut | |
import androidx.compose.animation.togetherWith | |
import androidx.compose.runtime.Composable | |
sealed class RequestState<out T> { | |
data object Idle : RequestState<Nothing>() | |
data object Loading : RequestState<Nothing>() |
This file contains 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
package com.hse.parkingapp.ui.beta.screens.components.material3 | |
/* | |
* Copyright 2020 The Android Open Source Project | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 |
This file contains 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
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':jacocoFullReport'. | |
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.lambda$executeIfValid$3(ExecuteActionsTaskExecuter.java:186) | |
Caused by: : Error while creating report | |
at org.jacoco.ant.ReportTask.execute(ReportTask.java:502) | |
Caused by: java.io.IOException: Error while analyzing PersonalRequestHelper.class. | |
at org.jacoco.core.analysis.Analyzer.analyzerError(Analyzer.java:162) | |
Caused by: java.lang.IllegalStateException: Unexpected SMAP line: *S KotlinDebug | |
at org.jacoco.core.internal.analysis.filter.KotlinInlineFilter.getFirstGeneratedLineNumber(KotlinInlineFilter.java:98) |
This file contains 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
/** | |
* Navigates only if this is safely possible; when this Fragment is still the current destination. | |
*/ | |
fun Fragment.navigateSafe( | |
@IdRes resId: Int, | |
args: Bundle? = null, | |
navOptions: NavOptions? = null, | |
navigatorExtras: Navigator.Extras? = null | |
) { | |
if (mayNavigate()) findNavController().navigate( |
This file contains 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
class ProgressLoading : DialogFragment() { | |
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog { | |
val dialog = super.onCreateDialog(savedInstanceState) | |
dialog.apply { | |
requestWindowFeature(Window.FEATURE_NO_TITLE) | |
setContentView(R.layout.dialog_loading) | |
setCancelable(false) | |
window?.setBackgroundDrawable(ColorDrawable(android.graphics.Color.TRANSPARENT)) | |
window?.setDimAmount(0f) |
This file contains 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
// http://www.codewars.com/kata/515bb423de843ea99400000a/train/javascript | |
// TODO: complete this object/class | |
// The constructor takes in an array of items and a integer indicating how many | |
// items fit within a single page | |
function PaginationHelper(collection, itemsPerPage){ | |
this.collection = collection; | |
this.itemsPerPage = itemsPerPage; | |
} |
This file contains 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
package ch.jojoni.jamplan.model.repository; | |
import android.support.annotation.NonNull; | |
import android.util.Log; | |
import com.google.android.gms.tasks.Continuation; | |
import com.google.android.gms.tasks.OnFailureListener; | |
import com.google.android.gms.tasks.Task; | |
import com.google.firebase.firestore.CollectionReference; | |
import com.google.firebase.firestore.DocumentReference; |
This file contains 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 com.squareup.moshi.JsonAdapter | |
import com.squareup.moshi.Moshi | |
import com.squareup.moshi.Types | |
import java.lang.reflect.Type | |
// val adapter = moshi.listAdapter<MyModel>() | |
// val adapter = moshi.mapAdapter<String, List<MyModel>>(valueType = listType<MyModel>()) | |
inline fun <reified E> Moshi.listAdapter(elementType: Type = E::class.java): JsonAdapter<List<E>> { | |
return adapter(listType<E>(elementType)) |
This file contains 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
/(0|+?254)7(\d){8}/ |
NewerOlder