-
Notifications
You must be signed in to change notification settings - Fork 0
Zeepy Radio Button
SON PYEONG HWA edited this page May 3, 2021
·
1 revision
집에 대한 객관식 평가 뷰를 만들다가 중복작업을 줄이기 위해서 Custom으로 하나 만들었습니다.
정록이형 조건검색 뷰에서 쓰이는 것 같아서 참고하시면 좋을 것 같습니다:)
![](https://user-images.githubusercontent.com/56873136/116837430-625ce080-ac05-11eb-9d36-fb229ce7f6c6.png)
밑에처럼 Layout에 zeepy추가 하시고 button type을 지정해서 간단하게 사용하실 수 있습니다.
![](https://user-images.githubusercontent.com/56873136/116837636-355cfd80-ac06-11eb-84a1-deb6ccbb9d48.png)
<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