Back to project page FisgoDroid.
The source code is released under:
The smiley icons bundled with this application belong to Meneame.NET and are licensed under the Creative Commons by-sa 3.0 license. For more information, please visit http://creativecommons.org/licens...
If you think the Android project FisgoDroid listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package net.meneame.fisgodroid.notifications; //from w w w.j av a 2 s. co m import java.util.List; import android.content.Context; import android.view.View; import android.view.ViewGroup; import android.widget.BaseAdapter; class ElementAdapter extends BaseAdapter { private Context mContext; private List<NotificationElement> mElements; public ElementAdapter(Context context) { mContext = context; } public void setElements(List<NotificationElement> elements) { mElements = elements; notifyDataSetChanged(); } @Override public int getCount() { return mElements != null ? mElements.size() : 0; } @Override public Object getItem(int position) { return mElements.get(position); } @Override public long getItemId(int position) { return getItem(position).hashCode(); } @Override public View getView(int position, View convertView, ViewGroup parent) { NotificationView view = (NotificationView)convertView; if (view == null) { view = new NotificationView(mContext); } view.setElement((NotificationElement)getItem(position)); return view; } }