stopping refreshlayout animation when an exception is raised
This commit is contained in:
parent
ff8b9156db
commit
1a9bba1e44
@ -179,11 +179,11 @@ public class MainActivity extends AppCompatActivity implements SimpleCallback, S
|
|||||||
public void onSuccess() {
|
public void onSuccess() {
|
||||||
refreshLayout.setRefreshing(false);
|
refreshLayout.setRefreshing(false);
|
||||||
adapter.submitList(newItems);
|
adapter.submitList(newItems);
|
||||||
//newItems.clear();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(Exception e) {
|
public void onFailure(Exception e) {
|
||||||
|
refreshLayout.setRefreshing(false);
|
||||||
Toast.makeText(this, e.getMessage(), Toast.LENGTH_LONG).show();
|
Toast.makeText(this, e.getMessage(), Toast.LENGTH_LONG).show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user