Try to search your question here, if you can't find : Ask Any Question Now ?

Why the text is displayed on one line?

HomeCategory: stackoverflowWhy the text is displayed on one line?
Avatarrupesh asked 4 months ago

Well, I have a problem with my code, I need to download the code from the URL (code: php), using JSOUP on the Android platform. The site looks nice (data is separated by ENTER), and in the application everything is written in one String and I can not adjust it to your needs. Namely, I would like the data from the page to be identically arranged in the application.

private void getWebsite(){
         new Thread(new Runnable() {
        public void run() {
            final StringBuilder builder = new StringBuilder();

            try {

                Document doc = Jsoup.connect("").get();

                Elements links = ((Document) doc).select("body");

                    for(Element link : links){



            } catch (IOException e){
                builder.append("Aplikacja nie mogła wykonać żądania. Zgłoś ten błąd do administratora aplikacji. Twój błąd to : ").append(e.getMessage()).append("n");

            runOnUiThread(new Runnable() {
                public void run() {



Result from the site:

Result from the app:

1 Answers
Best Answer
AvatarMatthias answered 4 months ago
Your Answer

0 + 10 =

Popular Tags

WP Facebook Auto Publish Powered By :