I have a string from a file that am storing into 3 separate TextViews because I was having alignments issues with a single TextView. How can I scroll only this section of my screen to see all of the contents of the file?
BufferedReader buf = new BufferedReader(new FileReader(file));
while((line = buf.readLine())!= null) {
StringTokenizer st = new StringTokenizer(line);
a = st.nextToken();
b = st.nextToken();
c = st.nextToken();
text1.append(a + '\n');
text2.append(b + '\n');
text3.append(c + '\n');
}
dp1.setText(text1);
dp2.setText(text2);
dp3.setText(text3);
You can use the following xml with a few tweaks if needed,
And now in your java code, you can access them as,
if you want you can use vertical scroll bars as,