java - How do I create a superclass that extends AsyncTask? -


i have extend android class android.os.asynctask (params, progress, result). have add new methods , class variables without setting (params, progress, result) in superclass, types defined children.

                 asynctask <params, progress, result>                                |                superclass <params, progress, result>                                |                            ┌───┴───────────────┬───────────────────┐                            |                   |                   |          child1 <integer, void, integer>       |                   |                                                |                   |                             child2 <jsonobject, void, integer>     |                                                                    |                                                child3 <string, void, integer> 

how implement this?

you can inherit generic classes same way inherit regular classes.

the inherited class can specify concrete types type parameters, or own generic type arguments.

public abstract class customasynctask <params, progress, result> extends asynctask <params, progress, result> 

Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -