feat: 마이페이지
- 신규 UI 적용
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
package kr.co.vividnext.sodalive.common
|
||||
|
||||
import android.view.View
|
||||
import android.widget.ImageView
|
||||
import android.widget.TextView
|
||||
import androidx.annotation.DrawableRes
|
||||
import kr.co.vividnext.sodalive.R
|
||||
|
||||
/**
|
||||
* Function Button Helper
|
||||
* include된 function button 레이아웃에 이미지와 텍스트를 설정하는 헬퍼 클래스
|
||||
*/
|
||||
object FunctionButtonHelper {
|
||||
|
||||
/**
|
||||
* Function button에 이미지와 텍스트를 설정합니다.
|
||||
*
|
||||
* @param buttonView include된 버튼 뷰
|
||||
* @param iconRes 아이콘 drawable 리소스 ID
|
||||
* @param title 버튼 제목
|
||||
* @param clickListener 클릭 리스너 (optional)
|
||||
*/
|
||||
fun setupFunctionButton(
|
||||
buttonView: View,
|
||||
@DrawableRes iconRes: Int,
|
||||
title: String,
|
||||
clickListener: View.OnClickListener? = null
|
||||
) {
|
||||
val iconImageView = buttonView.findViewById<ImageView>(R.id.iv_function_icon)
|
||||
val titleTextView = buttonView.findViewById<TextView>(R.id.tv_function_title)
|
||||
|
||||
iconImageView.setImageResource(iconRes)
|
||||
titleTextView.text = title
|
||||
|
||||
clickListener?.let { buttonView.setOnClickListener(it) }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user