use of com.battlelancer.seriesguide.widgets.EmptyView in project SeriesGuide by UweTrottmann.
the class TvdbAddFragment method setupEmptyView.
@Override
protected void setupEmptyView(EmptyView emptyView) {
emptyView.setButtonText(R.string.action_try_any_language);
emptyView.setButtonClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
if (shouldTryAnyLanguage && !TextUtils.isEmpty(language)) {
// not set to any language: set to any language
// spinner selection change triggers search
shouldTryAnyLanguage = false;
spinnerLanguage.setSelection(0);
} else {
// already set to any language or retrying, trigger search directly
search();
}
}
});
}
Aggregations