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
@OptIn(ExperimentalMaterialApi::class) | |
@Composable | |
fun PullToRefreshAnimation() { | |
val path = remember { | |
GitHubLogoPath.path.toPath() | |
} | |
val lines = remember { | |
path.asAndroidPath().flatten(error = 0.5f).toList() | |
} |
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
viewLifecycleOwner.lifecycleScope.launch { | |
fusedLocationProviderClient.locationFlow(locationRequest, lifecycleOwner).collect { location -> | |
// Consume location | |
} | |
} |
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
viewLifecycleOwner.lifecycleScope.launch { | |
val location = fusedLocationProviderClient.awaitLastLocation() // Suspend coroutine | |
// Use location | |
} |
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
name: Internal release | |
on: | |
push: | |
tags: | |
- '[1-9]+.[0.9]+.[0.9]+' | |
jobs: | |
build: | |
name: Building release app | |
runs-on: ubuntu-latest |
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
<?xml version="1.0" encoding="utf-8"?> | |
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
android:background="@color/backgroundColor" | |
tools:context=".MainActivity"> | |
<androidx.core.widget.ContentLoadingProgressBar |
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
<?xml version="1.0" encoding="utf-8"?> | |
<resources> | |
<color name="colorPrimary">#B30000</color> | |
<color name="colorPrimaryDark">#980304</color> | |
<color name="colorAccent">#9EBE95</color> | |
<color name="white">#FFFFFF</color> | |
<color name="black">#000000</color> | |
<color name="backgroundColor">#EDEEEE</color> | |
</resources> |
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
<TextView | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:text="Hello world!"/> | |
<ImageView | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
tools:src="@tools:sample/backgrounds/scenic"/> |
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
apply plugin: 'com.android.application' | |
apply plugin: 'kotlin-android' | |
apply plugin: 'kotlin-android-extensions' | |
apply plugin: "kotlin-kapt" | |
android { | |
compileSdkVersion 29 | |
defaultConfig { | |
applicationId "com.devfest.india.bmsclone" |
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
name: Build, Upload to IAS and share on slack. | |
on: | |
push: | |
branches: | |
# Specify branch from where you are sharing build | |
- [branch_name] | |
jobs: | |
build: | |
name: Building app | |
runs-on: ubuntu-latest |
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
suspend inline fun <T> runOnDefault(crossinline task: suspend () -> T): T { | |
return withContext(Dispatchers.Default) { | |
task.invoke() | |
} | |
} | |
suspend inline fun <T> runOnIO(crossinline task: suspend () -> T): T { | |
return withContext(Dispatchers.IO) { | |
task.invoke() | |
} |
NewerOlder