Skip to content

Instantly share code, notes, and snippets.

View worstkiller's full-sized avatar
🎯
Focusing

vikas kumar worstkiller

🎯
Focusing
View GitHub Profile
@Composable
fun getWeatherApp() {
val backgroundColor = listOf(Color(0xFF2078EE), Color(0xFF74E6FE))
val sunColor = listOf(Color(0xFFFFC200), Color(0xFFFFE100))
Canvas(
modifier = Modifier
.size(100.dp)
.padding(16.dp)
) {
val width = size.width
@Composable
private fun getGooglePhotosIcon() {
Canvas(
modifier = Modifier
.size(100.dp)
.padding(16.dp)
) {
drawArc(
color = Color(0xFFf04231),
startAngle = -90f,
@Composable
fun messengerIcon() {
val colors = listOf(Color(0xFF02b8f9), Color(0xFF0277fe))
Canvas(
modifier = Modifier
.size(100.dp)
.padding(16.dp)
) {
val trianglePath = Path().let {
@worstkiller
worstkiller / facebook_icon.kt
Created August 13, 2021 19:05
facebook canvas conposable
@Composable
fun facebookIcon() {
val assetManager = LocalContext.current.assets
val paint = Paint().apply {
textAlign = Paint.Align.CENTER
textSize = 200f
color = Color.White.toArgb()
typeface = Typeface.createFromAsset(assetManager, "FACEBOLF.OTF")
}
Canvas(
import org.gradle.api.artifacts.dsl.DependencyHandler
object AppDependencies {
//std lib
val kotlinStdLib = "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${Versions.kotlin}"
//android ui
private val appcompat = "androidx.appcompat:appcompat:${Versions.appcompat}"
private val coreKtx = "androidx.core:core-ktx:${Versions.coreKtx}"
private val constraintLayout =
//version constants for the Kotlin DSL dependencies
object Versions {
//app level
const val gradle = "4.0.1"
const val kotlin = "1.4.0"
//libs
val coreKtx = "1.2.0"
val appcompat = "1.3.0-alpha01"
val constraintLayout = "2.0.0-beta8"
//app level config constants
object AppConfig {
const val compileSdk = 30
const val minSdk = 21
const val targetSdk = 30
const val versionCode = 1
const val versionName = "1.0.0"
const val buildToolsVersion = "29.0.3"
const val androidTestInstrumentation = "androidx.test.runner.AndroidJUnitRunner"
include(":repository", ":core", ":app")
rootProject.name = "Hilt Android"
include ':app:repository'
include ':app:core'
include ':app'
rootProject.name = "Hilt Android"
import org.gradle.kotlin.dsl.`kotlin-dsl`
plugins {
`kotlin-dsl`
}
repositories {
jcenter()
}