11package com.sysadmindoc.callshield.ui.screens.activity
22
33import androidx.compose.foundation.background
4+ import androidx.compose.foundation.border
45import androidx.compose.foundation.layout.Box
56import androidx.compose.foundation.layout.Column
67import androidx.compose.foundation.layout.Row
78import androidx.compose.foundation.layout.RowScope
8- import androidx.compose.foundation.layout.Spacer
99import androidx.compose.foundation.layout.fillMaxSize
1010import androidx.compose.foundation.layout.fillMaxWidth
1111import androidx.compose.foundation.layout.height
12- import androidx.compose.foundation.layout.width
12+ import androidx.compose.foundation.layout.padding
13+ import androidx.compose.foundation.shape.RoundedCornerShape
1314import androidx.compose.material3.MaterialTheme
1415import androidx.compose.material3.Tab
1516import androidx.compose.material3.Text
@@ -21,9 +22,7 @@ import androidx.compose.runtime.mutableStateOf
2122import androidx.compose.runtime.saveable.rememberSaveable
2223import androidx.compose.runtime.saveable.rememberSaveableStateHolder
2324import androidx.compose.runtime.setValue
24- import androidx.compose.ui.Alignment
2525import androidx.compose.ui.Modifier
26- import androidx.compose.ui.graphics.Color
2726import androidx.compose.ui.res.stringResource
2827import androidx.compose.ui.text.font.FontWeight
2928import androidx.compose.ui.unit.dp
@@ -33,6 +32,7 @@ import com.sysadmindoc.callshield.ui.screens.main.BlockedLogScreen
3332import com.sysadmindoc.callshield.ui.screens.recent.RecentCallsScreen
3433import com.sysadmindoc.callshield.ui.theme.Black
3534import com.sysadmindoc.callshield.ui.theme.CatGreen
35+ import com.sysadmindoc.callshield.ui.theme.CatOverlay
3636import com.sysadmindoc.callshield.ui.theme.CatSubtext
3737
3838/* *
@@ -57,7 +57,13 @@ fun ActivityScreen(
5757 val stateHolder = rememberSaveableStateHolder()
5858
5959 Column (modifier = Modifier .fillMaxSize().background(Black )) {
60- Row (modifier = Modifier .fillMaxWidth()) {
60+ Text (
61+ stringResource(R .string.activity_intro),
62+ modifier = Modifier .padding(horizontal = 20 .dp, vertical = 6 .dp),
63+ style = MaterialTheme .typography.bodyMedium,
64+ color = CatSubtext ,
65+ )
66+ Row (modifier = Modifier .fillMaxWidth().padding(horizontal = 16 .dp, vertical = 8 .dp)) {
6167 ActivityTab (
6268 selected = selectedView == ACTIVITY_RECENT ,
6369 label = stringResource(R .string.activity_tab_recent),
@@ -90,25 +96,21 @@ internal fun RowScope.ActivityTab(
9096 Tab (
9197 selected = selected,
9298 onClick = onClick,
93- modifier = Modifier .weight(1f ).height(56 .dp),
94- selectedContentColor = CatGreen ,
99+ modifier =
100+ Modifier
101+ .weight(1f )
102+ .padding(horizontal = 4 .dp)
103+ .height(48 .dp)
104+ .background(if (selected) CatGreen else MaterialTheme .colorScheme.surfaceContainerLow, RoundedCornerShape (24 .dp))
105+ .border(1 .dp, if (selected) CatGreen else CatOverlay .copy(alpha = 0.35f ), RoundedCornerShape (24 .dp)),
106+ selectedContentColor = Black ,
95107 unselectedContentColor = CatSubtext ,
96108 text = {
97- Column (horizontalAlignment = Alignment .CenterHorizontally ) {
98- Text (
99- text = label,
100- style = MaterialTheme .typography.titleSmall,
101- fontWeight = if (selected) FontWeight .SemiBold else FontWeight .Medium ,
102- )
103- Spacer (Modifier .height(5 .dp))
104- Box (
105- modifier =
106- Modifier
107- .width(72 .dp)
108- .height(2 .dp)
109- .background(if (selected) CatGreen else Color .Transparent ),
110- )
111- }
109+ Text (
110+ text = label,
111+ style = MaterialTheme .typography.titleSmall,
112+ fontWeight = if (selected) FontWeight .SemiBold else FontWeight .Medium ,
113+ )
112114 },
113115 )
114116}
0 commit comments