Skip to content

Commit 40eb354

Browse files
authored
Create Settings module (#108)
1 parent 77cdcdf commit 40eb354

File tree

17 files changed

+73
-3
lines changed

17 files changed

+73
-3
lines changed

core/src/main/java/com/zigis/paleontologas/core/ui/NavigableScaffold.kt

+5-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import androidx.compose.foundation.background
77
import androidx.compose.foundation.layout.Box
88
import androidx.compose.foundation.layout.BoxScope
99
import androidx.compose.foundation.layout.Column
10+
import androidx.compose.foundation.layout.WindowInsets
1011
import androidx.compose.foundation.layout.fillMaxSize
1112
import androidx.compose.foundation.layout.fillMaxWidth
1213
import androidx.compose.foundation.layout.padding
@@ -25,6 +26,7 @@ import androidx.compose.ui.graphics.Color
2526
import androidx.compose.ui.input.nestedscroll.nestedScroll
2627
import androidx.compose.ui.res.painterResource
2728
import androidx.compose.ui.tooling.preview.Preview
29+
import androidx.compose.ui.unit.dp
2830
import com.zigis.paleontologas.core.R
2931
import com.zigis.paleontologas.core.ui.theme.ApplicationTheme
3032

@@ -79,8 +81,10 @@ fun NavigableScaffold(
7981
}
8082
},
8183
colors = TopAppBarDefaults.topAppBarColors(
82-
containerColor = Color.Transparent
84+
containerColor = Color.Transparent,
85+
scrolledContainerColor = Color.Transparent
8386
),
87+
windowInsets = WindowInsets(top = 0.dp, bottom = 0.dp),
8488
scrollBehavior = scrollBehavior
8589
)
8690

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
2+
android:width="682.67dp"
3+
android:height="682.67dp"
4+
android:viewportWidth="682.67"
5+
android:viewportHeight="682.67">
6+
<group>
7+
<clip-path
8+
android:pathData="M0,0L682.67,0L682.67,682.67L0,682.67Z"/>
9+
<path
10+
android:pathData="m405.6,92.38c23.57,6.08 45.84,15.42 66.29,27.52 0,-0 9.85,-9.85 20.92,-20.92 8.03,-8.04 18.94,-12.55 30.3,-12.55 11.35,-0 22.26,4.51 30.29,12.55 9.75,9.75 20.54,20.54 30.29,30.29 8.04,8.03 12.55,18.94 12.55,30.29 0,11.37 -4.51,22.27 -12.55,30.3 -11.07,11.07 -20.92,20.92 -20.92,20.92 12.09,20.45 21.43,42.72 27.52,66.29l29.53,-0c23.66,-0 42.85,19.18 42.85,42.84l0,42.85c0,23.66 -19.18,42.84 -42.85,42.84l-29.53,-0c-6.09,23.57 -15.43,45.84 -27.52,66.29 0,-0 9.85,9.85 20.92,20.92 8.04,8.03 12.55,18.94 12.55,30.3 0,11.35 -4.51,22.26 -12.55,30.29 -9.75,9.75 -20.54,20.54 -30.29,30.29 -8.03,8.04 -18.94,12.55 -30.29,12.55 -11.37,-0 -22.27,-4.51 -30.3,-12.55C481.74,572.63 471.89,562.78 471.89,562.78 451.44,574.87 429.17,584.21 405.6,590.29l0,29.53c0,23.66 -19.18,42.85 -42.85,42.85l-42.84,-0c-23.66,-0 -42.84,-19.18 -42.84,-42.85l0,-29.53c-23.57,-6.08 -45.84,-15.42 -66.29,-27.52 0,-0 -9.85,9.85 -20.92,20.92 -8.03,8.04 -18.94,12.55 -30.3,12.55 -11.35,-0 -22.26,-4.51 -30.29,-12.55 -9.75,-9.75 -20.54,-20.54 -30.29,-30.29 -8.04,-8.03 -12.55,-18.94 -12.55,-30.29 0,-11.37 4.51,-22.27 12.55,-30.3 11.07,-11.06 20.92,-20.92 20.92,-20.92 -12.09,-20.45 -21.43,-42.72 -27.52,-66.29l-29.53,-0c-23.66,-0 -42.85,-19.18 -42.85,-42.84l0,-42.85c0,-23.66 19.18,-42.84 42.85,-42.84l29.53,-0c6.09,-23.58 15.42,-45.84 27.52,-66.29 0,-0 -9.85,-9.85 -20.92,-20.92 -8.04,-8.03 -12.55,-18.94 -12.55,-30.3 0,-11.35 4.51,-22.26 12.55,-30.29 9.75,-9.75 20.55,-20.54 30.29,-30.29 8.03,-8.04 18.94,-12.55 30.29,-12.55 11.36,-0 22.27,4.51 30.3,12.55 11.07,11.07 20.92,20.92 20.92,20.92 20.45,-12.09 42.72,-21.43 66.29,-27.52l0,-29.53c0,-23.66 19.18,-42.84 42.84,-42.84l42.84,-0C386.42,20 405.6,39.18 405.6,62.84Z"
11+
android:strokeLineJoin="round"
12+
android:strokeWidth="40"
13+
android:fillColor="#00000000"
14+
android:strokeColor="#000000"
15+
android:strokeLineCap="round"/>
16+
<path
17+
android:pathData="m341.33,212.8c70.94,-0 128.53,57.59 128.53,128.53 0,70.94 -57.59,128.53 -128.53,128.53 -70.94,-0 -128.53,-57.59 -128.53,-128.53C212.8,270.39 270.39,212.8 341.33,212.8Z"
18+
android:strokeLineJoin="round"
19+
android:strokeWidth="40"
20+
android:fillColor="#00000000"
21+
android:strokeColor="#000000"
22+
android:strokeLineCap="round"/>
23+
</group>
24+
</vector>

features/main/src/main/java/com/zigis/paleontologas/features/main/stories/main/MainBottomNavigationBar.kt

+1-2
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ fun MainBottomNavigationBar(
3030
var selectedItem by remember { mutableIntStateOf(0) }
3131

3232
AnimatedNavigationBar(
33-
modifier = modifier
34-
.height(85.dp),
33+
modifier = modifier.height(85.dp),
3534
selectedIndex = selectedItem,
3635
barBrush = Brush.linearGradient(
3736
colors = listOf(

features/main/src/main/res/values-de/strings.xml

+1
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,6 @@
4646

4747
<string name="info">Info</string>
4848
<string name="language">Sprache</string>
49+
<string name="settings">Einstellungen</string>
4950

5051
</resources>

features/main/src/main/res/values-es/strings.xml

+1
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,6 @@
4646

4747
<string name="info">Información</string>
4848
<string name="language">Idioma</string>
49+
<string name="settings">Ajustes</string>
4950

5051
</resources>

features/main/src/main/res/values-fr/strings.xml

+1
Original file line numberDiff line numberDiff line change
@@ -47,5 +47,6 @@
4747

4848
<string name="info">Info</string>
4949
<string name="language">Langue</string>
50+
<string name="settings">Paramètres</string>
5051

5152
</resources>

features/main/src/main/res/values-it/strings.xml

+1
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747

4848
<string name="info">Informazioni</string>
4949
<string name="language">Linguaggio</string>
50+
<string name="settings">Impostazioni</string>
5051

5152
</resources>
5253

features/main/src/main/res/values-lt/strings.xml

+1
Original file line numberDiff line numberDiff line change
@@ -47,5 +47,6 @@
4747

4848
<string name="info">Info</string>
4949
<string name="language">Kalba</string>
50+
<string name="settings">Nustatymai</string>
5051

5152
</resources>

features/main/src/main/res/values-pt-rBR/strings.xml

+1
Original file line numberDiff line numberDiff line change
@@ -47,5 +47,6 @@
4747

4848
<string name="info">Info</string>
4949
<string name="language">Idioma</string>
50+
<string name="settings">Configurações</string>
5051

5152
</resources>

features/main/src/main/res/values-sl/strings.xml

+1
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747

4848
<string name="info">Informacije</string>
4949
<string name="language">Jezik</string>
50+
<string name="settings">Nastavitve</string>
5051

5152
</resources>
5253

features/main/src/main/res/values/strings.xml

+1
Original file line numberDiff line numberDiff line change
@@ -47,5 +47,6 @@
4747

4848
<string name="info">Info</string>
4949
<string name="language">Language</string>
50+
<string name="settings">Settings</string>
5051

5152
</resources>

features/settings/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build

features/settings/build.gradle

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
apply from: "$rootProject.projectDir/shared.build.gradle"
2+
3+
android {
4+
namespace 'com.zigis.paleontologas.features.settings'
5+
}
6+
7+
dependencies {
8+
ksp "androidx.room:room-compiler:$room_version"
9+
10+
implementation project(':core')
11+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
package com.zigis.paleontologas.features.settings
2+
3+
/**
4+
* Instrumented test, which will execute on an Android device.
5+
*
6+
* See [testing documentation](http://d.android.com/tools/testing).
7+
*/
8+
class ExampleInstrumentedTest {
9+
10+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest />
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
package com.zigis.paleontologas.features.settings
2+
3+
/**
4+
* Example local unit test, which will execute on the development machine (host).
5+
*
6+
* See [testing documentation](http://d.android.com/tools/testing).
7+
*/
8+
class ExampleUnitTest {
9+
10+
}

settings.gradle

+1
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ include ':features:quiz'
44
include ':features:library'
55
include ':features:main'
66
include ':features:launcher'
7+
include ':features:settings'

0 commit comments

Comments
 (0)