https://kotlinlang.org logo
m

Mohamed Elfiky

08/24/2020, 1:14 PM
how can i cast a generic type
Copy code
val picker = parentFragmentManager.findFragmentByTag("date_picker_tag") as? MaterialDatePicker<Long>
this code gave warning Unchecked cast: Fragment? to MaterialDatePicker<Long>. should i Suppress the warning or there is another way?