General Class
database helper :-
https://drive.google.com/file/d/0B1dF4YSBqUooNjBCVDZiYm8zc00/view?usp=sharing
Constant Data :-
https://drive.google.com/file/d/0B1dF4YSBqUooWkg1bXppSjUzdzA/view?usp=sharing
GPS Tracker :-
https://drive.google.com/file/d/0B1dF4YSBqUooa0FVTmpFQmVQTHc/view?usp=sharing
Adp with view holder:-
private class ViewHolder {
private TextView tv_title;
public ViewHolder(View v) {
tv_title = (TextView) v.findViewById(R.id.tv_title); } }
public class Adp extends BaseAdapter { @Override
public int getCount() { return data.size(); } @Override
public Object getItem(int position) { return position; } @Override
public long getItemId(int position) { return position; } @Override
public View getView(final int position, View convertView, ViewGroup parent) { ViewHolder holder; LayoutInflater inflater = (LayoutInflater) getSystemService(Activity.LAYOUT_INFLATER_SERVICE);
if (convertView == null) { convertView = inflater.inflate(R.layout.xml, parent, false); holder = new ViewHolder(convertView); convertView.setTag(holder); } else { holder = (ViewHolder) convertView.getTag(); } holder.tv_title.setText("" + data.get(position).getTitle()); return convertView; } }
Comments
Post a Comment