Forráskód Böngészése

add fonts and colors

Иван 1 hete
szülő
commit
163331d87d

+ 3 - 0
Docs/~$ЗРАБОТКА МАКЕТА МОБИЛЬНОГО ПРИЛОЖЕНИЯ.docx

@@ -0,0 +1,3 @@
+ָגאם20=מ¨�ף
(WX,+”�”—Jpjץ
+‏7WSטd
+­µ0}­[-›	%b°ב}oֱ¬#«9�f´�סמEַ._;ג׀׃)נ£\�5-T;ו	ְj����(T;´ר�j

+ 11 - 3
Project/app/src/main/java/com/example/mygymapp/view/mainActivity/components/StartScreen.kt

@@ -1,5 +1,6 @@
 package com.example.mygymapp.view.mainActivity.components
 
+import androidx.compose.foundation.background
 import androidx.compose.foundation.layout.Arrangement
 import androidx.compose.foundation.layout.Column
 import androidx.compose.foundation.layout.padding
@@ -8,21 +9,28 @@ import androidx.compose.runtime.Composable
 import androidx.compose.ui.Alignment
 import androidx.compose.ui.Modifier
 import androidx.compose.ui.graphics.Color
+import androidx.compose.ui.tooling.preview.Preview
 import androidx.compose.ui.unit.dp
 import androidx.compose.ui.unit.sp
 import androidx.navigation.NavController
+import com.example.mygymapp.ui.theme.BlueBlack
+import com.example.mygymapp.ui.theme.chivoFontFamily
 
+@Preview
 @Composable
 fun StartScreen()
 {
     Column(
-        Modifier.padding(top = 30.dp, start = 15.dp, end = 15.dp),
+        Modifier
+            .background(color = BlueBlack)
+            .padding(top = 30.dp, start = 15.dp, end = 15.dp),
         verticalArrangement = Arrangement.Top,
-        horizontalAlignment = Alignment.CenterHorizontally
+        horizontalAlignment = Alignment.CenterHorizontally,
 
     ) {
         Text(
-            text = "MyGym", fontSize = 30.sp, color = Color(0xFF000000),
+            text = "MyGym", fontSize = 30.sp, color = Color(0xFFFefcfb),
+            fontFamily = chivoFontFamily,
             modifier = Modifier.padding(top = 100.dp, bottom = 20.dp, start = 15.dp)
         )
     }

+ 5 - 1
Project/app/src/main/java/com/example/mygymapp/view/ui/theme/Color.kt

@@ -8,4 +8,8 @@ val Pink80 = Color(0xFFEFB8C8)
 
 val Purple40 = Color(0xFF6650a4)
 val PurpleGrey40 = Color(0xFF625b71)
-val Pink40 = Color(0xFF7D5260)
+val Pink40 = Color(0xFF7D5260)
+
+val BlueDark = Color(0xFF0a1128)
+val BlueBlack = Color(0xFF3A506B)
+val Pearl = Color(0xFF5BC0BE)

+ 6 - 0
Project/app/src/main/java/com/example/mygymapp/view/ui/theme/Type.kt

@@ -2,9 +2,11 @@ package com.example.mygymapp.ui.theme
 
 import androidx.compose.material3.Typography
 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.mygymapp.R
 
 // Set of Material typography styles to start with
 val Typography = Typography(
@@ -31,4 +33,8 @@ val Typography = Typography(
         letterSpacing = 0.5.sp
     )
     */
+)
+
+val chivoFontFamily = FontFamily(
+    Font(R.font.chivo_bold)
 )

BIN
Project/app/src/main/res/font/chivo_bold.otf


BIN
Project/app/src/main/res/font/chivo_regular.otf


+ 6 - 0
Project/app/src/main/res/xml/fonts.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<font-family xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto">
+    <font app:fontStyle="normal" app:fontWeight="400" app:font="@font/chivo_regular"/>
+    <font app:fontStyle="normal" app:fontWeight="700" app:font="@font/chivo_bold"/>
+</font-family>