WassimBenltaief / FlowLayout

A custom Layout packed with a content view, an empty view, a progress bar and network connectivity status
MIT License
228 stars 24 forks source link

Cannot set EmptyText #8

Closed Rainer-Lang closed 7 years ago

Rainer-Lang commented 7 years ago
public void setEmptyText(int mEmptyText) {
        this.mEmptyText = mEmptyText;
        inflateEmptyText();
    }

private void inflateEmptyText() {
        if (mEmptyText != R.string.text_empty) {
            if (mEmptyLayout != R.layout.layout_empty) {
                throw new RuntimeException("Cannot assign the EmptyText attribute. " +
                        "You already overridden the entire emptyLayout, no need to specify " +
                        "custom color or custom text message");
            } else {
                textEmpty.setText(getResources().getString(R.string.text_empty));
            }
        }
    }

Seems that the text is never set.

Rainer-Lang commented 7 years ago

Please have a look her: https://github.com/WassimBenltaief/FlowLayout/pull/11

WassimBenltaief commented 7 years ago

thank you for the pr. It fixes the issue.