diff --git a/src/com/upc/pbe/upcnews/MainActivity.java b/src/com/upc/pbe/upcnews/MainActivity.java index 8a043b0..598da46 100644 --- a/src/com/upc/pbe/upcnews/MainActivity.java +++ b/src/com/upc/pbe/upcnews/MainActivity.java @@ -71,29 +71,7 @@ public class MainActivity extends Activity implements OnClickListener public void onClick(View v) { //Al polsar el boto s'inicia la descarrega Log.d(TAG, "onClicked"); - Descarrega d = new Descarrega(this); - try - { - d.execute(new URL(((UpcApp)getApplication()).getUrl())); - html = d.get(); - } - catch (InterruptedException e) - { - e.printStackTrace(); - } - catch (ExecutionException e) - { - e.printStackTrace(); - } - catch (MalformedURLException e) - { - Toast.makeText(this, "URL Malformada", Toast.LENGTH_LONG).show(); - } - if(!html.equals("")) - { - ((UpcApp) getApplication()).setDesc(html); - startActivity(new Intent(this, Directoris.class)); - } + startActivity(new Intent(this, Directoris.class)); } public void onResume() { diff --git a/src/com/upc/pbe/upcnews/ResourceAdapter.java b/src/com/upc/pbe/upcnews/ResourceAdapter.java index db26ca3..647e58a 100644 --- a/src/com/upc/pbe/upcnews/ResourceAdapter.java +++ b/src/com/upc/pbe/upcnews/ResourceAdapter.java @@ -14,13 +14,11 @@ import android.widget.TextView; //Modificacio de l'Adapter d'Adnroid, creat al nostre gust per donar estil als elements de la ListView de directoris i arxius public class ResourceAdapter extends ArrayAdapter { - Context context; - int layoutResourceId; + Context context; String[] entries = null; public ResourceAdapter(Context context, int layoutResourceId, String[] data) { super(context, layoutResourceId, data); - this.layoutResourceId = layoutResourceId; this.context = context; entries = data; }