I am trying to populate an array of image urls from Post class but the activity returns a blanked page. am i doing it right. sorry am learning android don't know much.
ArrayList PostDetails = new ArrayList();
for (int index=0;index<imageUrls.length;index++){
imageUrls[index]=PostDetails.get(index).getImag();
}
You should wait till the task is completed, you can put the last part in onPostExecute
method..
protected void onPostExecute( ) {
String[]imageUrls= new String[PostDetails.size()];
for (int index=0;index<imageUrls.length;index++){
imageUrls[index]=PostDetails.get(index).getImag();
}
}