Directoris.java
975 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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<String> 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()));
}
}
}