Search in sources :

Example 1 with ShareListItem

use of com.lguipeng.notes.model.ShareListItem in project Notes by lguipeng.

the class MaterialSimpleListAdapter method getView.

@Override
public View getView(final int index, View convertView, ViewGroup parent) {
    final View view = super.getView(index, convertView, parent);
    final ShareListItem item = getItem(index);
    ImageView ic = (ImageView) view.findViewById(android.R.id.icon);
    if (item.getIcon() != null)
        ic.setImageDrawable(item.getIcon());
    else
        ic.setVisibility(View.GONE);
    TextView tv = (TextView) view.findViewById(android.R.id.title);
    tv.setText(item.getContent());
    return view;
}
Also used : TextView(android.widget.TextView) ImageView(android.widget.ImageView) ShareListItem(com.lguipeng.notes.model.ShareListItem) TextView(android.widget.TextView) ImageView(android.widget.ImageView) View(android.view.View)

Aggregations

View (android.view.View)1 ImageView (android.widget.ImageView)1 TextView (android.widget.TextView)1 ShareListItem (com.lguipeng.notes.model.ShareListItem)1