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
| 1. hiltvm (applicable in top-level) | |
| @dagger.hilt.android.lifecycle.HiltViewModel | |
| class $NAME$ @javax.inject.Inject constructor( | |
| $PARAM$ | |
| ) : androidx.lifecycle.ViewModel() { | |
| $END$ | |
| } | |
| 2. vmstatefunc (applicable in class) | |
| private val _$NAME$ = androidx.compose.runtime.mutableStateOf<$TYPE$>($INITIAL_VALUE$) |
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 SwiftUI | |
| import UIKit | |
| import YouTubePlayer | |
| final class YouTubeView: UIViewRepresentable { | |
| typealias UIViewType = YouTubePlayerView | |
| @ObservedObject var playerState: YouTubeControlState | |
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 androidx.compose.runtime.Stable | |
| import androidx.compose.ui.Modifier | |
| import androidx.compose.ui.drawBehind | |
| import androidx.compose.ui.graphics.Color | |
| import androidx.compose.ui.graphics.Path | |
| import androidx.compose.ui.graphics.drawscope.DrawScope | |
| import androidx.compose.ui.unit.Dp | |
| /** | |
| * Border definition can be extended to provide border style or [androidx.compose.ui.graphics.Brush] |
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
| package com.example.windowinsets | |
| import android.graphics.Insets | |
| import androidx.appcompat.app.AppCompatActivity | |
| import android.os.Bundle | |
| import android.view.View | |
| import android.view.WindowInsets | |
| import android.view.WindowInsetsAnimation | |
| import androidx.recyclerview.widget.LinearLayoutManager | |
| import kotlinx.android.synthetic.main.activity_main.* |
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
| { | |
| "anonymous_route": { | |
| "prefix": "anroute", | |
| "body": [ | |
| "/// Anonymous route for [$1].", | |
| "static Route<void> route() {", | |
| " return MaterialPageRoute(builder: (_) => $1());", | |
| "}" | |
| ], | |
| "description": "Generate static function for anonymous route" |