I have a layout where I have a text set.
<TextView
android:id="@+id/activityStockValorAnoTop_textView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Maximo Anual:" />
My intention is that a value that I collect via web request from a thread of the activity, is concatenated with one another.
That is: If the fixed value is "Annual Maximum:" and the value that I have collected in the thread is "55.6", I will be attached to that TextView.
This is the code of the thread that makes the request, right now I get it in console with a System.out.println but. How do I attach that variable to the fixed value of the TextView?
new Thread()
{
public void run()
{
while (true) {
try {
Thread.sleep(30000);
Stock stock = null;
try {
stock = YahooFinance.get("INTC");
} catch (IOException e) {
e.printStackTrace();
}
BigDecimal price = stock.getQuote().getPrice();
System.out.println(price);
System.out.println("----------------------------------");
}
catch(Exception ex)
{
}
}
}
}.start();