Random header image... Refresh for more!

_speech = new TextToSpeech(this, this);

So, those delegate/event things turned out to be anonymous inline classes implementing an interface.

Now, I like anonymous inline methods.  They can make code easier to understand, because you’re not jumping all over the place to do a simple task.

But inline interface implementations?  No thank you, I don’t need a full “public void function(){}in the middle of a function call.  At least not when all I have to do is “_init = true;“.

So, then…  My class now implements OnInitListener and all I have to do is pass the function I was calling “this”.

0 comments

There are no comments yet...

Kick things off by filling out the form below.

Leave a Comment