Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

if i want change empty text later , how ? #4

Open
mahmooddagga opened this issue Dec 10, 2016 · 4 comments
Open

if i want change empty text later , how ? #4

mahmooddagga opened this issue Dec 10, 2016 · 4 comments

Comments

@mahmooddagga
Copy link

if i want change empty text later , how ?

@barryhappy
Copy link
Owner

barryhappy commented Dec 10, 2016

If you are using ListView, you can do like this:

((TEmptyView)listView.getEmptyView()).setEmptyText("New Text")

@mahmooddagga
Copy link
Author

if i use recyclerView

@mahmooddagga
Copy link
Author

mahmooddagga commented Dec 13, 2016

i think no way

@barryhappy
Copy link
Owner

I know it's not so elegant, but work……o(╯□╰)o

try {
    ((TextView) (((ViewGroup) recyclerView.getParent()).findViewById(R.id.t_emptyTextView)))
            .setText("NewText".concat(String.valueOf(++count)));
}catch (Exception e){
    e.printStackTrace();
}

I will try to provide a better solution next version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants