-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* [추가] 도서관 feature 모듈 추가 * [수정] Manifest, gradle 파일 수정 * [추가] 구역별 좌석표시 컴포넌트 * [추가] 탑바, 바텀바, FAB 구현 * [추가] 도서관 좌석 화면 구현 * [추가] 도서관 좌석 네비게이션 추가 * [추가] FAB 애니메이션 추가 * [수정] 주석 수정 * Update feature/library/src/main/java/com/ku_stacks/ku_ring/library/compose/LibrarySeatScreen.kt * [수정] 리뷰 기반 코드 수정 --------- Co-authored-by: HyunWoo Lee (Nunu Lee) <[email protected]>
- Loading branch information
1 parent
05508e9
commit 0d98dee
Showing
20 changed files
with
688 additions
and
1 deletion.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
...c/main/java/com/ku_stacks/ku_ring/designsystem/components/progress/CircularProgressBar.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package com.ku_stacks.ku_ring.designsystem.components.progress | ||
|
||
import androidx.compose.material.CircularProgressIndicator | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.graphics.Color | ||
import androidx.compose.ui.graphics.StrokeCap | ||
import androidx.compose.ui.unit.Dp | ||
import androidx.compose.ui.unit.dp | ||
import com.ku_stacks.ku_ring.designsystem.components.LightAndDarkPreview | ||
import com.ku_stacks.ku_ring.designsystem.kuringtheme.KuringTheme | ||
|
||
@Composable | ||
fun CircularProgressBar( | ||
progress: Float, | ||
strokeWidth: Dp, | ||
modifier: Modifier = Modifier, | ||
backgroundColor: Color = KuringTheme.colors.mainPrimary, | ||
foregroundColor: Color = KuringTheme.colors.gray100, | ||
strokeCap: StrokeCap = StrokeCap.Square, | ||
) { | ||
CircularProgressIndicator( | ||
progress = progress, | ||
color = foregroundColor, | ||
backgroundColor = backgroundColor, | ||
strokeWidth = strokeWidth, | ||
strokeCap = strokeCap, | ||
modifier = modifier, | ||
) | ||
} | ||
|
||
@LightAndDarkPreview | ||
@Composable | ||
private fun CircularProgressBarPreview() { | ||
KuringTheme{ | ||
CircularProgressBar( | ||
progress = 0.5f, | ||
strokeWidth = 5.dp | ||
) | ||
} | ||
} |
59 changes: 59 additions & 0 deletions
59
...em/src/main/java/com/ku_stacks/ku_ring/designsystem/components/topbar/NavigateUpTopBar.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
package com.ku_stacks.ku_ring.designsystem.components.topbar | ||
|
||
import androidx.annotation.DrawableRes | ||
import androidx.compose.foundation.background | ||
import androidx.compose.foundation.clickable | ||
import androidx.compose.foundation.layout.Row | ||
import androidx.compose.foundation.layout.fillMaxWidth | ||
import androidx.compose.foundation.layout.padding | ||
import androidx.compose.material.Icon | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.Alignment | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.graphics.vector.ImageVector | ||
import androidx.compose.ui.res.vectorResource | ||
import androidx.compose.ui.unit.dp | ||
import com.ku_stacks.ku_ring.designsystem.R | ||
import com.ku_stacks.ku_ring.designsystem.components.LightAndDarkPreview | ||
import com.ku_stacks.ku_ring.designsystem.kuringtheme.KuringTheme | ||
|
||
/** | ||
* 뒤로 가기 버튼만 포함하는 탑바. | ||
* | ||
* @param navigationIconId 아이콘 아이디 | ||
* @param onNavigationIconClick 아이콘 버튼을 눌렀을 때 발생시킬 이벤트 | ||
* @param modifier 적용할 [Modifier] | ||
*/ | ||
@Composable | ||
fun NavigateUpTopBar( | ||
@DrawableRes navigationIconId: Int, | ||
onNavigationIconClick: () -> Unit, | ||
modifier: Modifier = Modifier, | ||
) { | ||
Row( | ||
modifier = modifier | ||
.background(KuringTheme.colors.background) | ||
.padding(start = 20.dp, top = 18.dp, bottom = 21.dp), | ||
verticalAlignment = Alignment.CenterVertically, | ||
) { | ||
Icon( | ||
imageVector = ImageVector.vectorResource(id = navigationIconId), | ||
contentDescription = null, | ||
tint = KuringTheme.colors.textBody, | ||
modifier = Modifier.clickable { onNavigationIconClick() } | ||
) | ||
|
||
} | ||
} | ||
|
||
@LightAndDarkPreview | ||
@Composable | ||
private fun KuringIconTopBarPreview() { | ||
KuringTheme { | ||
NavigateUpTopBar( | ||
onNavigationIconClick = {}, | ||
navigationIconId = R.drawable.ic_back_v2, | ||
modifier = Modifier.fillMaxWidth(), | ||
) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:width="24dp" | ||
android:height="24dp" | ||
android:viewportWidth="24" | ||
android:viewportHeight="24"> | ||
<path | ||
android:pathData="M21.167,5.333V10.333H16.167" | ||
android:strokeLineJoin="round" | ||
android:strokeWidth="1.25" | ||
android:fillColor="#00000000" | ||
android:strokeColor="#999999" | ||
android:strokeLineCap="round"/> | ||
<path | ||
android:pathData="M2.833,18.667V13.667H7.833" | ||
android:strokeLineJoin="round" | ||
android:strokeWidth="1.25" | ||
android:fillColor="#00000000" | ||
android:strokeColor="#999999" | ||
android:strokeLineCap="round"/> | ||
<path | ||
android:pathData="M4.925,9.5C5.347,8.306 6.066,7.238 7.013,6.396C7.96,5.555 9.104,4.966 10.34,4.687C11.576,4.407 12.862,4.445 14.079,4.797C15.296,5.149 16.404,5.804 17.3,6.7L21.166,10.333M2.833,13.667L6.7,17.3C7.595,18.196 8.703,18.851 9.92,19.203C11.137,19.555 12.424,19.593 13.659,19.313C14.895,19.034 16.04,18.445 16.987,17.604C17.934,16.762 18.652,15.694 19.075,14.5" | ||
android:strokeLineJoin="round" | ||
android:strokeWidth="1.25" | ||
android:fillColor="#00000000" | ||
android:strokeColor="#999999" | ||
android:strokeLineCap="round"/> | ||
</vector> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import com.ku_stacks.ku_ring.buildlogic.dsl.setNameSpace | ||
|
||
plugins { | ||
kuring("view") | ||
kuring("compose") | ||
} | ||
|
||
android { | ||
setNameSpace("feature.library") | ||
} | ||
|
||
dependencies { | ||
implementation(projects.core.designsystem) | ||
implementation(projects.core.util) | ||
implementation(projects.data.domain) | ||
implementation(projects.data.library) | ||
testImplementation(projects.core.testUtil) | ||
|
||
implementation(libs.bundles.compose.interop) | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"> | ||
|
||
</manifest> |
39 changes: 39 additions & 0 deletions
39
feature/library/src/main/java/com/ku_stacks/ku_ring/library/LibrarySeatActivity.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package com.ku_stacks.ku_ring.library | ||
|
||
import android.content.Context | ||
import android.content.Intent | ||
import android.os.Bundle | ||
import androidx.activity.compose.setContent | ||
import androidx.activity.enableEdgeToEdge | ||
import androidx.appcompat.app.AppCompatActivity | ||
import androidx.compose.foundation.layout.fillMaxSize | ||
import androidx.compose.ui.Modifier | ||
import com.ku_stacks.ku_ring.designsystem.kuringtheme.KuringTheme | ||
import com.ku_stacks.ku_ring.library.compose.LibrarySeatScreen | ||
import dagger.hilt.android.AndroidEntryPoint | ||
|
||
@AndroidEntryPoint | ||
class LibrarySeatActivity : AppCompatActivity() { | ||
|
||
override fun onCreate(savedInstanceState: Bundle?) { | ||
super.onCreate(savedInstanceState) | ||
enableEdgeToEdge() | ||
|
||
setContent { | ||
KuringTheme { | ||
LibrarySeatScreen( | ||
onBackButtonClick = ::finish, | ||
onReservationButtonClick = {}, | ||
modifier = Modifier.fillMaxSize() | ||
) | ||
} | ||
} | ||
} | ||
|
||
companion object { | ||
fun start(context: Context) { | ||
val intent = Intent(context, LibrarySeatActivity::class.java) | ||
context.startActivity(intent) | ||
} | ||
} | ||
} |
Oops, something went wrong.