저는 TextView를 확장하고 사용자 정의 글꼴을로드하고 있습니다. 목록보기에서이 사용자 지정 텍스트보기를 사용하고 있습니다. 목록을 스크롤 할 때 가끔 다음과 같은 디버그 메시지가 나타납니다.Android 레이아웃 : 두 번째 레이아웃 패스 실행
requestLayout() com.sample.CustomTextView {52afae4c V.ED ....에 의해 부적절하게 호출 됨 ...... ...... ID 0,27-27,44 # 7f060074 응용 프로그램 : 레이아웃 동안 ID/SOME_ID} : 목록보기가로드 처음으로 스크롤하거나하지 않은 경우 실행 두 번째 레이아웃은
public class CustomTextView extends TextView {
private FontType mFontType;
public CustomTextView(Context context, AttributeSet attrs) {
super(context, attrs, 0);
if(!isInEditMode()){
TypedArray attributesArray = context.getTheme().obtainStyledAttributes(attrs, R.styleable.CustomTextView, 0, 0);
try{
mFontType = FontType.values()[attributesArray.getInteger(R.styleable.CustomTextView_fontType, 0)];
setFontType(mFontType);
setTypeface(Cache.getCustomTypeface(mContext, LIGHT));
// Note: This flag is required for proper typeface rendering
setPaintFlags(getPaintFlags() | Paint.SUBPIXEL_TEXT_FLAG);
}finally {
attributesArray.recycle();
}
}
}
}
그러나이 경고가 인쇄되지 않습니다 전달합니다. 내가 무언가를 무효화하고 플래그를 설정해야합니까?
이 문제에 대한 해결책을 찾았습니까? – JAPS