Skip to content
Arasthel edited this page Aug 24, 2014 · 6 revisions

This annotation will execute the code inside the method on the UI Thread using a Handler.

Example

@OnUIThread()
public void getResult(Context context, boolean value){
    if(value == true) {
        Toast.makeText(context, "Result was: $value", Toast.LENGTH_SHORT).show()
    }
}