|
|
|
|
@ -24,7 +24,7 @@ enum class BottomSheetType { |
|
|
|
|
interface BottomSheetDelegate { |
|
|
|
|
fun clickOnAdd(row: RowRepresentable) |
|
|
|
|
fun clickOnClear(row: RowRepresentable) |
|
|
|
|
fun setValue(value: Any, row: RowRepresentable) |
|
|
|
|
fun setValue(value: Any?, row: RowRepresentable) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -37,10 +37,10 @@ open class BottomSheetFragment : BottomSheetDialogFragment() { |
|
|
|
|
|
|
|
|
|
companion object { |
|
|
|
|
fun create( |
|
|
|
|
fragmentManager: FragmentManager?, |
|
|
|
|
row: RowRepresentable, |
|
|
|
|
bottomSheetDelegate: BottomSheetDelegate, |
|
|
|
|
data: ArrayList<BottomSheetData> |
|
|
|
|
fragmentManager: FragmentManager?, |
|
|
|
|
row: RowRepresentable, |
|
|
|
|
bottomSheetDelegate: BottomSheetDelegate, |
|
|
|
|
data: ArrayList<BottomSheetData> |
|
|
|
|
): BottomSheetFragment { |
|
|
|
|
|
|
|
|
|
val bottomSheetFragment = when (row.bottomSheetType) { |
|
|
|
|
@ -62,7 +62,7 @@ open class BottomSheetFragment : BottomSheetDialogFragment() { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? { |
|
|
|
|
return inflater.inflate(R.layout.fragment_bottom_sheet,container,false) |
|
|
|
|
return inflater.inflate(R.layout.fragment_bottom_sheet, container, false) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { |
|
|
|
|
@ -114,8 +114,8 @@ open class BottomSheetFragment : BottomSheetDialogFragment() { |
|
|
|
|
return data |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
open fun getValue(): Any { |
|
|
|
|
return Any() |
|
|
|
|
open fun getValue(): Any? { |
|
|
|
|
return null |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|