0
TextView에 가장 이상한 문제가 있습니다. 꽤 긴 텍스트가 있습니다 (텍스트 줄이 자동으로 맞아야하므로 새 줄이 포함되지 않습니다). 사용자 정의 서체는 프로그래밍 방식으로 설정됩니다. 문제는 텍스트가 잘리는 것입니다. 나는보기의 가장자리에 글자의 상단을 볼 수 있습니다. 텍스트의 왼쪽 부분이 잘려 보이지 않습니다. 해결책을 찾도록 도와주세요. 여기 Android TextView가 맞춤 글꼴을 적용 할 때 텍스트를 바꿈하지 않음
은 XML입니다 :<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/imageView1"
android:layout_alignRight="@+id/imageView2"
android:layout_below="@+id/relativeLayout2"
android:layout_centerHorizontal="true"
android:paddingLeft="5dp"
android:paddingRight="5dp"
android:background="#FFFFFF"
android:gravity="center"
android:singleLine="false" />
그리고 여기 폰트 적용 방법은 다음과 같습니다
descriptionText.setTypeface(Typeface.createFromAsset(getAssets(),
"fonts/okolaksRegular.ttf"));
다음 링크를 확인하십시오 :) 도움이 되었기를 바랍니다. http://stackoverflow.com/questions/2197744/android-textview-text-not-getting-wrapped –
작동하지 않았습니다 ... – definera