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
@Immutable | |
data class CustomColorsPalette( | |
val divider: Color = Color.Unspecified, | |
val captionText: Color = Color.Unspecified, | |
) | |
val LightCustomColorsPalette = CustomColorsPalette( | |
divider = Color.Black.copy(alpha = 0.1f), |
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 list = mutableStateListOf("a","b","c") | |
LazyColumn(Modifier.fillMaxSize()) { | |
items(list,{ it }) { item -> | |
val scope = rememberCoroutineScope() | |
val undoScope = rememberCoroutineScope() | |
val dismissState = rememberDismissState( | |
confirmStateChange = { | |
if(it == DismissValue.DismissedToStart) { | |
scope.launch { | |
delay(4000) |
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
FACRModalBottomSheet(facrViewModel.isClubSheetVisible, onSheetHidden = { | |
facrViewModel.isClubSheetVisible = false | |
}) { state -> | |
AddClubsBottomSheet(facrViewModel = facrViewModel) | |
} |
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.facr.fotbal.common | |
import androidx.compose.animation.animateContentSize | |
import androidx.compose.foundation.Image | |
import androidx.compose.foundation.background | |
import androidx.compose.foundation.layout.* | |
import androidx.compose.foundation.rememberScrollState | |
import androidx.compose.foundation.verticalScroll | |
import androidx.compose.material.MaterialTheme | |
import androidx.compose.runtime.Composable |
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
@ExperimentalLayout | |
@ExperimentalFoundationApi | |
@Composable | |
fun CompetitionDetailsScreenNew() { | |
val navigator = LocalNavigator.current | |
val isLandScape = LocalIsLandScape.current | |
val dashboardViewModel: DashboardViewModel = viewModel() | |
val viewModel: CompetitionDetailsViewModel = viewModel() | |
val scrollState = rememberLazyListState() | |
val competionMatchesList = dashboardViewModel.competionMatchesList.collectAsLazyPagingItems() |
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 clubsList = onboardingViewModel.clubs.collectAsLazyPagingItems() | |
GridPagingList(modifier = Modifier.fillMaxWidth().weight(1f),clubsList) { | |
TeamItem(it, savedClubs.value) { club -> | |
onboardingViewModel.updateClubs(savedClubs.value, club) | |
} | |
} |
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 from: "$rootDir/coverage.gradle" | |
//... | |
android { | |
//... | |
buildTypes { | |
//... | |
debug { |
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 net.kristopherjohnson.util; | |
import java.text.DateFormat; | |
import java.text.SimpleDateFormat; | |
import java.util.Date; | |
import java.util.Locale; | |
import java.util.TimeZone; | |
/** | |
* Methods for dealing with timestamps |
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
/* | |
* Copyright (c) 2017 Emil Davtyan | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining | |
* a copy of this software and associated documentation files (the | |
* "Software"), to deal in the Software without restriction, including | |
* without limitation the rights to use, copy, modify, merge, publish, | |
* distribute, sublicense, and/or sell copies of the Software, and to | |
* permit persons to whom the Software is furnished to do so, subject to | |
* the following conditions: |
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
/* MediaDecoder | |
Author: Andrew Stubbs (based on some examples from the docs) | |
This class opens a file, reads the first audio channel it finds, and returns raw audio data. | |
Usage: | |
MediaDecoder decoder = new MediaDecoder("myfile.m4a"); | |
short[] data; | |
while ((data = decoder.readShortData()) != null) { |
NewerOlder