/** * Hide all other states and show content * * @param skipIds Ids of views not to show */ public void showContent(List<Integer> skipIds) { switchState(CONTENT, null, null, null, null, skipIds); }
/** * Hide content and show the progress bar * * @param skipIds Ids of views to not hide */ public void showLoading(List<Integer> skipIds) { switchState(LOADING, null, null, null, null, skipIds); }
/** * Show error view with a button when something goes wrong and prompting the user to try again * * @param errorImageDrawable Drawable to show * @param errorTextContent Content of the error view to show * @param errorButtonText Text on the error view button to show * @param onClickListener Listener of the error view button * @param skipIds Ids of views to not hide */ public void showError(Drawable errorImageDrawable, String errorTextContent, String errorButtonText, OnClickListener onClickListener, List<Integer> skipIds) { switchState(ERROR, errorImageDrawable, errorTextContent, errorButtonText, onClickListener, skipIds); }
/** * Show empty view when there are not data to show * * @param emptyImageDrawable Drawable to show * @param emptyTextContent Content of the empty view to show * @param skipIds Ids of views to not hide */ public void showEmpty(Drawable emptyImageDrawable, String emptyTextContent, List<Integer> skipIds) { switchState(EMPTY, emptyImageDrawable, emptyTextContent, null, null, skipIds); }
/** * Show empty view when there are not data to show * * @param emptyImageDrawable Drawable to show * @param emptyTextContent Content of the empty view to show */ public void showEmpty(Drawable emptyImageDrawable, String emptyTextContent) { switchState(EMPTY, emptyImageDrawable, emptyTextContent, null, null, Collections.<Integer>emptyList()); }
/** * Hide content and show the progress bar */ public void showLoading() { switchState(LOADING, null, null, null, null, Collections.<Integer>emptyList()); }
/** * Hide all other states and show content */ public void showContent() { switchState(CONTENT, null, null, null, null, Collections.<Integer>emptyList()); }
/** * Show error view with a button when something goes wrong and prompting the user to try again * * @param errorImageDrawable Drawable to show * @param errorTextContent Content of the error view to show * @param errorButtonText Text on the error view button to show * @param onClickListener Listener of the error view button */ public void showError(Drawable errorImageDrawable, String errorTextContent, String errorButtonText, OnClickListener onClickListener) { switchState(ERROR, errorImageDrawable, errorTextContent, errorButtonText, onClickListener, Collections.<Integer>emptyList()); }