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
@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 |
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
@Composable | |
private fun getGooglePhotosIcon() { | |
Canvas( | |
modifier = Modifier | |
.size(100.dp) | |
.padding(16.dp) | |
) { | |
drawArc( | |
color = Color(0xFFf04231), | |
startAngle = -90f, |
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
@Composable | |
fun messengerIcon() { | |
val colors = listOf(Color(0xFF02b8f9), Color(0xFF0277fe)) | |
Canvas( | |
modifier = Modifier | |
.size(100.dp) | |
.padding(16.dp) | |
) { | |
val trianglePath = Path().let { |
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
@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( |
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 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 = |
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
//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" |
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
//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" |
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
include(":repository", ":core", ":app") | |
rootProject.name = "Hilt Android" |
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
include ':app:repository' | |
include ':app:core' | |
include ':app' | |
rootProject.name = "Hilt Android" |
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 org.gradle.kotlin.dsl.`kotlin-dsl` | |
plugins { | |
`kotlin-dsl` | |
} | |
repositories { | |
jcenter() | |
} |
NewerOlder