-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Onboarding, daily notification and more (#141)
* Disable move undone tasks by default * Add daily reminder notification * Add onboarding feature
- Loading branch information
Showing
94 changed files
with
2,415 additions
and
160 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
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
54 changes: 54 additions & 0 deletions
54
core/designsystem/src/main/java/com/costular/designsystem/components/OutlinedButton.kt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
package com.costular.designsystem.components | ||
|
||
import androidx.compose.foundation.BorderStroke | ||
import androidx.compose.foundation.interaction.MutableInteractionSource | ||
import androidx.compose.foundation.layout.PaddingValues | ||
import androidx.compose.foundation.layout.RowScope | ||
import androidx.compose.material3.ButtonColors | ||
import androidx.compose.material3.ButtonDefaults | ||
import androidx.compose.material3.ButtonElevation | ||
import androidx.compose.material3.Text | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.runtime.remember | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.graphics.Shape | ||
import androidx.compose.ui.tooling.preview.Preview | ||
import com.costular.designsystem.theme.AppTheme | ||
import com.costular.designsystem.theme.AtomTheme | ||
|
||
@Composable | ||
fun OutlinedButton( | ||
onClick: () -> Unit, | ||
modifier: Modifier = Modifier, | ||
enabled: Boolean = true, | ||
interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, | ||
shape: Shape = ButtonDefaults.outlinedShape, | ||
border: BorderStroke? = ButtonDefaults.outlinedButtonBorder(enabled), | ||
colors: ButtonColors = ButtonDefaults.outlinedButtonColors(), | ||
elevation: ButtonElevation? = null, | ||
contentPadding: PaddingValues = PaddingValues(AppTheme.dimens.spacingLarge), | ||
content: @Composable RowScope.() -> Unit, | ||
) { | ||
androidx.compose.material3.OutlinedButton( | ||
onClick, | ||
modifier = modifier, | ||
enabled = enabled, | ||
border = border, | ||
shape = shape, | ||
interactionSource = interactionSource, | ||
elevation = elevation, | ||
colors = colors, | ||
contentPadding = contentPadding, | ||
content = content, | ||
) | ||
} | ||
|
||
@Preview | ||
@Composable | ||
private fun OutlinedButtonPreview() { | ||
AtomTheme { | ||
OutlinedButton(onClick = {}) { | ||
Text("Click me!") | ||
} | ||
} | ||
} |
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
52 changes: 52 additions & 0 deletions
52
core/designsystem/src/main/java/com/costular/designsystem/components/SecondaryButton.kt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
package com.costular.designsystem.components | ||
|
||
import androidx.compose.foundation.interaction.MutableInteractionSource | ||
import androidx.compose.foundation.layout.PaddingValues | ||
import androidx.compose.foundation.layout.RowScope | ||
import androidx.compose.material3.ButtonColors | ||
import androidx.compose.material3.ButtonDefaults | ||
import androidx.compose.material3.ButtonElevation | ||
import androidx.compose.material3.FilledTonalButton | ||
import androidx.compose.material3.Text | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.runtime.remember | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.graphics.Shape | ||
import androidx.compose.ui.tooling.preview.Preview | ||
import com.costular.designsystem.theme.AppTheme | ||
import com.costular.designsystem.theme.AtomTheme | ||
|
||
@Composable | ||
fun SecondaryButton( | ||
onClick: () -> Unit, | ||
modifier: Modifier = Modifier, | ||
enabled: Boolean = true, | ||
interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, | ||
shape: Shape = ButtonDefaults.filledTonalShape, | ||
colors: ButtonColors = ButtonDefaults.filledTonalButtonColors(), | ||
elevation: ButtonElevation? = ButtonDefaults.filledTonalButtonElevation(), | ||
contentPadding: PaddingValues = PaddingValues(AppTheme.dimens.spacingLarge), | ||
content: @Composable RowScope.() -> Unit, | ||
) { | ||
FilledTonalButton( | ||
onClick, | ||
modifier = modifier, | ||
enabled = enabled, | ||
shape = shape, | ||
interactionSource = interactionSource, | ||
elevation = elevation, | ||
colors = colors, | ||
contentPadding = contentPadding, | ||
content = content, | ||
) | ||
} | ||
|
||
@Preview | ||
@Composable | ||
private fun SecondaryButtonPreview() { | ||
AtomTheme { | ||
SecondaryButton(onClick = {}) { | ||
Text("Click me!") | ||
} | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/build |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
plugins { | ||
id("atomtasks.android.library") | ||
id("atomtasks.detekt") | ||
id("atomtasks.android.hilt") | ||
} | ||
|
||
android { | ||
namespace = "com.costular.atomtasks.core.locale" | ||
} | ||
|
||
dependencies { | ||
|
||
} |
Empty file.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Add project specific ProGuard rules here. | ||
# You can control the set of applied configuration files using the | ||
# proguardFiles setting in build.gradle. | ||
# | ||
# For more details, see | ||
# http://developer.android.com/guide/developing/tools/proguard.html | ||
|
||
# If your project uses WebView with JS, uncomment the following | ||
# and specify the fully qualified class name to the JavaScript interface | ||
# class: | ||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview { | ||
# public *; | ||
#} | ||
|
||
# Uncomment this to preserve the line number information for | ||
# debugging stack traces. | ||
#-keepattributes SourceFile,LineNumberTable | ||
|
||
# If you keep the line number information, uncomment this to | ||
# hide the original source file name. | ||
#-renamesourcefileattribute SourceFile |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"> | ||
|
||
</manifest> |
13 changes: 13 additions & 0 deletions
13
core/locale/src/main/java/com/costular/atomtasks/core/locale/LocaleModule.kt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package com.costular.atomtasks.core.locale | ||
|
||
import dagger.Binds | ||
import dagger.Module | ||
import dagger.hilt.InstallIn | ||
import dagger.hilt.components.SingletonComponent | ||
|
||
@InstallIn(SingletonComponent::class) | ||
@Module | ||
internal interface LocaleModule { | ||
@Binds | ||
fun bindLocaleResolver(impl: LocaleResolverImpl): LocaleResolver | ||
} |
7 changes: 7 additions & 0 deletions
7
core/locale/src/main/java/com/costular/atomtasks/core/locale/LocaleResolver.kt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package com.costular.atomtasks.core.locale | ||
|
||
import java.util.Locale | ||
|
||
interface LocaleResolver { | ||
fun getLocale(): Locale | ||
} |
14 changes: 14 additions & 0 deletions
14
core/locale/src/main/java/com/costular/atomtasks/core/locale/LocaleResolverImpl.kt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package com.costular.atomtasks.core.locale | ||
|
||
import android.content.Context | ||
import dagger.hilt.android.qualifiers.ApplicationContext | ||
import java.util.Locale | ||
import javax.inject.Inject | ||
|
||
internal class LocaleResolverImpl @Inject constructor( | ||
@ApplicationContext private val context: Context, | ||
) : LocaleResolver { | ||
override fun getLocale(): Locale { | ||
return context.resources.configuration.locales[0] | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
...ns/src/main/java/com/costular/atomtasks/notifications/DailyReminderNotificationManager.kt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package com.costular.atomtasks.notifications | ||
|
||
interface DailyReminderNotificationManager { | ||
fun showDailyReminderNotification() | ||
fun removeDailyReminderNotification() | ||
} |
Oops, something went wrong.