|
|
|
@ -8,13 +8,17 @@ import net.pokeranalytics.android.ui.view.RowViewType |
|
|
|
|
|
|
|
|
|
|
|
enum class LocationRow : RowRepresentable { |
|
|
|
enum class LocationRow : RowRepresentable { |
|
|
|
ADDRESS, |
|
|
|
ADDRESS, |
|
|
|
|
|
|
|
LOCATION_PERMISSION_SWITCH, |
|
|
|
|
|
|
|
LOCATION_LOADER, |
|
|
|
LOCATE_ME; |
|
|
|
LOCATE_ME; |
|
|
|
|
|
|
|
|
|
|
|
override val resId: Int? |
|
|
|
override val resId: Int? |
|
|
|
get() { |
|
|
|
get() { |
|
|
|
return when (this) { |
|
|
|
return when (this) { |
|
|
|
ADDRESS -> R.string.address |
|
|
|
ADDRESS -> R.string.address |
|
|
|
|
|
|
|
LOCATION_PERMISSION_SWITCH -> R.string.geo_locate |
|
|
|
LOCATE_ME -> R.string.geo_locate |
|
|
|
LOCATE_ME -> R.string.geo_locate |
|
|
|
|
|
|
|
LOCATION_LOADER -> null |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -22,7 +26,9 @@ enum class LocationRow : RowRepresentable { |
|
|
|
get() { |
|
|
|
get() { |
|
|
|
return when (this) { |
|
|
|
return when (this) { |
|
|
|
ADDRESS -> RowViewType.TITLE_VALUE.ordinal |
|
|
|
ADDRESS -> RowViewType.TITLE_VALUE.ordinal |
|
|
|
|
|
|
|
LOCATION_PERMISSION_SWITCH -> RowViewType.TITLE_SWITCH.ordinal |
|
|
|
LOCATE_ME -> RowViewType.ROW_BUTTON.ordinal |
|
|
|
LOCATE_ME -> RowViewType.ROW_BUTTON.ordinal |
|
|
|
|
|
|
|
LOCATION_LOADER -> RowViewType.LOADER.ordinal |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -30,7 +36,9 @@ enum class LocationRow : RowRepresentable { |
|
|
|
get() { |
|
|
|
get() { |
|
|
|
return when (this) { |
|
|
|
return when (this) { |
|
|
|
ADDRESS -> BottomSheetType.EDIT_TEXT |
|
|
|
ADDRESS -> BottomSheetType.EDIT_TEXT |
|
|
|
|
|
|
|
LOCATION_PERMISSION_SWITCH -> BottomSheetType.NONE |
|
|
|
LOCATE_ME -> BottomSheetType.NONE |
|
|
|
LOCATE_ME -> BottomSheetType.NONE |
|
|
|
|
|
|
|
LOCATION_LOADER -> BottomSheetType.NONE |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|