Guest User

Untitled

a guest
Feb 17th, 2019
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. new MyBackground().execute();
  2.  
  3. MyBackground mBackground=new MyBackground();
  4. mBackground.p1=1;
  5. mBackground.p2="tets";
  6. MyBackground.execute();
  7.  
  8. public class MyBackground extends AsyncTask<Void, Void, Void> {
  9. ...
  10. private int p1;
  11. private String p2;
  12.  
  13. public MyBackground(int p1, String p2) {
  14. this.p1 = p1;
  15. this.p2 = p2;
  16. }
  17. ...
  18. }
  19.  
  20. MyBackground myBackground = new MyBackground(1,"tets");
  21. myBackground.execute();
  22. // or
  23. MyBackground myBackground = new MyBackground(1,"tets").execute();
Add Comment
Please, Sign In to add comment