룰렛 설정
- 옵션 추가시 확률이 빈칸으로 표시되어 NumberFormat Exception이 나오던 버그 예외처리
This commit is contained in:
@@ -205,9 +205,13 @@ class RouletteSettingsFragment : BaseFragment<FragmentRouletteSettingsBinding>(
|
||||
etOption.setText(option.title)
|
||||
tvOptionTitle.text = "옵션 ${index + 1}"
|
||||
|
||||
if (option.percentage.toFloat() > 0f) {
|
||||
etPercentage.setText(option.percentage)
|
||||
} else {
|
||||
try {
|
||||
if (option.percentage.toFloat() > 0f) {
|
||||
etPercentage.setText(option.percentage)
|
||||
} else {
|
||||
etPercentage.setText("")
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
etPercentage.setText("")
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user