Skip to content

Commit

Permalink
kuring-168 캠퍼스맵 탭을 compose로 migrate (#236)
Browse files Browse the repository at this point in the history
* [삭제] 캠퍼스맵 XML 레이아웃 제거

* [수정] 캠퍼스맵 화면을 compose로 migrate

* [수정] MainScreen에서 compose 캠퍼스맵 화면 호출

* [삭제] 사용하지 않는 레이아웃, fragment 파일 제거
  • Loading branch information
mwy3055 authored Jun 19, 2024
1 parent c610f27 commit 4bf5b40
Show file tree
Hide file tree
Showing 11 changed files with 74 additions and 422 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,11 @@ import android.net.Uri
import androidx.annotation.StringRes
import androidx.compose.animation.AnimatedContentTransitionScope
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.wrapContentHeight
import androidx.compose.material.Scaffold
import androidx.compose.material.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.ui.Modifier
Expand All @@ -26,6 +24,7 @@ import androidx.navigation.compose.NavHost
import androidx.navigation.compose.composable
import com.ku_stacks.ku_ring.designsystem.kuringtheme.KuringTheme
import com.ku_stacks.ku_ring.main.archive.compose.ArchiveScreen
import com.ku_stacks.ku_ring.main.campusmap.CampusMapScreen
import com.ku_stacks.ku_ring.main.notice.compose.NoticeScreen
import com.ku_stacks.ku_ring.main.setting.SettingViewModel
import com.ku_stacks.ku_ring.main.setting.compose.OpenSourceActivity
Expand Down Expand Up @@ -141,17 +140,7 @@ fun NavGraphBuilder.mainScreenNavGraph(
)
}
composable<MainScreenRoute.CampusMap> {
Box(
modifier =
Modifier
.background(KuringTheme.colors.background)
.fillMaxSize(),
) {
Text(
text = "TODO: Compose migration하기",
color = KuringTheme.colors.textBody,
)
}
CampusMapScreen()
}
composable<MainScreenRoute.Settings> {
// TODO by mwy3055: SettingScreen 내부도 navigation으로 migrate해야 함
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
package com.ku_stacks.ku_ring.main.campusmap

import androidx.compose.foundation.Image
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.padding
import androidx.compose.material.Scaffold
import androidx.compose.material.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import com.ku_stacks.ku_ring.designsystem.components.LightAndDarkPreview
import com.ku_stacks.ku_ring.designsystem.components.topbar.CenterTitleTopBar
import com.ku_stacks.ku_ring.designsystem.kuringtheme.KuringTheme
import com.ku_stacks.ku_ring.designsystem.kuringtheme.values.Pretendard
import com.ku_stacks.ku_ring.main.R

@Composable
fun CampusMapScreen(
modifier: Modifier = Modifier,
) {
Scaffold(
topBar = {
CenterTitleTopBar(
title = stringResource(R.string.campus_map_title),
navigation = {},
action = {},
modifier = Modifier.padding(16.dp),
)
},
modifier = modifier.fillMaxSize(),
backgroundColor = KuringTheme.colors.background,
) {
Column(
modifier = Modifier
.padding(it)
.fillMaxSize(),
verticalArrangement = Arrangement.Center,
horizontalAlignment = Alignment.CenterHorizontally,
) {
Image(
painter = painterResource(R.drawable.ic_construction),
contentDescription = null,
)
Text(
text = stringResource(R.string.campus_on_construction),
style = TextStyle(
fontSize = 14.sp,
lineHeight = 22.82.sp,
fontFamily = Pretendard,
fontWeight = FontWeight(500),
color = KuringTheme.colors.textCaption1,
)
)
}
}
}

@LightAndDarkPreview
@Composable
private fun CampusMapScreenPreview() {
KuringTheme {
CampusMapScreen()
}
}

This file was deleted.

Loading

0 comments on commit 4bf5b40

Please sign in to comment.