Skip to content

Commit

Permalink
[FEAT/#15] MyPageTopAppBar 구현
Browse files Browse the repository at this point in the history
  • Loading branch information
arinming committed Jul 6, 2024
1 parent 224a7f3 commit 3b15164
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
package com.terning.feature.component.topappbar

import androidx.compose.foundation.layout.Row
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.Icon
import androidx.compose.material3.IconButton
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.style.TextAlign
import com.terning.core.designsystem.theme.TerningTypography
import com.terning.feature.R

@Composable
fun MyPageTopAppBar() {
TerningTopAppBar(
showBackButton = false,
customActions = listOf(
{},
{
Row(
verticalAlignment = Alignment.CenterVertically
) {
Text(
text = "프로필 수정",
style = TerningTypography().button3,
textAlign = TextAlign.Center
)
IconButton(onClick = {
}) {
Icon(
painter = painterResource(id = R.drawable.ic_20_right),
contentDescription = stringResource(id = R.string.ic_20_right)
)
}
}
}
)
)
}
3 changes: 2 additions & 1 deletion feature/src/main/java/com/terning/feature/main/MainScreen.kt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import com.terning.core.designsystem.theme.White
import com.terning.feature.calendar.navigation.calendarNavGraph
import com.terning.feature.component.topappbar.BackButtonTopAppBar
import com.terning.feature.component.topappbar.LogoTopAppBar
import com.terning.feature.component.topappbar.MyPageTopAppBar
import com.terning.feature.home.navigation.homeNavGraph
import com.terning.feature.mypage.navigation.myPageNavGraph
import com.terning.feature.search.navigation.searchNavGraph
Expand All @@ -35,7 +36,7 @@ fun MainScreen(
navigator: MainNavigator = rememberMainNavigator(),
) {
Scaffold(
topBar = { LogoTopAppBar() },
topBar = { MyPageTopAppBar() },
bottomBar = {
MainBottomBar(
isVisible = navigator.showBottomBar(),
Expand Down
13 changes: 13 additions & 0 deletions feature/src/main/res/drawable/ic_20_right.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="20dp"
android:height="20dp"
android:viewportWidth="20"
android:viewportHeight="20">
<group>
<clip-path
android:pathData="M20,0l-20,0l-0,20l20,0z"/>
<path
android:pathData="M13.399,10.092C13.393,9.879 13.318,9.697 13.148,9.534L8.251,4.744C8.119,4.605 7.944,4.536 7.743,4.536C7.335,4.536 7.015,4.85 7.015,5.258C7.015,5.459 7.096,5.641 7.234,5.786L11.648,10.092L7.234,14.399C7.096,14.537 7.015,14.719 7.015,14.92C7.015,15.334 7.335,15.648 7.743,15.648C7.944,15.648 8.119,15.579 8.251,15.441L13.148,10.651C13.318,10.488 13.399,10.306 13.399,10.092Z"
android:fillColor="#666666"/>
</group>
</vector>
1 change: 1 addition & 0 deletions feature/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@
<!-- ContentDescription-->
<string name="ic_back">뒤로가기 버튼</string>
<string name="ic_logo">탑 바 로고</string>
<string name="ic_20_right">오른쪽 버튼</string>
</resources>

0 comments on commit 3b15164

Please sign in to comment.