Code example for ImageButton

Methods: getId

0
 
    public void onClick(View v) {
        int vId = v.getId();
        if (vId == storeButton.getId()) {
            listener.onStoreClicked(this);
        } else if (vId == tagButton.getId()) {
            listener.onTagClicked(this);
        } else if (vId == serviceButton.getId()) {
            listener.onServiceClicked(this);
        } else if (vId == pictureButton.getId()) {
            if (isToggleable) {
                showKeyboardButton(); 
                listener.onPictureClicked(this);
            } else if (currentToggleIndex == ToggleIndex.IMAGE) {
                showKeyboardButton(); 
                listener.onPictureClicked(this);
            } else if (currentToggleIndex == ToggleIndex.KEYBOARD) {
                showPictureButton(); 
                listener.onKeyboardClicked(this);
            } 
        } else if (vId == keyboardButton.getId()) {