This repository has been archived by the owner on May 26, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Code Convention
Kang min gu edited this page Jul 3, 2020
·
6 revisions
-
์ ์ญ ๋ณ์ : m์ผ๋ก ์์ํ๋ ์นด๋ฉ ํ๊ธฐ๋ฒ
- ์์ : ํ์ค์นผ ํ๊ธฐ๋ฒ
-
Interface : ํ์ค์นผ๋ก ํ๊ธฐํ๋ ๋ง์ง๋ง์ Interface ๋ถ์ฌ์ค ๊ฒ
-
Data Class : ํ์ค์นผ๋ก ํ๊ธฐํ๋ ๋ง์ง๋ง์ Data ๋ถ์ฌ์ค ๊ฒ
- ์ด๋ฆ์ ๋ฑ ๋ด๋ ๋ฌด์จ ๊ธฐ๋ฅ์ธ์ง ์ ์ ์๊ฒ ํ์, ์ค์๋ง ์ต๋ํ ์์ .
-
- Class, Object, Interface ์์ฑ๊ณผ ๋์ผ
- ์ค์๋ง ์ฐ์ง ์๊ธฐ ( ex. ๋ทฐํ๋ ๋๋ ํ ๋ฆฌ -> vh (X) )
- ์์ ฏ_ํ๋๊ทธ๋จผํธor์กํฐ๋นํฐ ์ด๋ฆ_๋ทฐ์ ์ญํ ( ex. btn_law_register )
-
Button : btn
-
TextView : txt
-
EditTextView : edt
-
ImageView : img
-
RecycelerView : rcv
-
ViewPager : vp
๋งค๊ฐ๋ณ์ : ์๋๋ก์ด๋ ์คํ๋์ค ๊ฐ์ด๋๋ผ์ธ์ ๋๊ธธ ์, ๋ชจ๋ ๋งค๊ฐ ๋ณ์ ์ํฐ๋ก ๊ฐํ
- ์์
override fun getItemOffsets(
outRect: Rect,
view: View,
parent: RecyclerView,
state: RecyclerView.State) {
with(outRect) {
if (parent.getChildAdapterPosition(view) == 0) {
top = spaceHeight
}
left = spaceHeight
right = spaceHeight
bottom = spaceHeight
}
}