답은 textView의 Paint 객체의 breakText()를 사용하는 것입니다. 다음은 샘플,
int totalCharstoFit= textView.getPaint().breakText(fullString, 0, fullString.length(),
true, textView.getWidth(), null);
지금
totalCharstoFit
한 줄에 적합 할 수있는 정확한 문자가 포함입니다. 그리고 지금 당신이 당신의 전체 문자열의 하위 문자열을 확인하고이 같은 텍스트 뷰에 추가,
String subString=fullString.substring(0,totalCharstoFit);
textView.append(substring);
그리고 나머지 문자열을 계산할 수 있습니다, 당신은 이제 전체를
fullString=fullString.substring(subString.length(),fullString.length());
을 수행 할 수 있습니다 코드가
는, while 루프에서이 작업을 수행
while(fullstirng.length>0)
{
int totalCharstoFit= textView.getPaint().breakText(fullString, 0, fullString.length(),
true, textView.getWidth(), null);
String subString=fullString.substring(0,totalCharstoFit);
textView.append(substring);
fullString=fullString.substring(subString.length(),fullString.length());
}
http://filamentgroup.com/lab/responsive_design_approach_for_complex_multicolumn_data_tables/는 다른 가능한 솔루션입니다. – Stuart