Click here to Skip to main content
15,125,547 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
hello...
Java
ListView ed1=(ListView)findViewById(R.id.listView1);
                   String  texts = cs.Call();
                    
                   texts = texts.replace("</br>","\n");
                    
                   String[] te = texts.split("$");
                    
                   ArrayAdapter<String> adapter = new ArrayAdapter<String>(MainActivity.this,
                   android.R.layout.simple_list_item_1,te);
                   
                   ed1.setAdapter(adapter);


not working Split and Replace in Code!!!
Posted
Updated 10-Apr-14 5:16am
v2
Comments
phil.o 10-Apr-14 10:21am
   
'Not working' is not a valid issue description.
Please describe :
- what you want to get
- what you actually get
so that we can evaluate the delta and try to understand the real problem.
Please describe it by modifying (improving) your question, not in a reply to this comment.
Nicholas Marty 10-Apr-14 10:47am
   
Maybe you should replace "</br>" with it's actually correct representation: "<br>", "<br/>" or "<br />"? "</br>" doesn't really exist ;)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900