package com.stephentuso.welcome.ui;

import android.view.View;

/**
 * Created by stephentuso on 11/15/15.
 */
public class SkipButton extends WelcomeScreenViewWrapper {

    private boolean enabled = true;

    public SkipButton(View button, boolean enabled) {
        super(button);
        this.enabled = enabled;
        if (!enabled)
            button.setVisibility(View.INVISIBLE);
    }

    @Override
    public void onPageSelected(int pageIndex, int lastPageIndex) {
        setVisibility(enabled && pageIndex != lastPageIndex);
    }

}

package com.stephentuso.welcome.ui;

import android.view.View;

/**
 * Created by stephentuso on 11/15/15.
 */
public class SkipButton extends WelcomeScreenViewWrapper {

    private boolean enabled = true;

    public SkipButton(View button, boolean enabled) {
        super(button);
        this.enabled = enabled;
        if (!enabled)
            button.setVisibility(View.GONE);
    }

    @Override
    public void onPageSelected(int pageIndex, int lastPageIndex) {
        setVisibility(enabled && pageIndex != lastPageIndex);
    }

}

--- 
+++ 
@@ -13,7 +13,7 @@
         super(button);
         this.enabled = enabled;
         if (!enabled)
-            button.setVisibility(View.GONE);
+            button.setVisibility(View.INVISIBLE);
     }
 
     @Override
Fix layout issue when skipping is disabled
