Search in sources :

Example 6 with EntryItem

use of com.clear.helpers.EntryItem in project AndroidCleaner by ReguloSarmiento.

the class HistoryActivity method onItemClick.

@Override
public void onItemClick(AdapterView<?> arg0, View view, int position, long arg3) {
    EntryItem item = (EntryItem) items.get(position);
    CheckBox box = (CheckBox) view.findViewById(R.id.checkBox1);
    if (item.title.equals(getResources().getString(R.string.files))) {
        if (!item.isSelected()) {
            mensajeAlerta(item, box);
        } else {
            item.setSelected(false);
            box.setChecked(item.isSelected());
        }
    } else {
        if (!item.isSelected()) {
            item.setSelected(true);
            box.setChecked(item.isSelected());
        } else {
            item.setSelected(false);
            box.setChecked(item.isSelected());
        }
    }
}
Also used : CheckBox(android.widget.CheckBox) EntryItem(com.clear.helpers.EntryItem)

Aggregations

EntryItem (com.clear.helpers.EntryItem)6 CheckBox (android.widget.CheckBox)4 SectionItem (com.clear.helpers.SectionItem)4 View (android.view.View)2 CompoundButton (android.widget.CompoundButton)2 ImageView (android.widget.ImageView)2 TextView (android.widget.TextView)2 Item (com.clear.helpers.Item)2 AdapterHistory (com.clear.adapters.AdapterHistory)1 AdapterLlamadasMensajes (com.clear.adapters.AdapterLlamadasMensajes)1