Code example for RelativeLayout

Methods: removeView

0
    } 
 
    public void setPhotoCount(int photoCount) {
        this.photoCount = photoCount;
        if (photoCount == 1) {
            wrapper.removeView(left);
            wrapper.removeView(right);
        } 
    } 
 
    public int getPhotoCount() { 
        return photoCount;
    } 
 
    public boolean existLeftImage() { 
        return currentItemPos-1 >= 0;
    } 
 
    public boolean existRightImage() { 
        return currentItemPos+1 < photoCount;
    }