-
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.
마이페이지 > 설정 화면 UI 변경 사항 및 기능 구현 (#91)
* ✨ 설정 페이지 UI 구현 및 고객센터 이메일 기능 구현 * ✨ 버전 정보 화면에 노출하도록 구현 * ✨ 웹뷰 컴포넌트 생성 및 개인정보처리방침 url 연결 * ✨ 오픈소스 라이센스 목록 구현 * 🐛 CI/CD fail 수정
- Loading branch information
Showing
18 changed files
with
416 additions
and
77 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<resources> | ||
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar"> | ||
<item name="android:statusBarColor">@android:color/white</item> | ||
<item name="android:windowLightStatusBar">true</item> | ||
</style> | ||
</resources> |
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
81 changes: 81 additions & 0 deletions
81
presentation/src/main/java/com/whyranoid/presentation/reusable/MenuItem.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,81 @@ | ||
package com.whyranoid.presentation.reusable | ||
|
||
import androidx.annotation.DrawableRes | ||
import androidx.annotation.StringRes | ||
import androidx.compose.foundation.clickable | ||
import androidx.compose.foundation.layout.Row | ||
import androidx.compose.foundation.layout.Spacer | ||
import androidx.compose.foundation.layout.fillMaxWidth | ||
import androidx.compose.foundation.layout.padding | ||
import androidx.compose.foundation.layout.size | ||
import androidx.compose.foundation.layout.width | ||
import androidx.compose.material3.Icon | ||
import androidx.compose.material3.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.style.TextAlign | ||
import androidx.compose.ui.tooling.preview.Preview | ||
import androidx.compose.ui.unit.dp | ||
import com.whyranoid.presentation.R | ||
import com.whyranoid.presentation.theme.WalkieColor | ||
import com.whyranoid.presentation.theme.WalkieTheme | ||
import com.whyranoid.presentation.theme.WalkieTypography | ||
|
||
@Composable | ||
fun MenuItem( | ||
@StringRes text: Int, | ||
subInfo: String?= null, | ||
@DrawableRes icon: Int? = null, | ||
onClick: () -> Unit = {} | ||
) { | ||
Row( | ||
verticalAlignment = Alignment.CenterVertically, | ||
modifier = Modifier | ||
.fillMaxWidth() | ||
.padding(vertical = 12.dp) | ||
.padding(horizontal = 20.dp) | ||
.clickable(onClick = onClick) | ||
) { | ||
if (icon != null) { | ||
Icon( | ||
painter = painterResource(id = icon), | ||
contentDescription = null, | ||
modifier = Modifier.size(22.dp) | ||
) | ||
|
||
Spacer(modifier = Modifier.width(8.dp)) | ||
} | ||
|
||
Text( | ||
text = stringResource(id = text), | ||
style = WalkieTypography.Body1_Normal | ||
) | ||
|
||
if (subInfo != null) { | ||
Spacer(modifier = Modifier.width(10.dp)) | ||
|
||
Text( | ||
text = subInfo, | ||
style = WalkieTypography.Body1_Normal, | ||
color = WalkieColor.Primary, | ||
textAlign = TextAlign.End, | ||
modifier = Modifier.weight(1f), | ||
) | ||
} | ||
} | ||
} | ||
|
||
@Preview | ||
@Composable | ||
private fun MenuItemPreview() { | ||
WalkieTheme { | ||
MenuItem( | ||
text = R.string.version_info, | ||
subInfo = "1.0.0", | ||
icon = R.drawable.ic_mobile | ||
) | ||
} | ||
} |
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
43 changes: 43 additions & 0 deletions
43
presentation/src/main/java/com/whyranoid/presentation/screens/WebViewScreen.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,43 @@ | ||
package com.whyranoid.presentation.screens | ||
|
||
import android.annotation.SuppressLint | ||
import android.graphics.Color | ||
import android.view.ViewGroup | ||
import android.webkit.WebView | ||
import android.webkit.WebViewClient | ||
import androidx.compose.foundation.layout.Box | ||
import androidx.compose.foundation.layout.fillMaxSize | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.viewinterop.AndroidView | ||
|
||
@SuppressLint("SetJavaScriptEnabled") | ||
@Composable | ||
fun WebViewScreen( | ||
url: String?, | ||
) { | ||
Box(modifier = Modifier.fillMaxSize()) { | ||
AndroidView( | ||
factory = { context -> | ||
WebView(context).apply { | ||
setBackgroundColor(Color.TRANSPARENT) | ||
layoutParams = ViewGroup.LayoutParams( | ||
ViewGroup.LayoutParams.MATCH_PARENT, | ||
ViewGroup.LayoutParams.MATCH_PARENT | ||
) | ||
webViewClient = WebViewClient() | ||
settings.apply { | ||
javaScriptEnabled = true | ||
loadWithOverviewMode = true | ||
useWideViewPort = true | ||
domStorageEnabled = true | ||
setSupportZoom(false) | ||
} | ||
} | ||
}, | ||
update = { webView -> | ||
webView.loadUrl(url ?: "") | ||
} | ||
) | ||
} | ||
} |
Oops, something went wrong.