10 Mayıs 2016 Salı

parent.getChildAt(positon) returns null visible child çözüldü

listview.getChildAt(positon) returns null  hatasının çözümü

Aşağıdaki kodu listivew içinde yazın

View view;

int firstPos = listview.getFirstVisiblePosition();
int wantedPos = position - firstPos;

if ((wantedPos >= 0) && (wantedPos <= listview.getChildCount())
{
 view =listview.getChildAt(wantedPos);
 if (view == null){
  return;}
else{
 //  burada  view ' ı kullanın  }
}

6 Mayıs 2016 Cuma

ConcurrentModificationException for ArrayList

ConcurrentModificationException for ArrayList Error

Böyle bir for döngüsü kullanıyorsanız
for (iterable_type iterable_element : iterable)
       {
}
Yerine

 for (int i = 0; i < array.length; i++) {

}
bu for döngüsünü kullanın sorun ortdan kalkacaktır




ConcurrentModificationException    occurs when using iterators