Closed hiroshiyui closed 1 year ago
Perhaps I could bring Observer / Pub-Sub / EventBus patterns back. :thinking:
A simpler, but also uglier way is passing the required objects or attributes as method call parameters.
A simpler, but also uglier way is passing the required objects or attributes as method call parameters.
Not that easy as I may think, for each ViewBinding
and its GestureListener
...
Reference 821e365fb1e51b17e92db2ae040e50afd4a33082 to build EventBus
events again.
If I change several Views
to Fragment
, then I can control theirs life-cycle, which is good for EventBus
.
But it's a pity that Fragment
belongs to Activity
, and in InputMethodService
I can use 'Views' only.
If I change several
Views
toFragment
, then I can control theirs life-cycle, which is good forEventBus
.But it's a pity that
Fragment
belongs toActivity
, and inInputMethodService
I can use 'Views' only.
Never mind, put register/unregister calls in onAttachedToWindow()
& onDetachedFromWindow()
solves this issue.
Most tasks were done. Before release a new version, I have to test the whole behaviors.
Fixed in release 1.9.5
GuilelessBopomofoServiceContext
retainsGuilelessBopomofoService
, which causes memory leaking.I should refactor related codes, the best result is
GuilelessBopomofoServiceContext
being eliminated.It's a huge and difficult task, though.