2012-05-11 55 views
0

我想滚动一个TextView内容的内容,这是设定的结果,在TextView中显示的代码:滚动在一个TextView

do 
{     
y = m; 
f = x/y; 
m = (y + f)/2; 
str[i] = x + "\t " + y + "\t " + f + "\t " + m + "\t";     
i++; 
a = i; 

} while (Math.abs(y - m) >= 0.00001 * y);    
str4 = numfmt1.format(y); 
for (int j = 0; j < a; j++){ 
ris.append(str[j] + "\n");//TextView that contains the string str 
} 
ris.append("La radice è: " + str4) 
} 

回答

0

放置滚动型内TextView的。但要小心,因为ScrollView只能容纳一个孩子......并且TextView将是ScrollView的孩子。在eclipse中使用xml或图形布局功能来做到这一点。

<ScrollView> 

    TextView 

</ScrollView>