Zeepy Radio Button - ZeepyForTeam/ZeepyFor_Android GitHub Wiki

* Zeepy Radio Button

์ง‘์— ๋Œ€ํ•œ ๊ฐ๊ด€์‹ ํ‰๊ฐ€ ๋ทฐ๋ฅผ ๋งŒ๋“ค๋‹ค๊ฐ€ ์ค‘๋ณต์ž‘์—…์„ ์ค„์ด๊ธฐ ์œ„ํ•ด์„œ Custom์œผ๋กœ ํ•˜๋‚˜ ๋งŒ๋“ค์—ˆ์Šต๋‹ˆ๋‹ค.
์ •๋ก์ดํ˜• ์กฐ๊ฑด๊ฒ€์ƒ‰ ๋ทฐ์—์„œ ์“ฐ์ด๋Š” ๊ฒƒ ๊ฐ™์•„์„œ ์ฐธ๊ณ ํ•˜์‹œ๋ฉด ์ข‹์„ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค:)

๋ฐ‘์—์ฒ˜๋Ÿผ Layout์— zeepy์ถ”๊ฐ€ ํ•˜์‹œ๊ณ  button type์„ ์ง€์ •ํ•ด์„œ ๊ฐ„๋‹จํ•˜๊ฒŒ ์‚ฌ์šฉํ•˜์‹ค ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

<com.example.zeepyforandroid.customview.ZeepyRadioButton
    android:id="@+id/radiobtn_one_room"
    android:layout_width="0dp"
    android:layout_height="match_parent"
    android:layout_marginEnd="8dp"
    android:layout_weight="1"
    android:text="1๊ฐœ"
    zeepy:button_type="1" />

ButtonType์€ ์ด๋ ‡๊ฒŒ ์„ ์–ธํ•ด ๋‘์—ˆ์Šต๋‹ˆ๋‹ค!

//DEFAULT CHIP => unscelected -> back: yellow, text: black,  selected-> back: blue, text: white
private const val DEFAULT_CHIP -> 1 
private const val LIKE_CHIP = 2
private const val SOSO_CHIP = 3
private const val DISLIKE_CHIP = 4