Imasicsspaxia
New Member
I'm beginning with android apps and I got a little problem. My app takes a part of a HTML Page and puts some text of this HTML in Textviews. The error is: "Only the original thread that created a view hierarchy can touch its views". If I undestood, it means I should put the "setText()" in the onCreate() function but it doesn't work neither because the HTML isn't completely loaded.Sorry for my poor english and thank's if you have an answer.\[code\]package com.example.goo;import java.text.Normalizer;import java.util.Arrays;import org.jsoup.Jsoup;import org.jsoup.nodes.Document;import org.jsoup.nodes.Element;import android.annotation.SuppressLint;import android.app.Activity;import android.os.AsyncTask;import android.os.Bundle;import android.widget.TextView;@SuppressLint("NewApi")public class Classement extends Activity{ Document doc; String code; static TextView Club1; static TextView Club2; static TextView Club3; static TextView Club4; static TextView Club5; static TextView Club6; static TextView Club7; static TextView Club8; static TextView Club9; static TextView Club10; static TextView Club11; static TextView Club12; public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.classement); //Attribution des TextView this.Club1 = (TextView)findViewById(R.id.TVClub1); this.Club2 = (TextView)findViewById(R.id.TVClub2); this.Club3 = (TextView)findViewById(R.id.TVClub3); this.Club4 = (TextView)findViewById(R.id.TVClub4); this.Club5 = (TextView)findViewById(R.id.TVClub5); this.Club6 = (TextView)findViewById(R.id.TVClub6); this.Club7 = (TextView)findViewById(R.id.TVClub7); this.Club8 = (TextView)findViewById(R.id.TVClub8); this.Club9 = (TextView)findViewById(R.id.TVClub9); this.Club10 = (TextView)findViewById(R.id.TVClub10); this.Club11 = (TextView)findViewById(R.id.TVClub11); this.Club12 = (TextView)findViewById(R.id.TVClub12); //Appel de la classe g