이 특이한 문제가 있습니다. 저는 기본 Android 스타일을 사용하여 TextView
의 스타일을 지정하고 있으며, 하나의 솔기를 제외한 모든 솔기는 완벽하게 작동합니다.주제별 TextView 모양이 항상 작동하지 않는 경우
모양은 ?android:attr/textAppearanceSmall
이며 레이아웃 XML 디자이너에서 글꼴을 변경하고 Holo
과 Holo.Light
(Android 3.0 이상) 사이에서 테마를 변경합니다.
그러나 하나의 특정 TextView
은 태블릿에서 실행 중일 때 스타일이 적용되지 않으며 다른 사람들과 똑같은 XML 코드를 사용합니다.
다음은 작동하지 않습니다 TextView
내 XML 코드입니다 :
<TextView android:id="@+id/textView1"
android:text="TextView"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_width="match_parent"
android:layout_marginTop="2sp"
android:lines="2"
android:gravity="top|center"
android:textAppearance="?android:attr/textAppearanceSmall">
</TextView>
나는 또한 다음과 같은 방법을 사용하여 코드에서 그 일을 시도했습니다,하지만 그 중 하나가 작동하지 않습니다
setTextAppearance(this, android.R.attr.textAppearanceSmall);
아이디어가 있으십니까?
감사합니다. 정말 도움이되었고 문제가 해결되었습니다. 이제 setTextAppearance (this, android.R.style.TextAppearance_Small)를 대신 사용하고 있습니다. 건배! –
항상 도와 드리겠습니다. D –