Code example for AdapterView.OnItemClickListener

Methods: onItemClick

1
    public void onClick(View view) {
        if (enabled) {
            if (secondaryOnClickListener != null)
                secondaryOnClickListener.onClick(view);
            if (onItemClickListener != null)
                onItemClickListener.onItemClick(null,
                        getChildAt(getLastIndex()), getLastIndex(),
                        getLastIndex() / colCount);
        } 
    } 
 
    void toggleAddDelete(boolean delete) {
        int resid = R.drawable.ic_menu_add;
        int stringid = R.string.profiles_add;
        if (delete) {
            resid = R.drawable.ic_menu_delete_holo_dark;
            stringid = R.string.dialog_delete_title;
        } 
        TextView addDeleteTile = ((TextView) getChildAt(getChildCount() - 1).findViewById(R.id.tile_textview));
        addDeleteTile.setCompoundDrawablesRelativeWithIntrinsicBounds(0, resid, 0, 0);
Stop searching for code, let great code find you!  Add Codota to your java IDE