-
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.
WIP #80: UI created for Feedback screen. Existing not removed yet.
- Loading branch information
Showing
14 changed files
with
434 additions
and
42 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
15 changes: 15 additions & 0 deletions
15
app/src/main/java/tech/androidplay/sonali/todo/view/common/Color.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,15 @@ | ||
package tech.androidplay.sonali.todo.view.common | ||
|
||
import androidx.compose.ui.graphics.* | ||
|
||
val WhiteOff = Color(0xFFFAFAFA) | ||
val White100 = Color(0xFFFFFFFF) | ||
val Black100 = Color(0XFF000000) | ||
val GreyDark = Color(0xFF444444) | ||
val GreyMedium = Color(0xFF9E9E9E) | ||
val GreyLight = Color(0xEDE0E0E0) | ||
val AppBlue = Color(0xFF3068DE) | ||
val AppBlueDark = Color(0xFF3425D6) | ||
val OrangeYellow1 = Color(0xfff0bd28) | ||
val OrangeYellow2 = Color(0xfff1c746) | ||
val OrangeYellow3 = Color(0xfff4cf65) |
11 changes: 11 additions & 0 deletions
11
app/src/main/java/tech/androidplay/sonali/todo/view/common/Shape.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,11 @@ | ||
package tech.androidplay.sonali.todo.view.common | ||
|
||
import androidx.compose.foundation.shape.RoundedCornerShape | ||
import androidx.compose.material.Shapes | ||
import androidx.compose.ui.unit.dp | ||
|
||
val Shapes = Shapes( | ||
small = RoundedCornerShape(4.dp), | ||
medium = RoundedCornerShape(4.dp), | ||
large = RoundedCornerShape(0.dp) | ||
) |
35 changes: 35 additions & 0 deletions
35
app/src/main/java/tech/androidplay/sonali/todo/view/common/Theme.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,35 @@ | ||
package tech.androidplay.sonali.todo.view.common | ||
|
||
import androidx.compose.foundation.* | ||
import androidx.compose.material.* | ||
import androidx.compose.runtime.* | ||
|
||
private val DarkColorPalette = darkColors( | ||
primary = AppBlue, | ||
primaryVariant = Black100, | ||
surface = Black100, | ||
secondary = White100 | ||
) | ||
|
||
private val LightColorPalette = lightColors( | ||
primary = AppBlue, | ||
primaryVariant = White100, | ||
surface = White100, | ||
secondary = GreyDark | ||
) | ||
|
||
@Composable | ||
fun AheadTheme( | ||
darkTheme: Boolean = isSystemInDarkTheme(), | ||
content: @Composable() () -> Unit | ||
) { | ||
val colors = if (darkTheme) DarkColorPalette | ||
else LightColorPalette | ||
|
||
MaterialTheme( | ||
colors = colors, | ||
typography = Typography, | ||
content = content, | ||
shapes = Shapes | ||
) | ||
} |
15 changes: 15 additions & 0 deletions
15
app/src/main/java/tech/androidplay/sonali/todo/view/common/Type.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,15 @@ | ||
package tech.androidplay.sonali.todo.view.common | ||
|
||
import androidx.compose.material.Typography | ||
import androidx.compose.ui.text.* | ||
import androidx.compose.ui.text.font.* | ||
import androidx.compose.ui.unit.* | ||
|
||
|
||
val Typography = Typography( | ||
body1 = TextStyle( | ||
fontFamily = FontFamily.Default, | ||
fontWeight = FontWeight.Normal, | ||
fontSize = 16.sp | ||
) | ||
) |
30 changes: 30 additions & 0 deletions
30
app/src/main/java/tech/androidplay/sonali/todo/view/feedback/FeedbackComposableFragment.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,30 @@ | ||
package tech.androidplay.sonali.todo.view.feedback | ||
|
||
import android.os.* | ||
import android.view.* | ||
import androidx.compose.ui.platform.* | ||
import androidx.fragment.app.* | ||
import kotlinx.coroutines.* | ||
import tech.androidplay.sonali.todo.view.common.* | ||
import tech.androidplay.sonali.todo.viewmodel.* | ||
|
||
@ExperimentalCoroutinesApi | ||
class FeedbackComposableFragment() : Fragment() { | ||
|
||
private val viewModel: FeedbackViewModel by viewModels() | ||
|
||
override fun onCreateView( | ||
inflater: LayoutInflater, | ||
container: ViewGroup?, | ||
savedInstanceState: Bundle? | ||
): View { | ||
return ComposeView(requireContext()).apply { | ||
setContent { | ||
AheadTheme { | ||
FeedbackComposeScreen() | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
Oops, something went wrong.