Methods Summary |
---|
private void | initViewItem(android.view.View view)
mAccountIcon = (ImageView)view.findViewById(android.R.id.icon);
mAccountName = (TextView)view.findViewById(android.R.id.title);
mAccountNumber = (TextView)view.findViewById(android.R.id.summary);
|
public void | setAccountIcon(int resId)
mAccountIcon.setImageResource(resId);
|
public void | setAccountIcon(android.graphics.drawable.Drawable drawable)
mAccountIcon.setBackgroundDrawable(drawable);
|
public void | setAccountName(java.lang.String name)
setText(mAccountName, name);
|
public void | setAccountNumber(java.lang.String number)
setText(mAccountNumber, number);
|
private void | setText(android.widget.TextView view, java.lang.String text)
if (TextUtils.isEmpty(text)) {
view.setVisibility(View.GONE);
} else {
view.setText(text);
view.setVisibility(View.VISIBLE);
}
|
public void | setViewItem(com.android.internal.widget.AccountViewAdapter.AccountElements element)
Drawable drawable = element.getDrawable();
if (drawable != null) {
setAccountIcon(drawable);
} else {
setAccountIcon(element.getIcon());
}
setAccountName(element.getName());
setAccountNumber(element.getNumber());
|