カスタム フォントを設定する ListActivity に拡張されたクラスがあります。誰でもこれを説明できますか?TextView の書体を使用する方法は知っていますが、ListActivity には使用できません。
public static class PunjabiBooks extends ListActivity{
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
String[] mathList = new String[] {"Gurmukh Soch", "Books (Punjabi)", "Books (Hindi)", "Books (English)",
"Annual Report"};
setListAdapter(new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, mathList));
}
@Override
protected void onListItemClick(ListView l, View v, int position, long id) {
// TODO Auto-generated method stub
super.onListItemClick(l, v, position, id);
Object o = this.getListAdapter().getItem(position);
String keyword = o.toString();
if (keyword.equals("Gurmukh Soch")){
x = 0;
try{
Class ourClass = Class.forName("sukrit.trust.PublicationsTab$WebActivity");
Intent ourIntent = new Intent(PunjabiBooks.this, ourClass);
startActivity(ourIntent);
}catch(ClassNotFoundException e){
e.printStackTrace();
}
}else if(keyword.equals("Books (Punjabi)")){
try{
Class ourClass = Class.forName("sukrit.trust.Publications$PunjabiBooks");
// Intent ourIntent = new Intent(Publications.this, ourClass);
//startActivity(ourIntent);
}catch(ClassNotFoundException e){
e.printStackTrace();
}
}else if(keyword.equals("Books (Hindi)")){
try{
Class ourClass = Class.forName("sukrit.trust.PublicationsTab$HindiBooks");
// Intent ourIntent = new Intent(Publications.this, ourClass);
// startActivity(ourIntent);
}catch(ClassNotFoundException e){
e.printStackTrace();
}
}else if(keyword.equals("Books (English)")){
try{
Class ourClass = Class.forName("sukrit.trust.PublicationsTab$EnglishBooks");
// Intent ourIntent = new Intent(Publications.this, ourClass);
// startActivity(ourIntent);
}catch(ClassNotFoundException e){
e.printStackTrace();
}
}else if(keyword.equals("Annual Report")){
try{
Class ourClass = Class.forName("sukrit.trust.PublicationsTab$AnnualReport");
// Intent ourIntent = new Intent(Publications.this, ourClass);
// startActivity(ourIntent);
}catch(ClassNotFoundException e){
e.printStackTrace();
}
}
}