2012-05-18 7 views

答えて

7

最後に、私はそれを解決:

private Drawable getIconForAccount(Account account, AccountManager manager) { 
     AuthenticatorDescription[] descriptions = manager.getAuthenticatorTypes(); 
     for (AuthenticatorDescription description: descriptions) { 
      if (description.type.equals(account.type)) { 
       PackageManager pm = getContext().getPackageManager(); 
       return pm.getDrawable(description.packageName, description.iconId, null); 
      } 
     } 
     return null; 
    } 
+0

'ContactManager'サンプルは私の記憶が正しければ、アカウントのアイコンを取得する方法についての例があります。 – Luksprog

+0

ありがとう、しかし、私は小さなアイコンを取得するには? – Akshay

+0

ねえ、それを使った。iconIdの 'smallIconId' insted – Akshay

関連する問題