L
L
lhjlbjyjd2015-05-10 23:17:04
Java
lhjlbjyjd, 2015-05-10 23:17:04

How to create such a variable that it would work in all classes?

In general, guys, please help, I ran into 1 problem, and I just can’t solve it. I am making an android app. And I ran into the fact that I need to run 2 AsyncTasks, and the second one should be called from the first one, and after the end of the work, pass the bmap (Bitmap) variable to it. I kind of made it public, but in 1 AsyncTask it is stubbornly not defined. What to do?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Max, 2015-05-11
@mbelskiy

No need to make such a heavy object visible to everyone!
Refactor code. Get to know the Listener pattern

I
IceJOKER, 2015-05-10
@IceJOKER

Can be passed to the constructor.
Make it public (if it doesn't show, then the class object hasn't been created).
Without creating a class object - public static ...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question