TEmptyView icon indicating copy to clipboard operation
TEmptyView copied to clipboard

if i want change empty text later , how ?

Open mahmooddagga opened this issue 8 years ago • 4 comments

if i want change empty text later , how ?

mahmooddagga avatar Dec 10 '16 09:12 mahmooddagga

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

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

barryhappy avatar Dec 10 '16 15:12 barryhappy

if i use recyclerView

mahmooddagga avatar Dec 13 '16 09:12 mahmooddagga

i think no way

mahmooddagga avatar Dec 13 '16 11:12 mahmooddagga

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.

barryhappy avatar Dec 13 '16 12:12 barryhappy