Question: I have been trying to change the colour of my rows in a listview depending on a condition being met from my parsed string of my database. I cannot get my head around how to achieve this. 

I know there seems to be examples about how to do this but I am really at a loss. 

I have tried this:

```
Calms info = new Calms(this);

info.open();
String data = info.getFlareData();
info.close();

String arr[] = data.split("..\n\n");
System.out.println(arr);

ListView listView = getListView();

System.out.println("$$$$$$$$$$$$$$$"+listView.getChildCount()+"$$$$$$$$$$$$$$");
setListAdapter(new ArrayAdapter<String>(this, R.layout.simple_list_item_1, arr));

//System.out.println("****************"+getListView().getChildCount()+"**************");

for(int i = 0; i < arr.length; i++){
    System.out.println("arr["+i+"] = " + arr[i].trim());

    if(arr[i].contains("High Severity"))
    {
        // String highArr = arr[i];
        listView.getChildAt(i).setBackgroundColor(Color.RED);
    }
    else if(arr[i].contains("Low Severity"))
    {
        listView.getChildAt(i).setBackgroundColor(Color.GREEN);
    }
    else if(arr[i].contains("Medium Severity"))
    {
        listView.getChildAt(i).setBackgroundColor(Color.rgb(255, 136, 0));
    }

} 

```

Answer: 
Adding a timeout on the Hide helps preventing the flickering!

```
function dragover(event) {
    clearTimeout(tid);
    event.stopPropagation();
    event.preventDefault();
    $('.overlay').show();
}

function dragleave(event) {
    tid = setTimeout(function(){
        event.stopPropagation();
        $('.overlay').hide();
    }, 300);
}

```

I edited your fiddle <http://jsfiddle.net/yApUZ/>
I came across a better solution in my optinion, no need to use timeouts which I tend not to like.

If you set your overlay to have CSS property 

```
pointer-events:none

```

it won't affect drag events on the window when showing up and you can achieve the same effect