add loading footer to search fragment

This commit is contained in:
Christian Schabesberger 2017-02-28 13:24:07 +01:00
parent 552c70bb0d
commit 7b6dae20be
2 changed files with 4 additions and 2 deletions

View File

@ -63,7 +63,6 @@ import org.schabi.newpipe.util.NavStack;
import org.schabi.newpipe.util.PermissionHelper;
import static android.app.Activity.RESULT_OK;
import static com.nononsenseapps.filepicker.R.styleable.AlertDialog;
import static org.schabi.newpipe.ReCaptchaActivity.RECAPTCHA_REQUEST;

View File

@ -205,7 +205,6 @@ public class SearchInfoItemFragment extends Fragment {
RECAPTCHA_REQUEST);
}
});
}
@Override
@ -221,6 +220,8 @@ public class SearchInfoItemFragment extends Fragment {
infoListAdapter = new InfoListAdapter(getActivity(),
getActivity().findViewById(android.R.id.content));
infoListAdapter.setFooter(inflater.inflate(R.layout.pignate_footer, recyclerView, false));
infoListAdapter.showFooter(false);
infoListAdapter.setOnStreamInfoItemSelectedListener(
new InfoItemBuilder.OnInfoItemSelectedListener() {
@Override
@ -324,6 +325,7 @@ public class SearchInfoItemFragment extends Fragment {
private void search(String query) {
infoListAdapter.clearSteamItemList();
infoListAdapter.showFooter(false);
pageNumber = 0;
searchQuery = query;
search(query, pageNumber);
@ -344,6 +346,7 @@ public class SearchInfoItemFragment extends Fragment {
private void setDoneLoading() {
this.isLoading = false;
loadingIndicator.setVisibility(View.GONE);
infoListAdapter.showFooter(true);
}
/**