add loading footer to search fragment
This commit is contained in:
parent
552c70bb0d
commit
7b6dae20be
2 changed files with 4 additions and 2 deletions
|
@ -63,7 +63,6 @@ import org.schabi.newpipe.util.NavStack;
|
||||||
import org.schabi.newpipe.util.PermissionHelper;
|
import org.schabi.newpipe.util.PermissionHelper;
|
||||||
|
|
||||||
import static android.app.Activity.RESULT_OK;
|
import static android.app.Activity.RESULT_OK;
|
||||||
import static com.nononsenseapps.filepicker.R.styleable.AlertDialog;
|
|
||||||
import static org.schabi.newpipe.ReCaptchaActivity.RECAPTCHA_REQUEST;
|
import static org.schabi.newpipe.ReCaptchaActivity.RECAPTCHA_REQUEST;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -205,7 +205,6 @@ public class SearchInfoItemFragment extends Fragment {
|
||||||
RECAPTCHA_REQUEST);
|
RECAPTCHA_REQUEST);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -221,6 +220,8 @@ public class SearchInfoItemFragment extends Fragment {
|
||||||
|
|
||||||
infoListAdapter = new InfoListAdapter(getActivity(),
|
infoListAdapter = new InfoListAdapter(getActivity(),
|
||||||
getActivity().findViewById(android.R.id.content));
|
getActivity().findViewById(android.R.id.content));
|
||||||
|
infoListAdapter.setFooter(inflater.inflate(R.layout.pignate_footer, recyclerView, false));
|
||||||
|
infoListAdapter.showFooter(false);
|
||||||
infoListAdapter.setOnStreamInfoItemSelectedListener(
|
infoListAdapter.setOnStreamInfoItemSelectedListener(
|
||||||
new InfoItemBuilder.OnInfoItemSelectedListener() {
|
new InfoItemBuilder.OnInfoItemSelectedListener() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -324,6 +325,7 @@ public class SearchInfoItemFragment extends Fragment {
|
||||||
|
|
||||||
private void search(String query) {
|
private void search(String query) {
|
||||||
infoListAdapter.clearSteamItemList();
|
infoListAdapter.clearSteamItemList();
|
||||||
|
infoListAdapter.showFooter(false);
|
||||||
pageNumber = 0;
|
pageNumber = 0;
|
||||||
searchQuery = query;
|
searchQuery = query;
|
||||||
search(query, pageNumber);
|
search(query, pageNumber);
|
||||||
|
@ -344,6 +346,7 @@ public class SearchInfoItemFragment extends Fragment {
|
||||||
private void setDoneLoading() {
|
private void setDoneLoading() {
|
||||||
this.isLoading = false;
|
this.isLoading = false;
|
||||||
loadingIndicator.setVisibility(View.GONE);
|
loadingIndicator.setVisibility(View.GONE);
|
||||||
|
infoListAdapter.showFooter(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue