package com.upc.pbe.upcnews; import java.util.ArrayList; import android.app.Activity; import android.os.Bundle; import android.util.Log; import android.widget.TextView; public class Directoris extends Activity { final static String TAG = "Directoris"; TextView title; TextView textout; String s; public void onCreate(Bundle savedInstanceState) { Log.d(TAG, "onCreated"); super.onCreate(savedInstanceState); setContentView(R.layout.dirs); textout = (TextView) findViewById(R.id.text_out); title = (TextView) findViewById(R.id.textViewTitle); title.setText("Server --> " + ((UpcApp) getApplication()).getUrl()); s = ((UpcApp) getApplication()).getDesc(); HTMLParser pars = new HTMLParser(); ArrayList dirs = pars.parse(s); for (int i = 0; i < dirs.size(); i++) { Log.d(TAG, "Directori " + i); textout.append(String.format("\nDirectori: %s\n", dirs.get(i) .toString())); } } }