Compare commits
No commits in common. "fe1c24c6640c0227146b8ef9e6169f32d99d08f8" and "74206f0bbe37d96babf9582732a8a573663735c7" have entirely different histories.
fe1c24c664
...
74206f0bbe
@ -1,13 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="deploymentTargetSelector">
|
|
||||||
<selectionStates>
|
|
||||||
<SelectionState runConfigName="app">
|
|
||||||
<option name="selectionMode" value="DROPDOWN" />
|
|
||||||
</SelectionState>
|
|
||||||
<SelectionState runConfigName="AuthTextFiled">
|
|
||||||
<option name="selectionMode" value="DROPDOWN" />
|
|
||||||
</SelectionState>
|
|
||||||
</selectionStates>
|
|
||||||
</component>
|
|
||||||
</project>
|
|
@ -1,6 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="GradleMigrationSettings" migrationVersion="1" />
|
|
||||||
<component name="GradleSettings">
|
<component name="GradleSettings">
|
||||||
<option name="linkedExternalProjectsSettings">
|
<option name="linkedExternalProjectsSettings">
|
||||||
<GradleProjectSettings>
|
<GradleProjectSettings>
|
||||||
|
@ -1,53 +0,0 @@
|
|||||||
<component name="InspectionProjectProfileManager">
|
|
||||||
<profile version="1.0">
|
|
||||||
<option name="myName" value="Project Default" />
|
|
||||||
<inspection_tool class="ComposePreviewDimensionRespectsLimit" enabled="true" level="WARNING" enabled_by_default="true">
|
|
||||||
<option name="composableFile" value="true" />
|
|
||||||
<option name="previewFile" value="true" />
|
|
||||||
</inspection_tool>
|
|
||||||
<inspection_tool class="ComposePreviewMustBeTopLevelFunction" enabled="true" level="ERROR" enabled_by_default="true">
|
|
||||||
<option name="composableFile" value="true" />
|
|
||||||
<option name="previewFile" value="true" />
|
|
||||||
</inspection_tool>
|
|
||||||
<inspection_tool class="ComposePreviewNeedsComposableAnnotation" enabled="true" level="ERROR" enabled_by_default="true">
|
|
||||||
<option name="composableFile" value="true" />
|
|
||||||
<option name="previewFile" value="true" />
|
|
||||||
</inspection_tool>
|
|
||||||
<inspection_tool class="ComposePreviewNotSupportedInUnitTestFiles" enabled="true" level="ERROR" enabled_by_default="true">
|
|
||||||
<option name="composableFile" value="true" />
|
|
||||||
<option name="previewFile" value="true" />
|
|
||||||
</inspection_tool>
|
|
||||||
<inspection_tool class="GlancePreviewDimensionRespectsLimit" enabled="true" level="WARNING" enabled_by_default="true">
|
|
||||||
<option name="composableFile" value="true" />
|
|
||||||
</inspection_tool>
|
|
||||||
<inspection_tool class="GlancePreviewMustBeTopLevelFunction" enabled="true" level="ERROR" enabled_by_default="true">
|
|
||||||
<option name="composableFile" value="true" />
|
|
||||||
</inspection_tool>
|
|
||||||
<inspection_tool class="GlancePreviewNeedsComposableAnnotation" enabled="true" level="ERROR" enabled_by_default="true">
|
|
||||||
<option name="composableFile" value="true" />
|
|
||||||
</inspection_tool>
|
|
||||||
<inspection_tool class="GlancePreviewNotSupportedInUnitTestFiles" enabled="true" level="ERROR" enabled_by_default="true">
|
|
||||||
<option name="composableFile" value="true" />
|
|
||||||
</inspection_tool>
|
|
||||||
<inspection_tool class="PreviewAnnotationInFunctionWithParameters" enabled="true" level="ERROR" enabled_by_default="true">
|
|
||||||
<option name="composableFile" value="true" />
|
|
||||||
<option name="previewFile" value="true" />
|
|
||||||
</inspection_tool>
|
|
||||||
<inspection_tool class="PreviewApiLevelMustBeValid" enabled="true" level="ERROR" enabled_by_default="true">
|
|
||||||
<option name="composableFile" value="true" />
|
|
||||||
<option name="previewFile" value="true" />
|
|
||||||
</inspection_tool>
|
|
||||||
<inspection_tool class="PreviewFontScaleMustBeGreaterThanZero" enabled="true" level="ERROR" enabled_by_default="true">
|
|
||||||
<option name="composableFile" value="true" />
|
|
||||||
<option name="previewFile" value="true" />
|
|
||||||
</inspection_tool>
|
|
||||||
<inspection_tool class="PreviewMultipleParameterProviders" enabled="true" level="ERROR" enabled_by_default="true">
|
|
||||||
<option name="composableFile" value="true" />
|
|
||||||
<option name="previewFile" value="true" />
|
|
||||||
</inspection_tool>
|
|
||||||
<inspection_tool class="PreviewPickerAnnotation" enabled="true" level="ERROR" enabled_by_default="true">
|
|
||||||
<option name="composableFile" value="true" />
|
|
||||||
<option name="previewFile" value="true" />
|
|
||||||
</inspection_tool>
|
|
||||||
</profile>
|
|
||||||
</component>
|
|
@ -1,3 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="jbr-17" project-jdk-type="JavaSDK">
|
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="jbr-17" project-jdk-type="JavaSDK">
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
<svg width="6" height="12" viewBox="0 0 6 12" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
||||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M5.46849 0.414315C5.79194 0.673072 5.84438 1.14504 5.58562 1.46849L1.96044 5.99997L5.58562 10.5314C5.84438 10.8549 5.79194 11.3269 5.46849 11.5856C5.14505 11.8444 4.67308 11.7919 4.41432 11.4685L0.414321 6.46849C0.195189 6.19457 0.195189 5.80536 0.414321 5.53145L4.41432 0.531445C4.67308 0.207999 5.14505 0.155558 5.46849 0.414315Z" fill="#2B2B2B"/>
|
|
||||||
</svg>
|
|
Before Width: | Height: | Size: 500 B |
@ -5,7 +5,7 @@ plugins {
|
|||||||
|
|
||||||
android {
|
android {
|
||||||
namespace = "com.example.appwithwin"
|
namespace = "com.example.appwithwin"
|
||||||
compileSdk = 35
|
compileSdk = 34
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId = "com.example.appwithwin"
|
applicationId = "com.example.appwithwin"
|
||||||
|
@ -23,9 +23,6 @@
|
|||||||
<category android:name="android.intent.category.LAUNCHER" />
|
<category android:name="android.intent.category.LAUNCHER" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</activity>
|
</activity>
|
||||||
<meta-data
|
|
||||||
android:name="preloaded_fonts"
|
|
||||||
android:resource="@array/preloaded_fonts" />
|
|
||||||
</application>
|
</application>
|
||||||
|
|
||||||
</manifest>
|
</manifest>
|
@ -1,20 +1,47 @@
|
|||||||
package com.example.appwithwin
|
package com.example.appwithwin
|
||||||
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import androidx.activity.ComponentActivity
|
import androidx.activity.ComponentActivity
|
||||||
import androidx.activity.compose.setContent
|
import androidx.activity.compose.setContent
|
||||||
import androidx.activity.enableEdgeToEdge
|
import androidx.activity.enableEdgeToEdge
|
||||||
import com.example.appwithwin.ui.screen.signIn.SignInScreen
|
import androidx.compose.foundation.layout.fillMaxSize
|
||||||
import com.example.appwithwin.ui.theme.MatuleTheme
|
import androidx.compose.foundation.layout.padding
|
||||||
|
import androidx.compose.material3.Scaffold
|
||||||
|
import androidx.compose.material3.Text
|
||||||
|
import androidx.compose.runtime.Composable
|
||||||
|
import androidx.compose.ui.Modifier
|
||||||
|
import androidx.compose.ui.tooling.preview.Preview
|
||||||
|
import com.example.appwithwin.ui.theme.AppWithWinTheme
|
||||||
|
|
||||||
class MainActivity : ComponentActivity() {
|
class MainActivity : ComponentActivity() {
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
enableEdgeToEdge()
|
enableEdgeToEdge()
|
||||||
setContent {
|
setContent {
|
||||||
MatuleTheme {
|
AppWithWinTheme {
|
||||||
SignInScreen()
|
Scaffold(modifier = Modifier.fillMaxSize()) { innerPadding ->
|
||||||
|
Greeting(
|
||||||
|
name = "Android",
|
||||||
|
modifier = Modifier.padding(innerPadding)
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Composable
|
||||||
|
fun Greeting(name: String, modifier: Modifier = Modifier) {
|
||||||
|
Text(
|
||||||
|
text = "Hello $name!",
|
||||||
|
modifier = modifier
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
@Preview(showBackground = true)
|
||||||
|
@Composable
|
||||||
|
fun GreetingPreview() {
|
||||||
|
AppWithWinTheme {
|
||||||
|
Greeting("Android")
|
||||||
|
}
|
||||||
|
}
|
@ -1,217 +0,0 @@
|
|||||||
package com.example.appwithwin.ui.screen.signIn
|
|
||||||
|
|
||||||
import android.icu.text.AlphabeticIndex.Bucket.LabelType
|
|
||||||
import androidx.annotation.StringRes
|
|
||||||
import androidx.compose.foundation.background
|
|
||||||
import androidx.compose.foundation.interaction.MutableInteractionSource
|
|
||||||
import androidx.compose.foundation.layout.Arrangement
|
|
||||||
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.fillMaxSize
|
|
||||||
import androidx.compose.foundation.layout.fillMaxWidth
|
|
||||||
import androidx.compose.foundation.layout.height
|
|
||||||
import androidx.compose.foundation.layout.padding
|
|
||||||
import androidx.compose.foundation.layout.width
|
|
||||||
import androidx.compose.foundation.layout.wrapContentSize
|
|
||||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
|
||||||
import androidx.compose.foundation.text.BasicTextField
|
|
||||||
import androidx.compose.material3.Button
|
|
||||||
import androidx.compose.material3.ButtonColors
|
|
||||||
import androidx.compose.material3.ExperimentalMaterial3Api
|
|
||||||
import androidx.compose.material3.HorizontalDivider
|
|
||||||
import androidx.compose.material3.Icon
|
|
||||||
import androidx.compose.material3.IconButton
|
|
||||||
import androidx.compose.material3.Scaffold
|
|
||||||
import androidx.compose.material3.Text
|
|
||||||
import androidx.compose.material3.TextFieldDefaults
|
|
||||||
import androidx.compose.material3.TopAppBar
|
|
||||||
import androidx.compose.runtime.Composable
|
|
||||||
import androidx.compose.runtime.mutableStateOf
|
|
||||||
import androidx.compose.runtime.remember
|
|
||||||
import androidx.compose.ui.Alignment
|
|
||||||
import androidx.compose.ui.Modifier
|
|
||||||
import androidx.compose.ui.draw.clip
|
|
||||||
import androidx.compose.ui.graphics.Color
|
|
||||||
import androidx.compose.ui.res.painterResource
|
|
||||||
import androidx.compose.ui.res.stringResource
|
|
||||||
import androidx.compose.ui.text.input.VisualTransformation
|
|
||||||
import androidx.compose.ui.text.style.TextAlign
|
|
||||||
import androidx.compose.ui.tooling.preview.Preview
|
|
||||||
import androidx.compose.ui.unit.dp
|
|
||||||
import com.example.appwithwin.R
|
|
||||||
import com.example.appwithwin.ui.theme.MatuleTheme
|
|
||||||
import org.w3c.dom.Text
|
|
||||||
|
|
||||||
|
|
||||||
@Composable
|
|
||||||
fun SignInScreen(){
|
|
||||||
Scaffold(
|
|
||||||
topBar = {
|
|
||||||
Row(
|
|
||||||
modifier = Modifier
|
|
||||||
.padding(top = 35.dp)
|
|
||||||
.fillMaxWidth()
|
|
||||||
.height(40.dp)
|
|
||||||
){
|
|
||||||
IconButton(onClick = {}){
|
|
||||||
Icon(
|
|
||||||
painter = painterResource(R.drawable.back_arrow),
|
|
||||||
contentDescription = null)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
bottomBar = {
|
|
||||||
Row(
|
|
||||||
horizontalArrangement = Arrangement.Center,
|
|
||||||
verticalAlignment = Alignment.CenterVertically,
|
|
||||||
modifier = Modifier
|
|
||||||
.padding(bottom = 50.dp)
|
|
||||||
.fillMaxWidth()
|
|
||||||
.height(40.dp)
|
|
||||||
){
|
|
||||||
Text(
|
|
||||||
text = stringResource(R.string.sign_up),
|
|
||||||
style = MatuleTheme.typography.bodyRegular16.copy(color = MatuleTheme.colors.text),
|
|
||||||
textAlign = TextAlign.Center
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
){ paddingValues ->
|
|
||||||
SignInContent(paddingValues)
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Composable
|
|
||||||
fun SignInContent(paddingValues: PaddingValues){
|
|
||||||
Column(
|
|
||||||
modifier = Modifier.padding(paddingValues = paddingValues)
|
|
||||||
){
|
|
||||||
TitleWithSubtitleText(
|
|
||||||
title = stringResource(R.string.hello),
|
|
||||||
subTitle = stringResource(R.string.sign_in_subtitle)
|
|
||||||
)
|
|
||||||
val email = remember { mutableStateOf("") }
|
|
||||||
Spacer(modifier = Modifier.height(35.dp))
|
|
||||||
AuthTextFiled(
|
|
||||||
labelText = stringResource(R.string.email),
|
|
||||||
placeHolderText = stringResource(R.string.template_email),
|
|
||||||
value = email.value,
|
|
||||||
onValueChange = {
|
|
||||||
email.value = it
|
|
||||||
}
|
|
||||||
)
|
|
||||||
CommonButton(
|
|
||||||
modifier = Modifier.padding(top = 50.dp),
|
|
||||||
buttonLabel = stringResource(R.string.sign_in)
|
|
||||||
){
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Composable
|
|
||||||
fun TitleWithSubtitleText(title: String, subTitle: String){
|
|
||||||
Column (
|
|
||||||
modifier = Modifier.padding(horizontal = 20.dp),
|
|
||||||
horizontalAlignment = Alignment.CenterHorizontally,
|
|
||||||
verticalArrangement = Arrangement.Center
|
|
||||||
){
|
|
||||||
Text(
|
|
||||||
text = title,
|
|
||||||
style = MatuleTheme.typography.headingBold32.copy(color = MatuleTheme.colors.text),
|
|
||||||
textAlign = TextAlign.Center
|
|
||||||
)
|
|
||||||
Text(
|
|
||||||
text = subTitle,
|
|
||||||
maxLines = 2,
|
|
||||||
style = MatuleTheme.typography.subTitleRegular16.copy(color = MatuleTheme.colors.subTextDark),
|
|
||||||
textAlign = TextAlign.Center
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@OptIn(ExperimentalMaterial3Api::class)
|
|
||||||
@Composable
|
|
||||||
fun AuthTextFiled(value: String, onValueChange: (String) -> Unit, placeHolderText: String? = null, labelText: String? = null){
|
|
||||||
Column (
|
|
||||||
modifier = Modifier
|
|
||||||
.padding(horizontal = 20.dp)
|
|
||||||
.wrapContentSize(),
|
|
||||||
verticalArrangement = Arrangement.spacedBy(12.dp)
|
|
||||||
){
|
|
||||||
if (labelText != null){
|
|
||||||
Text(
|
|
||||||
text = labelText,
|
|
||||||
style = MatuleTheme.typography.bodyRegular16.copy(MatuleTheme.colors.text),
|
|
||||||
textAlign = TextAlign.Right
|
|
||||||
)
|
|
||||||
}
|
|
||||||
val interaction = remember { MutableInteractionSource() }
|
|
||||||
BasicTextField(
|
|
||||||
value = value,
|
|
||||||
onValueChange = { onValueChange(it) },
|
|
||||||
modifier = Modifier
|
|
||||||
.fillMaxWidth()
|
|
||||||
.clip(RoundedCornerShape(14.dp))
|
|
||||||
.background(MatuleTheme.colors.background)
|
|
||||||
){
|
|
||||||
innerTextField ->
|
|
||||||
TextFieldDefaults.DecorationBox(
|
|
||||||
value = value,
|
|
||||||
singleLine = true,
|
|
||||||
innerTextField = innerTextField,
|
|
||||||
enabled = true,
|
|
||||||
visualTransformation = VisualTransformation.None,
|
|
||||||
interactionSource = interaction,
|
|
||||||
colors = TextFieldDefaults.colors(
|
|
||||||
focusedContainerColor = MatuleTheme.colors.background,
|
|
||||||
disabledContainerColor = MatuleTheme.colors.background,
|
|
||||||
unfocusedContainerColor = MatuleTheme.colors.background,
|
|
||||||
errorContainerColor = MatuleTheme.colors.background,
|
|
||||||
unfocusedIndicatorColor = Color.Transparent,
|
|
||||||
focusedIndicatorColor = Color.Transparent,
|
|
||||||
disabledIndicatorColor = Color.Transparent,
|
|
||||||
errorIndicatorColor = Color.Transparent
|
|
||||||
),
|
|
||||||
placeholder = {
|
|
||||||
if (placeHolderText != null)
|
|
||||||
Text(
|
|
||||||
text = placeHolderText,
|
|
||||||
style = MatuleTheme.typography.bodyRegular14.copy(color = MatuleTheme.colors.hint)
|
|
||||||
)
|
|
||||||
}
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Composable
|
|
||||||
fun CommonButton(modifier: Modifier, buttonLabel: String, onClick: ()-> Unit){
|
|
||||||
Button(
|
|
||||||
modifier = modifier
|
|
||||||
.padding(horizontal = 20.dp)
|
|
||||||
.fillMaxWidth()
|
|
||||||
.height(50.dp)
|
|
||||||
.clip(RoundedCornerShape(14.dp))
|
|
||||||
.background(MatuleTheme.colors.accent)
|
|
||||||
,
|
|
||||||
colors = ButtonColors(
|
|
||||||
containerColor = MatuleTheme.colors.accent,
|
|
||||||
disabledContentColor = Color.Transparent,
|
|
||||||
disabledContainerColor = MatuleTheme.colors.accent,
|
|
||||||
contentColor = Color.Transparent
|
|
||||||
),
|
|
||||||
onClick = onClick
|
|
||||||
){
|
|
||||||
Text(
|
|
||||||
text = buttonLabel,
|
|
||||||
style = MatuleTheme.typography.bodyRegular14.copy(color = MatuleTheme.colors.background),
|
|
||||||
textAlign = TextAlign.Center
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
@ -9,97 +9,50 @@ import androidx.compose.material3.dynamicDarkColorScheme
|
|||||||
import androidx.compose.material3.dynamicLightColorScheme
|
import androidx.compose.material3.dynamicLightColorScheme
|
||||||
import androidx.compose.material3.lightColorScheme
|
import androidx.compose.material3.lightColorScheme
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.runtime.CompositionLocalProvider
|
|
||||||
import androidx.compose.runtime.Immutable
|
|
||||||
import androidx.compose.runtime.staticCompositionLocalOf
|
|
||||||
import androidx.compose.ui.graphics.Color
|
|
||||||
import androidx.compose.ui.platform.LocalContext
|
import androidx.compose.ui.platform.LocalContext
|
||||||
import androidx.compose.ui.text.TextStyle
|
|
||||||
import androidx.compose.ui.text.font.Font
|
|
||||||
import androidx.compose.ui.text.font.FontFamily
|
|
||||||
import androidx.compose.ui.text.font.FontWeight
|
|
||||||
import androidx.compose.ui.unit.sp
|
|
||||||
import com.example.appwithwin.R
|
|
||||||
|
|
||||||
|
private val DarkColorScheme = darkColorScheme(
|
||||||
@Immutable
|
primary = Purple80,
|
||||||
data class MatuleColors(
|
secondary = PurpleGrey80,
|
||||||
val block: Color,
|
tertiary = Pink80
|
||||||
val text: Color,
|
|
||||||
val subTextDark: Color,
|
|
||||||
val background:Color,
|
|
||||||
val hint: Color,
|
|
||||||
val accent: Color
|
|
||||||
)
|
)
|
||||||
|
|
||||||
@Immutable
|
private val LightColorScheme = lightColorScheme(
|
||||||
data class MatuleTextStyle(
|
primary = Purple40,
|
||||||
val headingBold32: TextStyle,
|
secondary = PurpleGrey40,
|
||||||
val subTitleRegular16: TextStyle,
|
tertiary = Pink40
|
||||||
val bodyRegular16: TextStyle,
|
|
||||||
val bodyRegular14: TextStyle,
|
|
||||||
val bodyRegular12: TextStyle,
|
|
||||||
)
|
|
||||||
|
|
||||||
val LocalMatuleTypography = staticCompositionLocalOf {
|
/* Other default colors to override
|
||||||
MatuleTextStyle(
|
background = Color(0xFFFFFBFE),
|
||||||
headingBold32 = TextStyle.Default,
|
surface = Color(0xFFFFFBFE),
|
||||||
subTitleRegular16 = TextStyle.Default,
|
onPrimary = Color.White,
|
||||||
bodyRegular12 = TextStyle.Default,
|
onSecondary = Color.White,
|
||||||
bodyRegular16 = TextStyle.Default,
|
onTertiary = Color.White,
|
||||||
bodyRegular14 = TextStyle.Default
|
onBackground = Color(0xFF1C1B1F),
|
||||||
)
|
onSurface = Color(0xFF1C1B1F),
|
||||||
}
|
*/
|
||||||
|
|
||||||
val LocalMatuleColors = staticCompositionLocalOf {
|
|
||||||
MatuleColors(
|
|
||||||
block = Color.Unspecified,
|
|
||||||
text = Color.Unspecified,
|
|
||||||
subTextDark = Color.Unspecified,
|
|
||||||
background = Color.Unspecified,
|
|
||||||
hint = Color.Unspecified,
|
|
||||||
accent = Color.Unspecified
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
val matuleFontFamily = FontFamily(
|
|
||||||
Font(R.font.roboto_serif, FontWeight.Normal),
|
|
||||||
Font(R.font.roboto_serif_bold, FontWeight.Bold),
|
|
||||||
Font(R.font.roboto_serif_black, FontWeight.Black),
|
|
||||||
Font(R.font.roboto_serif_medium, FontWeight.Medium),
|
|
||||||
Font(R.font.roboto_serif_extrabold, FontWeight.ExtraBold),
|
|
||||||
Font(R.font.roboto_serif_semibold, FontWeight.SemiBold),
|
|
||||||
)
|
)
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
fun MatuleTheme( content: @Composable () -> Unit){
|
fun AppWithWinTheme(
|
||||||
val matuleColors = MatuleColors(
|
darkTheme: Boolean = isSystemInDarkTheme(),
|
||||||
block = Color(0xFFFFFFFF),
|
// Dynamic color is available on Android 12+
|
||||||
text = Color(0xFF2B2B2B),
|
dynamicColor: Boolean = true,
|
||||||
subTextDark = Color(0xFF707B81),
|
content: @Composable () -> Unit
|
||||||
background = Color(0xFFF7F7F9),
|
) {
|
||||||
hint = Color(0xFF6A6A6A),
|
val colorScheme = when {
|
||||||
accent = Color(0xFF48B2E7)
|
dynamicColor && Build.VERSION.SDK_INT >= Build.VERSION_CODES.S -> {
|
||||||
)
|
val context = LocalContext.current
|
||||||
val matuleTypography = MatuleTextStyle(
|
if (darkTheme) dynamicDarkColorScheme(context) else dynamicLightColorScheme(context)
|
||||||
headingBold32 = TextStyle(fontFamily = matuleFontFamily, fontWeight = FontWeight.Bold, fontSize = 32.sp),
|
}
|
||||||
subTitleRegular16 = TextStyle(fontFamily = matuleFontFamily, fontWeight = FontWeight.Normal, fontSize = 16.sp),
|
|
||||||
bodyRegular16 = TextStyle(fontFamily = matuleFontFamily, fontWeight = FontWeight.Normal, fontSize = 16.sp),
|
darkTheme -> DarkColorScheme
|
||||||
bodyRegular14 = TextStyle(fontFamily = matuleFontFamily, fontWeight = FontWeight.Normal, fontSize = 14.sp),
|
else -> LightColorScheme
|
||||||
bodyRegular12 = TextStyle(fontFamily = matuleFontFamily, fontWeight = FontWeight.Normal, fontSize = 12.sp),
|
}
|
||||||
)
|
|
||||||
CompositionLocalProvider(
|
MaterialTheme(
|
||||||
LocalMatuleColors provides matuleColors,
|
colorScheme = colorScheme,
|
||||||
LocalMatuleTypography provides matuleTypography,
|
typography = Typography,
|
||||||
content = content
|
content = content
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
object MatuleTheme{
|
|
||||||
val colors: MatuleColors
|
|
||||||
@Composable
|
|
||||||
get() = LocalMatuleColors.current
|
|
||||||
val typography
|
|
||||||
@Composable
|
|
||||||
get() = LocalMatuleTypography.current
|
|
||||||
}
|
|
@ -1,10 +0,0 @@
|
|||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:width="6dp"
|
|
||||||
android:height="12dp"
|
|
||||||
android:viewportWidth="6"
|
|
||||||
android:viewportHeight="12">
|
|
||||||
<path
|
|
||||||
android:pathData="M5.468,0.414C5.792,0.673 5.844,1.145 5.586,1.468L1.96,6L5.586,10.531C5.844,10.855 5.792,11.327 5.468,11.586C5.145,11.844 4.673,11.792 4.414,11.469L0.414,6.468C0.195,6.195 0.195,5.805 0.414,5.531L4.414,0.531C4.673,0.208 5.145,0.156 5.468,0.414Z"
|
|
||||||
android:fillColor="#2B2B2B"
|
|
||||||
android:fillType="evenOdd"/>
|
|
||||||
</vector>
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,17 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<resources>
|
|
||||||
<array name="com_google_android_gms_fonts_certs">
|
|
||||||
<item>@array/com_google_android_gms_fonts_certs_dev</item>
|
|
||||||
<item>@array/com_google_android_gms_fonts_certs_prod</item>
|
|
||||||
</array>
|
|
||||||
<string-array name="com_google_android_gms_fonts_certs_dev">
|
|
||||||
<item>
|
|
||||||
MIIEqDCCA5CgAwIBAgIJANWFuGx90071MA0GCSqGSIb3DQEBBAUAMIGUMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEQMA4GA1UEChMHQW5kcm9pZDEQMA4GA1UECxMHQW5kcm9pZDEQMA4GA1UEAxMHQW5kcm9pZDEiMCAGCSqGSIb3DQEJARYTYW5kcm9pZEBhbmRyb2lkLmNvbTAeFw0wODA0MTUyMzM2NTZaFw0zNTA5MDEyMzM2NTZaMIGUMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEQMA4GA1UEChMHQW5kcm9pZDEQMA4GA1UECxMHQW5kcm9pZDEQMA4GA1UEAxMHQW5kcm9pZDEiMCAGCSqGSIb3DQEJARYTYW5kcm9pZEBhbmRyb2lkLmNvbTCCASAwDQYJKoZIhvcNAQEBBQADggENADCCAQgCggEBANbOLggKv+IxTdGNs8/TGFy0PTP6DHThvbbR24kT9ixcOd9W+EaBPWW+wPPKQmsHxajtWjmQwWfna8mZuSeJS48LIgAZlKkpFeVyxW0qMBujb8X8ETrWy550NaFtI6t9+u7hZeTfHwqNvacKhp1RbE6dBRGWynwMVX8XW8N1+UjFaq6GCJukT4qmpN2afb8sCjUigq0GuMwYXrFVee74bQgLHWGJwPmvmLHC69EH6kWr22ijx4OKXlSIx2xT1AsSHee70w5iDBiK4aph27yH3TxkXy9V89TDdexAcKk/cVHYNnDBapcavl7y0RiQ4biu8ymM8Ga/nmzhRKya6G0cGw8CAQOjgfwwgfkwHQYDVR0OBBYEFI0cxb6VTEM8YYY6FbBMvAPyT+CyMIHJBgNVHSMEgcEwgb6AFI0cxb6VTEM8YYY6FbBMvAPyT+CyoYGapIGXMIGUMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEQMA4GA1UEChMHQW5kcm9pZDEQMA4GA1UECxMHQW5kcm9pZDEQMA4GA1UEAxMHQW5kcm9pZDEiMCAGCSqGSIb3DQEJARYTYW5kcm9pZEBhbmRyb2lkLmNvbYIJANWFuGx90071MAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEEBQADggEBABnTDPEF+3iSP0wNfdIjIz1AlnrPzgAIHVvXxunW7SBrDhEglQZBbKJEk5kT0mtKoOD1JMrSu1xuTKEBahWRbqHsXclaXjoBADb0kkjVEJu/Lh5hgYZnOjvlba8Ld7HCKePCVePoTJBdI4fvugnL8TsgK05aIskyY0hKI9L8KfqfGTl1lzOv2KoWD0KWwtAWPoGChZxmQ+nBli+gwYMzM1vAkP+aayLe0a1EQimlOalO762r0GXO0ks+UeXde2Z4e+8S/pf7pITEI/tP+MxJTALw9QUWEv9lKTk+jkbqxbsh8nfBUapfKqYn0eidpwq2AzVp3juYl7//fKnaPhJD9gs=
|
|
||||||
</item>
|
|
||||||
</string-array>
|
|
||||||
<string-array name="com_google_android_gms_fonts_certs_prod">
|
|
||||||
<item>
|
|
||||||
MIIEQzCCAyugAwIBAgIJAMLgh0ZkSjCNMA0GCSqGSIb3DQEBBAUAMHQxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtHb29nbGUgSW5jLjEQMA4GA1UECxMHQW5kcm9pZDEQMA4GA1UEAxMHQW5kcm9pZDAeFw0wODA4MjEyMzEzMzRaFw0zNjAxMDcyMzEzMzRaMHQxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtHb29nbGUgSW5jLjEQMA4GA1UECxMHQW5kcm9pZDEQMA4GA1UEAxMHQW5kcm9pZDCCASAwDQYJKoZIhvcNAQEBBQADggENADCCAQgCggEBAKtWLgDYO6IIrgqWbxJOKdoR8qtW0I9Y4sypEwPpt1TTcvZApxsdyxMJZ2JORland2qSGT2y5b+3JKkedxiLDmpHpDsz2WCbdxgxRczfey5YZnTJ4VZbH0xqWVW/8lGmPav5xVwnIiJS6HXk+BVKZF+JcWjAsb/GEuq/eFdpuzSqeYTcfi6idkyugwfYwXFU1+5fZKUaRKYCwkkFQVfcAs1fXA5V+++FGfvjJ/CxURaSxaBvGdGDhfXE28LWuT9ozCl5xw4Yq5OGazvV24mZVSoOO0yZ31j7kYvtwYK6NeADwbSxDdJEqO4k//0zOHKrUiGYXtqw/A0LFFtqoZKFjnkCAQOjgdkwgdYwHQYDVR0OBBYEFMd9jMIhF1Ylmn/Tgt9r45jk14alMIGmBgNVHSMEgZ4wgZuAFMd9jMIhF1Ylmn/Tgt9r45jk14aloXikdjB0MQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEUMBIGA1UEChMLR29vZ2xlIEluYy4xEDAOBgNVBAsTB0FuZHJvaWQxEDAOBgNVBAMTB0FuZHJvaWSCCQDC4IdGZEowjTAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBAUAA4IBAQBt0lLO74UwLDYKqs6Tm8/yzKkEu116FmH4rkaymUIE0P9KaMftGlMexFlaYjzmB2OxZyl6euNXEsQH8gjwyxCUKRJNexBiGcCEyj6z+a1fuHHvkiaai+KL8W1EyNmgjmyy8AW7P+LLlkR+ho5zEHatRbM/YAnqGcFh5iZBqpknHf1SKMXFh4dd239FJ1jWYfbMDMy3NS5CTMQ2XFI1MvcyUTdZPErjQfTbQe3aDQsQcafEQPD+nqActifKZ0Np0IS9L9kR/wbNvyz6ENwPiTrjV2KRkEjH78ZMcUQXg0L3BYHJ3lc69Vs5Ddf9uUGGMYldX3WfMBEmh/9iFBDAaTCK
|
|
||||||
</item>
|
|
||||||
</string-array>
|
|
||||||
</resources>
|
|
@ -1,9 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<resources>
|
|
||||||
<array name="preloaded_fonts" translatable="false">
|
|
||||||
<item>@font/roboto_mono_semibold</item>
|
|
||||||
<item>@font/roboto_serif_bold</item>
|
|
||||||
<item>@font/roboto_serif_extrabold</item>
|
|
||||||
<item>@font/roboto_serif_medium</item>
|
|
||||||
</array>
|
|
||||||
</resources>
|
|
@ -1,9 +1,3 @@
|
|||||||
<resources>
|
<resources>
|
||||||
<string name="app_name">AppWithWin</string>
|
<string name="app_name">AppWithWin</string>
|
||||||
<string name="hello">Привет</string>
|
|
||||||
<string name="sign_in_subtitle">Заполните Свои данные или продолжите через социальные медиа</string>
|
|
||||||
<string name="template_email">xyz@gmail.com</string>
|
|
||||||
<string name="email">Email</string>
|
|
||||||
<string name="sign_in">Войти</string>
|
|
||||||
<string name="sign_up">Вы впервые? Создать пользователя</string>
|
|
||||||
</resources>
|
</resources>
|
Loading…
Reference in New Issue
Block a user