|
|
|
@ -25,23 +25,23 @@ import java.util.List;
|
|
|
|
|
* A simple {@link Fragment} subclass.
|
|
|
|
|
* Activities that contain this fragment must implement the
|
|
|
|
|
* to handle interaction events.
|
|
|
|
|
* Use the {@link AnswerCollectFragment#newInstance} factory method to
|
|
|
|
|
* Use the {@link BlogCollectFragment#newInstance} factory method to
|
|
|
|
|
* create an instance of this fragment.
|
|
|
|
|
*/
|
|
|
|
|
public class AnswerCollectFragment extends Fragment {
|
|
|
|
|
public class BlogCollectFragment extends Fragment {
|
|
|
|
|
private static final String ARG_CATEGORY_TITLE = "category_title";
|
|
|
|
|
private String collectCategoryTitle = "Default";
|
|
|
|
|
private List<Collect> collectList = new ArrayList<>();
|
|
|
|
|
private SwipeRefreshLayout mSwipeRefreshLayout;
|
|
|
|
|
|
|
|
|
|
public AnswerCollectFragment() {
|
|
|
|
|
public BlogCollectFragment() {
|
|
|
|
|
// Required empty public constructor
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static AnswerCollectFragment newInstance(String collectCategoryTitle) {
|
|
|
|
|
public static BlogCollectFragment newInstance(String collectCategoryTitle) {
|
|
|
|
|
Bundle args = new Bundle();
|
|
|
|
|
args.putString(ARG_CATEGORY_TITLE, collectCategoryTitle);
|
|
|
|
|
AnswerCollectFragment fragment = new AnswerCollectFragment();
|
|
|
|
|
BlogCollectFragment fragment = new BlogCollectFragment();
|
|
|
|
|
fragment.setArguments(args);
|
|
|
|
|
return fragment;
|
|
|
|
|
}
|
|
|
|
@ -61,7 +61,7 @@ public class AnswerCollectFragment extends Fragment {
|
|
|
|
|
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
|
|
|
|
Bundle savedInstanceState) {
|
|
|
|
|
// Inflate the layout for this fragment
|
|
|
|
|
View view = inflater.inflate(R.layout.fragment_answer_collect, container, false);
|
|
|
|
|
View view = inflater.inflate(R.layout.fragment_blog_collect, container, false);
|
|
|
|
|
getData();//获得数据
|
|
|
|
|
RecyclerView recycleView = (RecyclerView) view.findViewById(R.id.APNList);//获得视图
|
|
|
|
|
LinearLayoutManager layoutManager;
|