How to create a call back?
To create a call back, we can create an interface that includes a function, let's say call back. Then, in the main thread we can implement the interface (and the function) directly. Finally, pass the parameter "this" into the listener which waits for the interrupt, and once the listener is notified, call that function made in the interface.
How to define the 9 tones in Cantonese?
First, the last three tones are shorted, which corresponds to words with pinyin that ends with b, p, t, etc. The first three and the second three are mirrors, in that the first is the highest, and the 4th is the lowest. 2nd and 5th are raising tones, but the 5th one is lower. Finally, the 3rd tone is just a bit higher in pitch then the 6th. As a Hong Konger, I would suggest you to listen to the song 數字人生. The numbers are structured in such a way that the natural tones of the these numbers match the song's melody.
How to add an animation onto a particular view?
We will use the Animation class. One of the ways includes creating an xml, usually put into the res/anim folder, that involves a set and then a scale or a transform, depending on what the animation is. Then, we can simply use: Animation animation = AnimationUtils.loadAnimation(getContext(), R.anim.myanim); view.startAnimation(animation); to start an animation.