From 8a6f543ec59cdbc6b95c87562d69407c9c17f5d0 Mon Sep 17 00:00:00 2001 From: Equip de Desenvolupadors de PBE Date: Wed, 28 Nov 2012 14:41:23 +0000 Subject: [PATCH] --- res/layout/dirs.xml | 3 ++- src/com/upc/pbe/upcnews/Descarrega.java | 2 +- src/com/upc/pbe/upcnews/Directoris.java | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++++--------------- src/com/upc/pbe/upcnews/HTMLParser.java | 2 +- src/com/upc/pbe/upcnews/UpcApp.java | 2 +- 5 files changed, 57 insertions(+), 19 deletions(-) diff --git a/res/layout/dirs.xml b/res/layout/dirs.xml index bc2db93..3fe3157 100644 --- a/res/layout/dirs.xml +++ b/res/layout/dirs.xml @@ -7,11 +7,12 @@ android:orientation="vertical" > - + diff --git a/src/com/upc/pbe/upcnews/Descarrega.java b/src/com/upc/pbe/upcnews/Descarrega.java index f89aeea..ef47caf 100644 --- a/src/com/upc/pbe/upcnews/Descarrega.java +++ b/src/com/upc/pbe/upcnews/Descarrega.java @@ -73,7 +73,7 @@ public class Descarrega extends AsyncTask{ - protected Object doInBackground() { + protected String doInBackground() { try { URLConnection conn = new URL(url).openConnection(); BufferedReader in = new BufferedReader(new InputStreamReader( diff --git a/src/com/upc/pbe/upcnews/Directoris.java b/src/com/upc/pbe/upcnews/Directoris.java index 34930b2..3bf840d 100644 --- a/src/com/upc/pbe/upcnews/Directoris.java +++ b/src/com/upc/pbe/upcnews/Directoris.java @@ -9,24 +9,30 @@ import android.util.Log; import android.view.Menu; import android.view.MenuItem; import android.view.View; +import android.view.View.OnClickListener; import android.widget.Button; -public class Directoris extends Activity { +public class Directoris extends Activity implements OnClickListener { final static String TAG = "Directoris"; String s; + Descarrega d; + String url; + String file = "ejemplo.xml"; + String folder = "Environment.getExternalStorageDirectory.getPath()"; ArrayList