For example, you want to set 40% alpha transparence to #000000
(black color), you need to add 66
like this #66000000
.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
{"v":"4.12.0","fr":30,"ip":0,"op":90,"w":400,"h":400,"nm":"c","assets":[{"id":"comp_27","layers":[{"ind":1,"ty":0,"nm":"p","refId":"comp_28","sr":1,"ks":{"o":{"a":0,"k":100},"r":{"a":0,"k":300},"p":{"a":0,"k":[50,50,0]},"a":{"a":0,"k":[50,50,0]},"s":{"a":0,"k":[100,100,100]}},"ao":0,"w":100,"h":100,"ip":0,"op":240,"st":0},{"ind":2,"ty":0,"nm":"p","refId":"comp_28","sr":1,"ks":{"o":{"a":0,"k":100},"r":{"a":0,"k":240},"p":{"a":0,"k":[50,50,0]},"a":{"a":0,"k":[50,50,0]},"s":{"a":0,"k":[100,100,100]}},"ao":0,"w":100,"h":100,"ip":0,"op":240,"st":0},{"ind":3,"ty":0,"nm":"p","refId":"comp_28","sr":1,"ks":{"o":{"a":0,"k":100},"r":{"a":0,"k":180},"p":{"a":0,"k":[50,50,0]},"a":{"a":0,"k":[50,50,0]},"s":{"a":0,"k":[100,100,100]}},"ao":0,"w":100,"h":100,"ip":0,"op":240,"st":0},{"ind":4,"ty":0,"nm":"p","refId":"comp_28","sr":1,"ks":{"o":{"a":0,"k":100},"r":{"a":0,"k":120},"p":{"a":0,"k":[50,50,0]},"a":{"a":0,"k":[50,50,0]},"s":{"a":0,"k":[100,100,100]}},"ao":0,"w":100,"h":100,"ip":0,"op":240,"st":0},{"ind":5,"ty":0,"nm":" |
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.example.salscomposecomponents | |
inline fun <R : Any> R.applyWhen( | |
condition: Boolean, | |
block: R.() -> R, | |
): R = applyChoice(condition = condition, trueBlock = block, falseBlock = { this }) | |
inline fun <R : Any> R.applyChoice( | |
condition: Boolean, | |
trueBlock: R.() -> R, |
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.sal7one.handler | |
import android.os.Bundle | |
import android.os.Handler | |
import android.os.Looper | |
import android.os.Message | |
import android.util.Log | |
import androidx.activity.ComponentActivity | |
import androidx.activity.compose.setContent | |
import androidx.activity.enableEdgeToEdge |
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
val otherColors = listOf( | |
// Color(0xffffffff), | |
Color(0xff125B34), | |
) | |
@Composable | |
fun CubicWaves() { | |
var angle by remember { mutableFloatStateOf(0f) } | |
val cols = 50 |
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
// infinite with gap of 1 | |
@Composable | |
fun AnimatedHeartShapeRaw( | |
brush: Brush = Brush.verticalGradient(colors = listOf(Color.Magenta, Color.Magenta)), // Default gradient from Magenta to Blue | |
) { | |
val animationPercentage = remember { Animatable(0f) } // Animation state from 0 to 1 | |
LaunchedEffect(Unit) { | |
animationPercentage.animateTo( |
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
// Raw hilt viewmodel | |
@HiltViewModel | |
class SomeViewModel @Inject constructor( | |
private val repository: Repo // Injected from hilt | |
) : ViewModel() { | |
} | |
// Let's pass any var we want for example an int that we pass when we create the viewmodel |
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 MainActivity : AppCompatActivity() { | |
private val secretUserNum = Random().nextInt(100) + 1 | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
setContentView(R.layout.activity_main) | |
findViewById<TextView>(R.id.actualPass).text = "Actual pass $secretUserNum " |
NewerOlder