현재 액티비티의 모든 textviews 유형을 변경하면 Textview Text를 제외하고 모두 변경됩니다.Listviews 하위 Textviews 서체 오류
하지만 난이 목록보기의 대해서 itemClick 리스너에서 같은 함수를 호출 할 때 글꼴이 변경 내가 그것을 클릭 할 필요없이 목록보기의 글꼴을 설정하는 방법
((TextView) view).setTypeface(CreateTypeface);
?
final View rootView = findViewById(android.R.id.content);
public void applyCustomFont(ViewGroup list)
{
for (int i = 0; i < list.getChildCount(); i++) {
View view = list.getChildAt(i);
if (view instanceof ViewGroup)
{
applyCustomFont((ViewGroup) view);
} else if (view instanceof TextView)
{
((TextView) view).setTypeface(CreateTypeface);
}
}
}
lvfonts.setAdapter(new ArrayAdapter<String> (FontMUI.this,android.R.layout.simple_list_item_1, list));
lvfonts.setOnItemClickListener(new OnItemClickListener()
{
@Override
public void onItemClick(AdapterView<?> arg0, View arg1, int arg2,
long arg3)
{
applyCustomFont((ViewGroup)rootView);
}
}
귀하의 질문은 clear..My 이해가가 adpater 클래스의 getView에서 서체를 설정되어 있지 않으며 .. – Subburaj
@Subburaj 내가 사용하지 않은의 getView 방법 난 당신이 전화 목록보기의 클릭 부분에서 내 코드 검사 –
를 업데이트 "Customfont()"method.then 그러면 목록보기 항목을 클릭 할 때만 호출되고 글꼴은 바뀝니다. 이것은 코드의 출력입니다 .Whats your questions ?? – Subburaj