2013-07-15 2 views

답변

1

목록 항목 행 파일의 XML에 지정해야합니다.

다음은 TextView에서 재생해야하는 속성입니다.

android:singleLine="true" 
android:maxLength="someLengthofCharacters(int)" 
android:ellipsize="end" //if you want an ellipse to be appended to the end of your String 

편집 : 당신의 텍스트 뷰 프로그램

TextView tv = new TextView(this); 
int maxLength = 10; 
InputFilter[] fArray = new InputFilter[1]; 
fArray[0] = new InputFilter.LengthFilter(maxLength); 
tv.setFilters(fArray) 

의 최대 문자 길이를 설정하고 사고 후

TextView.setSingleLine or TextView.setLines(1) 
+0

를 사용하여 true로 한 줄을 설정하려면이 방법을 시도해보십시오 당신이 사용하고 있습니까 사용자 정의 목록보기 및 어댑터? –

+0

예 아니오 XML 여기 –

+0

아, 내 잘못 .. 내 편집 된 답변보기 –