|
|
|
@ -6,7 +6,6 @@ import android.util.Log;
|
|
|
|
|
import android.view.LayoutInflater;
|
|
|
|
|
import android.view.View;
|
|
|
|
|
import android.view.ViewGroup;
|
|
|
|
|
import android.widget.TextView;
|
|
|
|
|
|
|
|
|
|
import androidx.annotation.RequiresApi;
|
|
|
|
|
import androidx.fragment.app.Fragment;
|
|
|
|
@ -37,13 +36,10 @@ import okhttp3.Response;
|
|
|
|
|
public class InvitationChannelFragment extends Fragment {
|
|
|
|
|
private static final String ARG_CATEGORY_TITLE = "category_title";
|
|
|
|
|
private static final String ARG_CATEGORY_TITLE_NUM = "category_title_num";
|
|
|
|
|
public static List<List<Blog>> resourceList = new ArrayList<>();
|
|
|
|
|
private List<Question> allQuestion = new ArrayList<>();
|
|
|
|
|
private List<Blog> allBlog = new ArrayList<>();
|
|
|
|
|
private String invitationCategoryTitle = "Default";
|
|
|
|
|
private int invitationCategoryTitleNum = 0;
|
|
|
|
|
private TextView mTitleField;
|
|
|
|
|
static List<Blog> blogList = new ArrayList<>();
|
|
|
|
|
private List<Blog> blogLists = new ArrayList<>();
|
|
|
|
|
private List<Blog> expBlog = new ArrayList<>();
|
|
|
|
|
private List<Blog> badBlog = new ArrayList<>();
|
|
|
|
@ -58,12 +54,11 @@ public class InvitationChannelFragment extends Fragment {
|
|
|
|
|
private RecyclerView expRecyclerView;
|
|
|
|
|
private RecyclerView recRecyclerView;
|
|
|
|
|
private RecyclerView badRecyclerView;
|
|
|
|
|
private boolean isPause = false;
|
|
|
|
|
|
|
|
|
|
private final String[] channelList = {"全部", "经验"
|
|
|
|
|
, "康复", "扫雷", "问答"};
|
|
|
|
|
|
|
|
|
|
// int temp=0;
|
|
|
|
|
private BlogAdapter recommendAdapter = new BlogAdapter();
|
|
|
|
|
private List<Blog> recommendBlog = new ArrayList<>();
|
|
|
|
|
private RecyclerView recommendRecyclerView;
|
|
|
|
|
private boolean isPause = false;
|
|
|
|
|
public InvitationChannelFragment() {
|
|
|
|
|
// Required empty public constructor
|
|
|
|
|
}
|
|
|
|
@ -74,9 +69,6 @@ public class InvitationChannelFragment extends Fragment {
|
|
|
|
|
args.putString(ARG_CATEGORY_TITLE, invitationCategoryTitle);
|
|
|
|
|
args.putInt(ARG_CATEGORY_TITLE_NUM, pos);
|
|
|
|
|
fragment.setArguments(args);
|
|
|
|
|
// blogList=getBlogList();
|
|
|
|
|
// resourceList=getResourceList();
|
|
|
|
|
// Log.e("newInstance","newInstance");
|
|
|
|
|
return fragment;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -86,7 +78,6 @@ public class InvitationChannelFragment extends Fragment {
|
|
|
|
|
try {
|
|
|
|
|
invitationCategoryTitle = (String) getArguments().getString(ARG_CATEGORY_TITLE);
|
|
|
|
|
invitationCategoryTitleNum = getArguments().getInt(ARG_CATEGORY_TITLE_NUM);
|
|
|
|
|
// Log.e("onCreate","onCreate");
|
|
|
|
|
} catch (java.lang.NullPointerException e) {
|
|
|
|
|
System.out.println("TesFragment getArg error!");
|
|
|
|
|
}
|
|
|
|
@ -98,8 +89,6 @@ public class InvitationChannelFragment extends Fragment {
|
|
|
|
|
Bundle savedInstanceState) {
|
|
|
|
|
View view;
|
|
|
|
|
view = inflater.inflate(R.layout.recyclerview, container, false);
|
|
|
|
|
// initAllBlog();// 所有blog组
|
|
|
|
|
// initAllBlogList(); //第一栏:全部项
|
|
|
|
|
questionAdapter = new QuestionAdapter();
|
|
|
|
|
questionAdapter.setContext(getContext());
|
|
|
|
|
questionAdapter.setQuestionList(allQuestion);
|
|
|
|
@ -110,6 +99,9 @@ public class InvitationChannelFragment extends Fragment {
|
|
|
|
|
recAdapter = new BlogAdapter();
|
|
|
|
|
recAdapter.setRecnewsList(recBlog);
|
|
|
|
|
|
|
|
|
|
recommendAdapter = new BlogAdapter(recommendBlog);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (invitationCategoryTitleNum == 0) {
|
|
|
|
|
view = inflater.inflate(R.layout.recyclerview, container, false);
|
|
|
|
|
allRecyclerView = (RecyclerView) view.findViewById(R.id.list_community);
|
|
|
|
@ -117,23 +109,16 @@ public class InvitationChannelFragment extends Fragment {
|
|
|
|
|
allRecyclerView.setLayoutManager(layoutManager);
|
|
|
|
|
BlogAdapter allAdapter = new BlogAdapter(allBlog);
|
|
|
|
|
allRecyclerView.setAdapter(allAdapter);
|
|
|
|
|
// initAllBlogList();
|
|
|
|
|
Map<String, String[]> paramMap = new HashMap<String, String[]>();
|
|
|
|
|
paramMap.put("channelList", new String[]{"全部"});
|
|
|
|
|
getAllBlogListRequest(paramMap);
|
|
|
|
|
// allAdapter.notifyDataSetChanged();
|
|
|
|
|
} else if (invitationCategoryTitleNum == 4) {
|
|
|
|
|
} else if (invitationCategoryTitleNum == 5) {
|
|
|
|
|
questionRecyclerView = (RecyclerView) view.findViewById(R.id.list_community);
|
|
|
|
|
LinearLayoutManager layoutManager = new LinearLayoutManager(getActivity());
|
|
|
|
|
questionRecyclerView.setLayoutManager(layoutManager);
|
|
|
|
|
questionRecyclerView.setAdapter(questionAdapter);
|
|
|
|
|
// Map<String, String[]> paramMap = new HashMap<>();
|
|
|
|
|
// paramMap.put("channelList", new String[]{"问答"});
|
|
|
|
|
getQuestionListRequest();
|
|
|
|
|
|
|
|
|
|
// Log.e("应该为4:问答", String.valueOf(invitationCategoryTitleNum));
|
|
|
|
|
|
|
|
|
|
} else if (invitationCategoryTitleNum == 2) {
|
|
|
|
|
} else if (invitationCategoryTitleNum == 3) {
|
|
|
|
|
recRecyclerView = (RecyclerView) view.findViewById(R.id.list_community);
|
|
|
|
|
LinearLayoutManager layoutManager = new LinearLayoutManager(getActivity());
|
|
|
|
|
recRecyclerView.setLayoutManager(layoutManager);
|
|
|
|
@ -141,9 +126,7 @@ public class InvitationChannelFragment extends Fragment {
|
|
|
|
|
Map<String, String[]> paramMap = new HashMap<String, String[]>();
|
|
|
|
|
paramMap.put("channelList", new String[]{"康复"});
|
|
|
|
|
getRecInvitationRequest(paramMap);
|
|
|
|
|
// Log.e("应该为2:康复", String.valueOf(invitationCategoryTitleNum));
|
|
|
|
|
// Log.e("应该为2:康复数据",String.valueOf(recBlog));
|
|
|
|
|
} else if (invitationCategoryTitleNum == 3) {
|
|
|
|
|
} else if (invitationCategoryTitleNum == 4) {
|
|
|
|
|
badRecyclerView = (RecyclerView) view.findViewById(R.id.list_community);
|
|
|
|
|
LinearLayoutManager layoutManager = new LinearLayoutManager(getActivity());
|
|
|
|
|
badRecyclerView.setLayoutManager(layoutManager);
|
|
|
|
@ -151,8 +134,7 @@ public class InvitationChannelFragment extends Fragment {
|
|
|
|
|
Map<String, String[]> paramMap = new HashMap<String, String[]>();
|
|
|
|
|
paramMap.put("channelList", new String[]{"扫雷"});
|
|
|
|
|
getBadListRequest(paramMap);
|
|
|
|
|
// Log.e("应该为3:扫雷", String.valueOf(invitationCategoryTitleNum));
|
|
|
|
|
} else if (invitationCategoryTitleNum == 1) {
|
|
|
|
|
} else if (invitationCategoryTitleNum == 2) {
|
|
|
|
|
expRecyclerView = (RecyclerView) view.findViewById(R.id.list_community);
|
|
|
|
|
LinearLayoutManager layoutManager = new LinearLayoutManager(getActivity());
|
|
|
|
|
expRecyclerView.setLayoutManager(layoutManager);
|
|
|
|
@ -160,17 +142,50 @@ public class InvitationChannelFragment extends Fragment {
|
|
|
|
|
Map<String, String[]> paramMap = new HashMap<String, String[]>();
|
|
|
|
|
paramMap.put("channelList", new String[]{"经验"});
|
|
|
|
|
getExpListRequest(paramMap);
|
|
|
|
|
} else if(invitationCategoryTitleNum == 1){
|
|
|
|
|
recommendRecyclerView = view.findViewById(R.id.list_community);
|
|
|
|
|
LinearLayoutManager layoutManager = new LinearLayoutManager(getActivity());
|
|
|
|
|
recommendRecyclerView.setLayoutManager(layoutManager);
|
|
|
|
|
recommendRecyclerView.setAdapter(recommendAdapter);
|
|
|
|
|
getRecommendBlog();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// temp=temp+1;
|
|
|
|
|
return view;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void initAllBlogList() {
|
|
|
|
|
Map<String, String[]> paramMap = new HashMap<String, String[]>();
|
|
|
|
|
paramMap.put("channelList", new String[]{"全部"});
|
|
|
|
|
getAllBlogListRequest(paramMap);
|
|
|
|
|
getQuestionListRequest();
|
|
|
|
|
private void getRecommendBlog() {
|
|
|
|
|
new Thread(new Runnable() {
|
|
|
|
|
@Override
|
|
|
|
|
public void run() {
|
|
|
|
|
try {
|
|
|
|
|
String url = BaseActivity.SERVER_URL + "/blog-servlet?action=getRecommendBlog&iduser="+BaseActivity.owner.getNetId();
|
|
|
|
|
OkHttpUtil.asyGet(url, new Callback() {
|
|
|
|
|
@Override
|
|
|
|
|
public void onFailure(Call call, IOException e) {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void onResponse(Call call, Response response) throws IOException {
|
|
|
|
|
String jsonStr = response.body().string();
|
|
|
|
|
Log.e("帖子推荐",jsonStr);
|
|
|
|
|
Gson gson = new Gson();
|
|
|
|
|
recommendBlog = gson.fromJson(jsonStr, new TypeToken<List<Blog>>(){}.getType());
|
|
|
|
|
getActivity().runOnUiThread(new Runnable(){
|
|
|
|
|
@Override
|
|
|
|
|
public void run() {
|
|
|
|
|
recommendAdapter = new BlogAdapter(recommendBlog);
|
|
|
|
|
recommendRecyclerView.setAdapter(recommendAdapter);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}).start();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void getQuestionListRequest() {
|
|
|
|
@ -284,46 +299,16 @@ public class InvitationChannelFragment extends Fragment {
|
|
|
|
|
Gson gson = new Gson();
|
|
|
|
|
Type listType = new TypeToken<List<List<Blog>>>() {
|
|
|
|
|
}.getType();
|
|
|
|
|
// Log.e("AllBlogList:jsonStr",jsonStr);
|
|
|
|
|
List<Blog> lists = gson.fromJson(jsonStr, listType);
|
|
|
|
|
// List<Blog> allBlogList=new ArrayList<>();
|
|
|
|
|
lists = (List<Blog>) lists.get(0);
|
|
|
|
|
allBlog = lists;
|
|
|
|
|
// Log.e("allBlog的数据",String.valueOf(lists));
|
|
|
|
|
BlogAdapter allAdapter = new BlogAdapter(allBlog);
|
|
|
|
|
allRecyclerView.setAdapter(allAdapter);
|
|
|
|
|
//
|
|
|
|
|
// if(allAdapter==null)
|
|
|
|
|
// Log.e("allAdapter","allAdapter is null");
|
|
|
|
|
// if(allRecyclerView==null)
|
|
|
|
|
// Log.e("allRecyclerView1","allRecyclerView1 is null");
|
|
|
|
|
// allRecyclerView= (RecyclerView) (getActivity().getLayoutInflater().inflate(R.layout.recyclerview, null)).findViewById(R.id.list_community);
|
|
|
|
|
// if(allRecyclerView==null)
|
|
|
|
|
// Log.e("allRecyclerView2","allRecyclerView2 is null");
|
|
|
|
|
// allRecyclerView.setAdapter(allAdapter);
|
|
|
|
|
//// InvitationChannelFragment.allBlog=allBlogList;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void initAllBlog() {
|
|
|
|
|
Map<String, String[]> paramMap_bad = new HashMap<String, String[]>();
|
|
|
|
|
Map<String, String[]> paramMap_rec = new HashMap<String, String[]>();
|
|
|
|
|
Map<String, String[]> paramMap_exp = new HashMap<String, String[]>();
|
|
|
|
|
Map<String, String[]> paramMap_all = new HashMap<String, String[]>();
|
|
|
|
|
Map<String, String[]> paramMap = new HashMap<String, String[]>();
|
|
|
|
|
|
|
|
|
|
// paramMap.put("channelList",java.util.Arrays.copyOf(channelList,1));
|
|
|
|
|
paramMap_rec.put("channelList", new String[]{"康复"});
|
|
|
|
|
paramMap_bad.put("channelList", new String[]{"扫雷"});
|
|
|
|
|
paramMap_exp.put("channelList", new String[]{"经验"});
|
|
|
|
|
|
|
|
|
|
getExpListRequest(paramMap_exp);
|
|
|
|
|
getBadListRequest(paramMap_bad);
|
|
|
|
|
getRecInvitationRequest(paramMap_rec);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void getRecInvitationRequest(final Map paramMap) {
|
|
|
|
|
new Thread(new Runnable() {
|
|
|
|
|
@Override
|
|
|
|
@ -333,7 +318,6 @@ public class InvitationChannelFragment extends Fragment {
|
|
|
|
|
OkHttpUtil.asyPost(url, paramMap, new Callback() {
|
|
|
|
|
@Override
|
|
|
|
|
public void onFailure(Call call, IOException e) {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@ -349,53 +333,21 @@ public class InvitationChannelFragment extends Fragment {
|
|
|
|
|
}).start();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void getInvitationRequest(final Map paramMap, final Map paramMap_bad,
|
|
|
|
|
final Map paramMap_rec, final Map paramMap_exp) {
|
|
|
|
|
new Thread(new Runnable() {
|
|
|
|
|
@Override
|
|
|
|
|
public void run() {
|
|
|
|
|
try {
|
|
|
|
|
String url1 = BaseActivity.SERVER_URL + "/blog-servlet?action=get-invitation";
|
|
|
|
|
String url2 = BaseActivity.SERVER_URL + "/question-servlet?action=get-allQuestion";
|
|
|
|
|
// String jsonStr1= OkHttpUtil.synPost(url1, paramMap);换为异步
|
|
|
|
|
// String jsonStr2= OkHttpUtil.synPost(url2, null);换为异步
|
|
|
|
|
// String jsonStr_rec= OkHttpUtil.synPost(url1, paramMap_rec);
|
|
|
|
|
// String jsonStr_bad= OkHttpUtil.synPost(url1, paramMap_bad);
|
|
|
|
|
// String jsonStr_exp= OkHttpUtil.synPost(url1, paramMap_exp);
|
|
|
|
|
// Log.e("getInvitationRequest","getInvitationRequest");
|
|
|
|
|
// getInvitationResponse(jsonStr1);
|
|
|
|
|
// getQuestionResponse(jsonStr2);
|
|
|
|
|
// getRecInvitationResponse(jsonStr_rec);
|
|
|
|
|
// getBadInvitationResponse(jsonStr_bad);
|
|
|
|
|
// getExpInvitationResponse(jsonStr_exp);
|
|
|
|
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}).start();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void getBadInvitationResponse(final String jsonStr) {
|
|
|
|
|
getActivity().runOnUiThread(new Runnable() {
|
|
|
|
|
@RequiresApi(api = Build.VERSION_CODES.O)
|
|
|
|
|
@Override
|
|
|
|
|
public void run() {
|
|
|
|
|
// Log.e("jsonStr",jsonStr);
|
|
|
|
|
Gson gson = new Gson(); // 使用 gson 库解析 JSON 数据
|
|
|
|
|
// 创建一个 TypeToken 的匿名子类对象,并调用对象的 getType()方法
|
|
|
|
|
Type listType = new TypeToken<List<List<Blog>>>() {
|
|
|
|
|
}.getType();
|
|
|
|
|
// Log.e("jsonStr",jsonStr);
|
|
|
|
|
List<List<Blog>> lists = gson.fromJson(jsonStr, listType);
|
|
|
|
|
|
|
|
|
|
List<Blog> badBlogList = new ArrayList<>();
|
|
|
|
|
badBlogList = (List<Blog>) lists.get(0);
|
|
|
|
|
badBlog = badBlogList;
|
|
|
|
|
BlogAdapter badAdapter = new BlogAdapter();
|
|
|
|
|
badAdapter.setRecnewsList(badBlog);
|
|
|
|
|
badRecyclerView.setAdapter(badAdapter);
|
|
|
|
|
// Log.e("badBlog",String.valueOf(badBlogList));
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
@ -406,12 +358,9 @@ public class InvitationChannelFragment extends Fragment {
|
|
|
|
|
@RequiresApi(api = Build.VERSION_CODES.O)
|
|
|
|
|
@Override
|
|
|
|
|
public void run() {
|
|
|
|
|
// Log.e("jsonStr",jsonStr);
|
|
|
|
|
Gson gson = new Gson(); // 使用 gson 库解析 JSON 数据
|
|
|
|
|
// 创建一个 TypeToken 的匿名子类对象,并调用对象的 getType()方法
|
|
|
|
|
Type listType = new TypeToken<List<List<Blog>>>() {
|
|
|
|
|
}.getType();
|
|
|
|
|
// Log.e("jsonStr",jsonStr);
|
|
|
|
|
List<List<Blog>> lists = gson.fromJson(jsonStr, listType);
|
|
|
|
|
|
|
|
|
|
List<Blog> recBlogList = new ArrayList<>();
|
|
|
|
@ -420,7 +369,6 @@ public class InvitationChannelFragment extends Fragment {
|
|
|
|
|
BlogAdapter recAdapter = new BlogAdapter();
|
|
|
|
|
recAdapter.setRecnewsList(recBlog);
|
|
|
|
|
recRecyclerView.setAdapter(recAdapter);
|
|
|
|
|
// Log.e("recBlog的数据",String.valueOf(recBlogList));
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
@ -432,16 +380,13 @@ public class InvitationChannelFragment extends Fragment {
|
|
|
|
|
public void run() {
|
|
|
|
|
Log.e("jsonStr", jsonStr);
|
|
|
|
|
Gson gson = new Gson(); // 使用 gson 库解析 JSON 数据
|
|
|
|
|
// 创建一个 TypeToken 的匿名子类对象,并调用对象的 getType()方法
|
|
|
|
|
Type listType = new TypeToken<List<List<Blog>>>() {
|
|
|
|
|
}.getType();
|
|
|
|
|
// Log.e("jsonStr",jsonStr);
|
|
|
|
|
List<List<Blog>> lists = gson.fromJson(jsonStr, listType);
|
|
|
|
|
|
|
|
|
|
List<Blog> expBlogList = new ArrayList<>();
|
|
|
|
|
expBlogList = (List<Blog>) lists.get(0);
|
|
|
|
|
expBlog = expBlogList;
|
|
|
|
|
// Log.e("expBlog的数据",String.valueOf(expBlogList));
|
|
|
|
|
BlogAdapter expAdapter = new BlogAdapter();
|
|
|
|
|
expAdapter.setRecnewsList(expBlog);
|
|
|
|
|
expRecyclerView.setAdapter(expAdapter);
|
|
|
|
@ -455,8 +400,6 @@ public class InvitationChannelFragment extends Fragment {
|
|
|
|
|
@Override
|
|
|
|
|
public void run() {
|
|
|
|
|
Gson gson = new Gson(); // 使用 gson 库解析 JSON 数据
|
|
|
|
|
// 创建一个 TypeToken 的匿名子类对象,并调用对象的 getType()方法
|
|
|
|
|
// Log.e("questionListStr",jsonStr);
|
|
|
|
|
Type listType = new TypeToken<List<Question>>() {
|
|
|
|
|
}.getType();
|
|
|
|
|
List<Question> questionList = gson.fromJson(jsonStr, listType);
|
|
|
|
@ -486,32 +429,36 @@ public class InvitationChannelFragment extends Fragment {
|
|
|
|
|
getAllBlogListRequest(paramMap);
|
|
|
|
|
BlogAdapter allAdapter = new BlogAdapter(allBlog);
|
|
|
|
|
allRecyclerView.setAdapter(allAdapter);
|
|
|
|
|
}else if(invitationCategoryTitleNum == 4) {
|
|
|
|
|
} else if (invitationCategoryTitleNum == 5) {
|
|
|
|
|
getQuestionListRequest();
|
|
|
|
|
QuestionAdapter questionAdapter = new QuestionAdapter(allQuestion, getContext());
|
|
|
|
|
questionAdapter.setContext(getContext());
|
|
|
|
|
questionRecyclerView.setAdapter(questionAdapter);
|
|
|
|
|
}else if(invitationCategoryTitleNum == 2) {
|
|
|
|
|
} else if (invitationCategoryTitleNum == 3) {
|
|
|
|
|
Map<String, String[]> paramMap = new HashMap<String, String[]>();
|
|
|
|
|
paramMap = new HashMap<String, String[]>();
|
|
|
|
|
paramMap.put("channelList", new String[]{"康复"});
|
|
|
|
|
getRecInvitationRequest(paramMap);
|
|
|
|
|
BlogAdapter recAdapter = new BlogAdapter(recBlog);
|
|
|
|
|
recRecyclerView.setAdapter(recAdapter);
|
|
|
|
|
}else if(invitationCategoryTitleNum == 3) {
|
|
|
|
|
} else if (invitationCategoryTitleNum == 4) {
|
|
|
|
|
Map<String, String[]> paramMap = new HashMap<String, String[]>();
|
|
|
|
|
paramMap = new HashMap<String, String[]>();
|
|
|
|
|
paramMap.put("channelList", new String[]{"扫雷"});
|
|
|
|
|
getBadListRequest(paramMap);
|
|
|
|
|
BlogAdapter badAdapter = new BlogAdapter(badBlog);
|
|
|
|
|
badRecyclerView.setAdapter(badAdapter);
|
|
|
|
|
}else if(invitationCategoryTitleNum == 1) {
|
|
|
|
|
} else if (invitationCategoryTitleNum == 2) {
|
|
|
|
|
Map<String, String[]> paramMap = new HashMap<String, String[]>();
|
|
|
|
|
paramMap = new HashMap<String, String[]>();
|
|
|
|
|
paramMap.put("channelList", new String[]{"经验"});
|
|
|
|
|
getExpListRequest(paramMap);
|
|
|
|
|
BlogAdapter expAdapter = new BlogAdapter(expBlog);
|
|
|
|
|
expRecyclerView.setAdapter(expAdapter);
|
|
|
|
|
}else if(invitationCategoryTitleNum == 1){
|
|
|
|
|
getRecommendBlog();
|
|
|
|
|
BlogAdapter recommendAdapter = new BlogAdapter();
|
|
|
|
|
recommendRecyclerView.setAdapter(recommendAdapter);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|