There is long string. I am dividing long string into words and setting TextView for each word. (You can ask why I need this function? When user clicks on textview(word), application shows the meaning of the word)
...
TextView tv = new TextView(this);
tv.setTextSize(24);
tv.setText(word);
ll.addView(tv);
...
My LinearLayout:
<LinearLayout
android:id="@+id/llReader"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:orientation="vertical" >
</LinearLayout>
If I put LinearLayout's orientation vertical, it is putting each TextView in new line. For example:
word1
word2
word3
If I put it in horizontal orientation, it is putting all words only in one line:
word 1, word 2, word 3
In result word4,word5, word6 is not visible.
How to add TextViews programmatically in this way?
