java - Get all text from online text file and show it all in a TextView -


i want text webpage , save string array/list , print in view/activity..

let's have url www.my.url/html.php , on page this:

paul

caroline

steve'

...

...

and want them written in same position in view/activity.

i have simple activity:

public class playerlistactivity extends activity {      @override     public void oncreate(bundle savedinstancestate) {         super.oncreate(savedinstancestate);         setcontentview(r.layout.activity_playerlist);     } } 

and xml file:

<framelayout xmlns:android="http://schemas.android.com/apk/res/android"     xmlns:tools="http://schemas.android.com/tools"     android:id="@+id/container"     android:layout_width="match_parent"     android:layout_height="match_parent"     android:background="#121e26"     tools:context="com.tominocz.stonequestapp.mainactivity"     tools:ignore="mergerootframe,contentdescription,hardcodedtext,spusage,textviewedits,deprecated,smallsp" >  </framelayout> 

this want like. think possible?

if simple html data may download whole html. put textview inside framelayout , use

textview.settext(html.fromhtml(stringwithhtml)); 

doc of method here

note not html tags supported, unofficial list here


Comments

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -