Skip to content

Commit

Permalink
Update activity & fragment
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-stoneuk committed Mar 4, 2018
1 parent b6b9830 commit b42b78a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ protected boolean shouldAnimate() {
}

protected void refreshMaterialAboutList() {
adapter.setData(list.getCards());
setMaterialAboutList(list);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import android.content.Context;
import android.os.AsyncTask;
import android.os.Bundle;
import android.os.Handler;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v4.view.animation.FastOutSlowInInterpolator;
Expand Down Expand Up @@ -38,6 +39,7 @@ protected boolean shouldAnimate() {
return true;
}


@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
Expand All @@ -52,6 +54,7 @@ public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container,
adapter = new MaterialAboutListAdapter(getViewTypeManager());
recyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
recyclerView.setAdapter(adapter);

RecyclerView.ItemAnimator animator = recyclerView.getItemAnimator();
if (animator instanceof SimpleItemAnimator) {
((SimpleItemAnimator) animator).setSupportsChangeAnimations(false);
Expand Down Expand Up @@ -79,8 +82,13 @@ protected void setMaterialAboutList(MaterialAboutList materialAboutList) {
adapter.setData(list.getCards());
}

@Override
public void onPause() {
super.onPause();
}

protected void refreshMaterialAboutList() {
adapter.setData(list.getCards());
setMaterialAboutList(list);
}

private class ListTask extends AsyncTask<String, String, String> {
Expand Down

0 comments on commit b42b78a

Please sign in to comment.