use of com.clear.helpers.SectionItem in project AndroidCleaner by ReguloSarmiento.
the class LlamadasMensajesActivity method informacionParaListview.
public void informacionParaListview() {
llamadas.obtenerDetallesLlamadas();
mensajes.obtenerMensajesRecibidos();
mensajes.obtenerMensajesEnviados();
items.add(new SectionItem(getResources().getString(R.string.calls)));
items.add(new EntryItem(getResources().getString(R.string.incomming), String.valueOf(llamadas.getLlamadasRecibidas().size()), R.drawable.call_incoming));
items.add(new EntryItem(getResources().getString(R.string.outgoing), String.valueOf(llamadas.getLlamadasSalientes().size()), R.drawable.call_outgoing));
items.add(new EntryItem(getResources().getString(R.string.missed), String.valueOf(llamadas.getLlamadasPerdidas().size()), R.drawable.call_missed));
items.add(new SectionItem(getResources().getString(R.string.messages)));
items.add(new EntryItem(getResources().getString(R.string.received), String.valueOf(mensajes.getMensajesRecibidos().size()), R.drawable.msj_inbox));
items.add(new EntryItem(getResources().getString(R.string.sent), String.valueOf(mensajes.getMensajesEnviados().size()), R.drawable.msj_sent));
adapter = new AdapterLlamadasMensajes(this, items);
listview.setAdapter(adapter);
listview.setOnItemClickListener(this);
}
use of com.clear.helpers.SectionItem 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.SectionItem 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;
}
use of com.clear.helpers.SectionItem in project AndroidCleaner by ReguloSarmiento.
the class HistoryActivity method informacionParaListview.
public void informacionParaListview() {
items.add(new SectionItem(getResources().getString(R.string.browser)));
items.add(new EntryItem(getResources().getString(R.string.browser), String.valueOf(numeroPaginasVisitadas()) + " Pag", R.drawable.browser));
items.add(new SectionItem(getResources().getString(R.string.download)));
items.add(new EntryItem(getResources().getString(R.string.download), espacioDescargas(), R.drawable.downloads));
items.add(new EntryItem(getResources().getString(R.string.files), espacioArchivos(), R.drawable.list_icon_media_files));
items.add(new SectionItem(getResources().getString(R.string.aplicacion)));
items.add(new EntryItem(getResources().getString(R.string.clipboard), tamanoPortapapeles(), R.drawable.clipboard));
adapter = new AdapterHistory(this, items);
listview.setAdapter(adapter);
listview.setOnItemClickListener(this);
}
Aggregations