Lo puse aqui y si funciona, justo debajo del doInBackground:
[PHP]
@ Override
protected void onPostExecute(Void args) {
// Lo cate the listview in listview_main.xml
listview = (ListView) findViewById(R.id.listview);
// Pass the results into ListViewAdapter.java
adapter = new ListViewAdapter(MainActivity.this, arraylist);
// Set the adapter to the ListView
listview.setAdapter(adapter);
// Close the progressdialog
mProgressDialog.dismiss();
if(jsonobject==null){
Toast.makeText(getApplicationContext(), "No hay conexion a internet!", Toast.LENGTH_SHORT).show();
}
}[/PHP]
Muchas gracias
|