Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

How to convert Java's Runnable in C#

$
0
0

I guess I am too dumb figuring out how to do this. So, I hope someone is smart enough to help me.

Here is the activity in Java: ` public class FunkyActivity extends Activity {

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);

    final ImageView animImage = (ImageView) findViewById(R.id.stickman);
    final AnimationDrawable animDrawable = (AnimationDrawable) animImage.getDrawable();

    animImage.post(
        new Runnable() {
            public void run() { 
                animDrawable.start();
            }
        }
    );
 }

} `


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>