use of com.clear.helpers.Item in project AndroidCleaner by ReguloSarmiento.
the class AdapterHistory method getView.
@Override
public View getView(int position, View convertView, ViewGroup parent) {
View v = convertView;
final Item i = items.get(position);
if (i != null) {
if (i.isSection()) {
SectionItem si = (SectionItem) i;
v = vi.inflate(R.layout.divisor, null);
v.setBackgroundColor(Color.parseColor("#142241"));
v.setOnClickListener(null);
v.setOnLongClickListener(null);
v.setLongClickable(false);
final TextView sectionView = (TextView) v.findViewById(R.id.list_item_section_text);
sectionView.setTextColor(Color.parseColor("#FFFFFF"));
sectionView.setText(si.getTitle());
} else {
final EntryItem ei = (EntryItem) i;
v = vi.inflate(R.layout.list_items_history, null);
final ImageView icono = (ImageView) v.findViewById(R.id.list_item_entry_drawable);
final TextView title = (TextView) v.findViewById(R.id.list_item_entry_title);
final TextView cantidad = (TextView) v.findViewById(R.id.list_item_entry_summary);
final CheckBox check = (CheckBox) v.findViewById(R.id.checkBox1);
check.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
Log.d("Metodo ApplicationAdapter------>", ei.title);
ei.setSelected(buttonView.isChecked());
}
});
title.setText(ei.title);
cantidad.setText(ei.cantidad);
icono.setImageResource(ei.icono);
check.setChecked(ei.isSelected());
}
}
return v;
}
use of com.clear.helpers.Item in project AndroidCleaner by ReguloSarmiento.
the class AdapterLlamadasMensajes method getView.
@Override
public View getView(int position, View convertView, ViewGroup parent) {
View v = convertView;
final Item i = items.get(position);
if (i != null) {
if (i.isSection()) {
SectionItem si = (SectionItem) i;
v = vi.inflate(R.layout.divisor, null);
v.setBackgroundColor(Color.parseColor("#142241"));
v.setOnClickListener(null);
v.setOnLongClickListener(null);
v.setLongClickable(false);
final TextView sectionView = (TextView) v.findViewById(R.id.list_item_section_text);
sectionView.setTextColor(Color.parseColor("#FFFFFF"));
sectionView.setText(si.getTitle());
} else {
final EntryItem ei = (EntryItem) i;
v = vi.inflate(R.layout.items_call_msj, null);
final ImageView icono = (ImageView) v.findViewById(R.id.list_item_entry_drawable);
final TextView title = (TextView) v.findViewById(R.id.list_item_entry_title);
final TextView cantidad = (TextView) v.findViewById(R.id.list_item_entry_summary);
final CheckBox check = (CheckBox) v.findViewById(R.id.checkBox1);
check.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
ei.setSelected(buttonView.isChecked());
Log.d("Metodo ApplicationAdapter------>", ei.title);
}
});
title.setText(ei.title);
cantidad.setText(ei.cantidad);
icono.setImageResource(ei.icono);
check.setChecked(ei.isSelected());
}
}
return v;
}
Aggregations