Since there were few articles that described what should be specified for the generic type of the (?) AyncTask class that is often used in Android development, I will share it.
AsyncTask<Params, Progress, Result>
Specify three generic types for the AsyncTask class.
When I explain roughly, it will be as follows
AsyncTask<Params, Progress, Result>
doInBackground (vararg p0: ~~~~)
Specify with Void
if you do not use a value etc. with 3 arguments
http://d.hatena.ne.jp/Nagise/20120309/1331265123 https://dev.classmethod.jp/smartphone/android/asynctask/
Recommended Posts