loop is not working, why is this the case?
<p>I am having trouble understanding this java code. I want the image to twinkle a couple of times, with some delay. The image twinkle once and thats it. Can someone give me an explanation would be great!</p>

<pre><code>private void RunAnimations(int[]melodiTakten) { 

    for (int i = 0; i &lt; 4; i++) {  

        ImageView markeringspilen = (ImageView) findViewById(R.id.markeringspil);
        markeringspilen.setVisibility(View.VISIBLE);
        markeringspilen.postDelayed(new Runnable() {
            public void run() {
                ImageView markeringspilen = (ImageView) findViewById(R.id.markeringspil);

                markeringspilen.setVisibility(View.INVISIBLE);
            }
        }, 2000);

    } 
</code></pre>
