data binding

Development/Android

๐Ÿ“ฆ Databinding์„ ์“ฐ๋ฉด์„œ - 1

Databinding์ด๋ž€!(๋ฐ์ดํ„ฐ ๋ฌถ๊ธฐ?) → ์•ˆ๋“œ๋กœ์ด๋“œ์—์„œ์˜ data binding ์ด๋ž€, Android Archictecture Components ์˜ ํ•œ ๋ถ€๋ถ„์œผ๋กœ์„œ Ui ์š”์†Œ์™€ ๋ฐ์ดํ„ฐ๋ฅผ ํ”„๋กœ๊ทธ๋žจ์  ๋ฐฉ์‹์œผ๋กœ ์—ฐ๊ฒฐํ•˜์ง€ ์•Š๊ณ , ์„ ์–ธ์  ํ˜•์‹์œผ๋กœ ๊ฒฐํ•ฉํ•  ์ˆ˜ ์žˆ๊ฒŒ ๋„์™€์ฃผ๋Š” ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋ฅผ ๋งํ•œ๋‹ค. ์‰ฝ๊ฒŒ ์„ค๋ช…ํ•˜๋ฉด MVVMํŒจํ„ด์„ ์‚ฌ์šฉํ•˜๋ฉด์„œ Activity๋‚˜ Fragment์—์„œ ๋ทฐ ๊ด€๋ จ๋œ ์ฝ”๋“œ๋“ค์„ ์‚ฌ์šฉํ•˜์ง€ ์•Š๊ณ  xml ์ฝ”๋“œ์— ์ง‘์–ด ๋„ฃ๋Š” ๊ฒƒ์„ ๋งํ•ฉ๋‹ˆ๋‹ค. ์ด๊ฒƒ๋“ค์„ ViewModel์—์„œ ๊ด€๋ฆฌํ•˜๊ฒŒ ๋ฉ๋‹ˆ๋‹ค. ๋” ๋” ๋” ํ”ผ๋ถ€์— ์™€๋‹ฟ๊ฒŒ ๋งํ•˜์ž๋ฉด Activity๋‚˜ Fragment์—์„œ ๋งŽ์€ ์ฝ”๋“œ๋“ค์„ ์ ์ง€ ์•Š๊ฒŒ ํ•จ์œผ๋กœ์จ ๋ทฐ๋ฅผ ๊ด€๋ฆฌํ•˜๊ณ  ๋ณ€ํ™˜์‹œํ‚ค๋Š” ์ฝ”๋“œ๋Š” ViewModel์—์„œ ๊ด€๋ฆฌํ•ด์„œ Activity & Fragment ๋“ค์˜ ์ฝ”๋“œ๋Š” ๋”์šฑ ..

Android_DevKick
'data binding' ํƒœ๊ทธ์˜ ๊ธ€ ๋ชฉ๋ก