#1 ๋ฌธ์ ์ํฉ
Scaffold์ bottomBar ์์ Row(). ๊ทธ Row() ์์ TextField()๊ฐ ์๋ ๊ตฌ์กฐ๋ค. TextField()๋ฅผ ํด๋ฆญํ๋ฉด ์ํํธํค๋ณด๋๊ฐ Row() ์ง์ ๊น์ง ์ฌ๋ผ์ค๋ ๊ฑธ ์๋ํ์ผ๋, ์ค์ ๋ก๋ Row()์ ์์ญ์ ์นจ๋ฒํ์ฌ TextField() ์ง์ ๊น์ง ์ฌ๋ผ์จ๋ค.
#2 ์ฝ๋ ์ค๋ํซ
Scaffold(
modifier = Modifier
.fillMaxSize()
.windowInsetsPadding(WindowInsets.ime), // <- ์ถ๊ฐ!
bottomBar = {
...
}
) { ...
...
}
Modifier์ windowInsetsPadding()์ ์ถ๊ฐํ๋ฉด, ์์คํ UI (์ฌ๊ธฐ์๋ ime(๊ฐ์ํค๋ณด๋)) ์์ญ์ ๊ฐ๋ ค์ง์ง ์๊ฒ ๋๋ค. ์ฃผ์ํ ์ ์, windowInsetsPadding()์ ๋ฐ๋์ Scaffold ์์ฒด์ Modifier์ ์ ์ฉํด์ผํ๋ค๋ ๊ฒ์ด๋ค. ๊ฐ๋ น, bottomBar ์ BottomAppBar()์ Modifier์ ์ ์ฉํ๋ค๋ ๊ฐํ๋ฉด ์ ๋๋ก ์ ์ฉ๋์ง ์๊ณ ๊ดด์ํ ํ๋ฉด์ด ์ถ๋ ฅ๋๋ค.
#3 ์์ฑ๋ ์ฑ
#3-1 ์คํฌ๋ฆฐ์ท
#3-2 ์ด ๊ฒ์๊ธ ์์ ์ Commit
GitHub - Kanmanemone/nutri-capture-new
Contribute to Kanmanemone/nutri-capture-new development by creating an account on GitHub.
github.com
#3-3 ๋ณธ ํ๋ก์ ํธ์ ๊ฐ์ฅ ์ต์ Commit
GitHub - Kanmanemone/nutri-capture-new
Contribute to Kanmanemone/nutri-capture-new development by creating an account on GitHub.
github.com
'๊ฐ๋ฐ ์ผ์ง ๐ป > Nutri Capture' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
Nutri Capture ํ๋ก ํธ์๋ - ์ปค์คํ BottomSheetScaffold ๊ฐ๋ฐ ์ ์ (0) | 2025.03.19 |
---|---|
Nutri Capture ๋ฐฑ์๋ - Hilt ๋์ (0) | 2025.02.01 |
Nutri Capture - ์ฝ๋ ์ ๋ฆฌ (0) | 2025.01.29 |
Nutri Capture ํ๋ก ํธ์๋ - ์์ด์ฝ ์ ์ (1์ฐจ) (0) | 2025.01.12 |
Nutri Capture ๋ฐฑ์๋ - StateFlow๋ก ์ ํ (0) | 2025.01.02 |