Would anyone like to show me an Observer structure inside the android?
I was trying to build an equal to java, but I did not succeed.
My test was done as follows:
- I created a
class Banco
and aclass ClienteObservable
; - In the database I have the notification methods, and
adicionarObserver
(I pass the ball toclienteObservable
); - In
class ClienteObservable
I have theupdate
method, which will perform an action upon being notified.
This is the logic I have about Observer Project Pattern, however I do not know how to structure this in , could anyone develop something pretty basic to show me?
The following is the code below:
In the Class Bank
IntheObservableclientclass