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 org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget | |
| plugins { | |
| kotlin("multiplatform") | |
| id("com.android.library") | |
| kotlin("plugin.parcelize") | |
| id("com.apollographql.apollo3") version "3.0.0-dev13" | |
| id("com.chromaticnoise.multiplatform-swiftpackage") version "2.0.3" | |
| } |
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.material.LocalTextStyle | |
| import androidx.compose.material.Text | |
| import androidx.compose.runtime.Composable | |
| import androidx.compose.ui.Modifier | |
| import androidx.compose.ui.graphics.Color | |
| import androidx.compose.ui.res.stringResource | |
| import androidx.compose.ui.text.TextLayoutResult | |
| import androidx.compose.ui.text.TextStyle | |
| import androidx.compose.ui.text.font.FontFamily | |
| import androidx.compose.ui.text.font.FontStyle |
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
| android.applicationVariants.all { variant -> | |
| task "open${variant.name.capitalize()}" { | |
| dependsOn "install${variant.name.capitalize()}" | |
| doLast { | |
| exec { | |
| commandLine "adb shell monkey -p ${variant.applicationId} -c android.intent.category.LAUNCHER 1".split(" ") | |
| } | |
| } | |
| } |
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
| @Composable | |
| internal fun Content( | |
| viewState: OnSiteScheduleViewState, | |
| actioner: (OnSiteScheduleAction) -> Unit, | |
| ) { | |
| MonthCalendar( | |
| modifier = Modifier | |
| .fillMaxWidth() | |
| .padding(horizontal = 8.dp), | |
| onMonthChanged = { day -> actioner(OnSiteScheduleAction.OnMonthChanged(day)) } |
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
| interface CalendarScope { | |
| var changeMonthAnimation: FiniteAnimationSpec<Float> | |
| var changeMonthSwipeTriggerVelocity: Int | |
| var header: @Composable (day: CalendarDay, actioner: (CalendarAction) -> Unit) -> Unit | |
| var dayLabel: @Composable (dayOfWeek: DayOfWeek, labelWidth: Dp) -> Unit | |
| var day: @Composable BoxScope.(padding: PaddingValues, day: CalendarDay, today: CalendarDay) -> Unit | |
| var inDates: @Composable BoxScope.(padding: PaddingValues, day: CalendarDay) -> Unit | |
| var outDates: @Composable BoxScope.(padding: PaddingValues, dayDate: CalendarDay) -> Unit | |
| } |
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.foundation.ExperimentalFoundationApi | |
| import androidx.compose.foundation.layout.Box | |
| import androidx.compose.foundation.layout.BoxWithConstraints | |
| import androidx.compose.foundation.layout.Column | |
| import androidx.compose.foundation.layout.PaddingValues | |
| import androidx.compose.foundation.layout.Row | |
| import androidx.compose.foundation.layout.Spacer | |
| import androidx.compose.foundation.layout.width | |
| import androidx.compose.foundation.lazy.GridCells | |
| import androidx.compose.foundation.lazy.LazyColumn |
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.planoly.ui.compose.components | |
| import androidx.compose.foundation.clickable | |
| import androidx.compose.foundation.layout.Row | |
| import androidx.compose.foundation.layout.padding | |
| import androidx.compose.material.Icon | |
| import androidx.compose.material.IconButton | |
| import androidx.compose.material.MaterialTheme | |
| import androidx.compose.material.Surface | |
| import androidx.compose.material.Text |
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
| interface AppComponent : Component { | |
| val appContext: Context | |
| } | |
| class AppConfig( | |
| override val appContext: Context, | |
| ) : AppComponent |
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
| class AndroidResourceHelper(private val context: Context) : ResourceHelper { | |
| override fun getString(@StringRes resourceId: Int, default: String): String { | |
| return try { | |
| context.getString(resourceId) | |
| } catch (e: Exception) { | |
| e.printStackTrace() | |
| default | |
| } | |
| } |
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.animation.* | |
| import androidx.compose.animation.core.tween | |
| import androidx.compose.material.* | |
| import androidx.compose.runtime.Composable | |
| import androidx.compose.runtime.onCommit | |
| import androidx.compose.ui.Modifier | |
| @OptIn(ExperimentalAnimationApi::class, ExperimentalMaterialApi::class) | |
| @Composable | |
| fun <T> AnimatedSwipeDismiss( |