Andrei Buneyeu Andrei Buneyeu - 29 days ago 19
Android Question

Android annotation to run on Ui Thread

Is it possible to annotate method to run code in UiThread?

runOnUiThread(new Runnable() {
public void run() {
//my code
}});


looks too complex to use it often.

Answer

Look at the AndroidAnnotations project. They use a annotations. As far as i know it is what you want. It uses compile time code generation http://code.google.com/p/androidannotations/