Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8775559
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T18:49:51+00:00 2026-06-13T18:49:51+00:00

String hallo = blabla + jojo + \n + doj + drasl +\n; InputStream

  • 0
String hallo = "blabla " + "jojo " + "\n" + "doj " + "drasl " +"\n";
InputStream is = new ByteArrayInputStream(hallo.getBytes());
BufferedReader in = new BufferedReader(new InputStreamReader(is));

String reader;
    while ((reader = in.readLine()) != null) {
    String[] RowData = reader.split(" ");
    String eitt = RowData[0];
    String tvo = RowData[1];

I have a string with the same format as the hallo string, except I don’t know how many lines there are. I’m trying to put the information in a table layout (or what ever is most convenient).

How do I automatically create the exact number of textview windows in the table layout as I need, and automatically input my string value?

By the way, the textview is inside a scrollview layout, if that matters.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T18:49:52+00:00Added an answer on June 13, 2026 at 6:49 pm

    Use the following code

    String hallo = "blabla " + "jojo " + "\n" + "doj " + "drasl " + "\n";
    InputStream is = new ByteArrayInputStream(hallo.getBytes());
    BufferedReader in = new BufferedReader(new InputStreamReader(is));
    LinearLayout linearLayout = (LinearLayout) findViewById(R.id.linearLayout);
    
    String line;
    try {
        while ((line = in.readLine()) != null) {
            String[] RowData = line.split(" ");
            String eitt = RowData[0];
            String tvo = RowData[1];
    
            TextView textView = new TextView(this);
            textView.setText(line);
    
            linearLayout.addView(textView);
        }
    } catch (IOException e1) {
        e1.printStackTrace();
    }
    

    with this xml layout

    <ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:tools="http://schemas.android.com/tools"
        android:id="@+id/scrollView"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical" >
    
        <LinearLayout
            android:id="@+id/linearLayout"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical" >
        </LinearLayout>
    
    </ScrollView>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Just a blackout, I want the String hello hallo tjena hej tere to an
Let's say I have a string Hello and a list words = ['hello', 'Hallo',
int main(int argc, char **args) { unsigned char* str = hallo; printf(String: %s\n,str); uint8_t
I want to delete a Newline '\n' within a string. char *string =hallo\n; int
Hallo all: I need to insert a html string in a iframe as shown
I want to match a String which looks like this: [lang_de]Hallo![/lang_de][lang_en]Hello![/lang_en]HeyHo[lang_es]Hola![/lang_es] I want the
Hallo I have this assignment to print only alphabets in a C++ string. It
I have a string containing something like this Hello bla bla bla bla ok,
I have a string Hello I am going to I with hello am .
I have a string: Hello 7866592 this is my 12432 string and 823 i

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.