728x90 ๋ฐ์ํ AppBar2 [Flutter] AppBar transparent ํฌ๋ช ์์ผ๋ก, Body ์์ ๊ฒน์น๊ธฐ @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( centerTitle: true, //Title text ๊ฐ์ด๋ฐ ์ ๋ ฌ title: Text(widget.title), backgroundColor: Colors.transparent, //appBar ํฌ๋ช ์ elevation: 0.0, //appBar ๊ทธ๋ฆผ์ ๋๋ ์ค์ (๊ฐ 0์ผ๋ก ์ ๊ฑฐ) ), extendBodyBehindAppBar: true, //body ์์ appbar body: ...(์ดํ์๋ต) ํ๋ฌํฐ ์๋๋ก์ด๋ 2021. 1. 24. Android activity ์๋จ๋ฐ(appbar, toolbar)์ ๋ฒํผ ๋ง๋ค๊ธฐ ์๋๋ก์ด๋ ์กํฐ๋นํฐ ํ๋ฉด ์ฑ๋ฐ(์ ํํ๋ ํด๋ฐ)์ ๋ฒํผ์ ๋ง๋ค์ด์ฃผ๋ ค๊ณ ํ๋ค. ๋ฒํผ ํ๋์ด๊ธฐ ๋๋ฌธ์ ํ๊ฐ์ง์ ๊ธฐ๋ฅ๋ง ํ๋ค. 1. Menu Resource File ์์ฑ app์ res/menu ํด๋์์ ๋ฉ๋ชจ ๋ฆฌ์์ค xml ์์ฑ ๊ทธ๋ผ ์๋ ๊ฒ ๋จ๋๋ฐ, ์ผ์ชฝ์ ๋ฉ๋ด Menu Item์ ์ปดํผ๋ํธ ํธ๋ฆฌ/menu ์์ ๋ฃ์ด ์๋ก ์์ฑํ๋ค. ๊ทธ๋ผ ์ด๋ ๊ฒ ๋๋กญ๋ฉ๋ด๊ฐ ๊ธฐ๋ณธ์ผ๋ก ์์ฑ๋๋๋ฐ, ๋๋ ๋ฒํผ๋ง ์ํ๋ ๋๋กญ๋ฉ๋ด๋ฅผ ์์ ์ฃผ๊ฒ ๋ค. ๊ทธ๋ฌ๊ธฐ ์ํด xml ์ฝ๋๋ฅผ ์ฐ๋ค. ์๋์ ๊ฐ์ด ๋ฐ๊ฟ์ฃผ์๋ค. ์กํฐ๋นํฐ ๊ฒฝ๋ก ์์ (app/java ํ์ ํด๋ ์ด๋ฆ) tools:context = "com.example.myproject.MainActivity" title ๋์ icon์ ์ง์ ํด์ฃผ์ด๋ ๋๋ค. title๊ณผ icon ๋๋ค ์ง์ ํ๋ค๋ฉด ic.. 2020. 11. 14. ์ด์ 1 ๋ค์ 728x90 ๋ฐ์ํ