- * See the Android Training lesson Communicating with Other Fragments for more information.
- */
- public interface OnFragmentInteractionListener {
- // TODO: Update argument type and name
- void onFragmentInteraction(Uri uri);
- }
-}
diff --git a/Code/LeudaemiaLikeMe/app/src/main/java/com/example/leudaemialikeme/Fragment/CommunityFragment.java b/Code/LeudaemiaLikeMe/app/src/main/java/com/example/leudaemialikeme/Fragment/CommunityFragment.java
index ef78696..9dbb8d0 100644
--- a/Code/LeudaemiaLikeMe/app/src/main/java/com/example/leudaemialikeme/Fragment/CommunityFragment.java
+++ b/Code/LeudaemiaLikeMe/app/src/main/java/com/example/leudaemialikeme/Fragment/CommunityFragment.java
@@ -21,7 +21,6 @@ import androidx.fragment.app.FragmentManager;
import androidx.viewpager.widget.ViewPager;
import com.example.leudaemialikeme.Activity.BlogSearchActivity;
-import com.example.leudaemialikeme.Activity.GoAnswerActivity;
import com.example.leudaemialikeme.Activity.SendInvitationActivity;
import com.example.leudaemialikeme.Activity.SendQuestionActivity;
import com.example.leudaemialikeme.Adapter.InvitationPageFragmentAdapter;
@@ -44,7 +43,6 @@ public class CommunityFragment extends Fragment implements ViewPager.OnPageChang
private ImageButton tab_add;
private Button bar_send_invitation;
private Button bar_send_question;
- private Button bar_answer;
private LinearLayout blog_search;
static List
- * See the Android Training lesson Communicating with Other Fragments for more information.
- */
- public interface OnFragmentInteractionListener {
- // TODO: Update argument type and name
- void onFragmentInteraction(Uri uri);
- }
-}
diff --git a/Code/LeudaemiaLikeMe/app/src/main/java/com/example/leudaemialikeme/Fragment/IndexFragment.java b/Code/LeudaemiaLikeMe/app/src/main/java/com/example/leudaemialikeme/Fragment/IndexFragment.java
index ca8a75c..ed7bfae 100644
--- a/Code/LeudaemiaLikeMe/app/src/main/java/com/example/leudaemialikeme/Fragment/IndexFragment.java
+++ b/Code/LeudaemiaLikeMe/app/src/main/java/com/example/leudaemialikeme/Fragment/IndexFragment.java
@@ -2,7 +2,6 @@ package com.example.leudaemialikeme.Fragment;
import android.content.Intent;
import android.os.Bundle;
-import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@@ -36,6 +35,8 @@ import okhttp3.Call;
import okhttp3.Callback;
import okhttp3.Response;
+//import android.util.Log;
+
public class IndexFragment extends Fragment {
@@ -204,7 +205,6 @@ public class IndexFragment extends Fragment {
@Override
public void onResponse(Call call, Response response) throws IOException {
String jsonStr = response.body().string();//这里就调用InfoResponse响应
- Log.e("首页Info的json", jsonStr);
getInfoResponse(jsonStr);
}
@@ -226,9 +226,6 @@ public class IndexFragment extends Fragment {
}.getType();
// 把获取到的信息集合存到 newsList 中
newsLists = gson.fromJson(jsonStr, listType);
- Log.e("jsonStr", jsonStr);
- Log.e("object", String.valueOf(newsLists));
- Log.e("newsLists最后", String.valueOf(newsLists));
newsLists = gson.fromJson(jsonStr, listType);
adapter.setRecnewsList(newsLists);//这里设置数据源
recyclerView.setAdapter(adapter);
diff --git a/Code/LeudaemiaLikeMe/app/src/main/java/com/example/leudaemialikeme/Fragment/InvitationChannelFragment.java b/Code/LeudaemiaLikeMe/app/src/main/java/com/example/leudaemialikeme/Fragment/InvitationChannelFragment.java
index a7f5daa..9fb86b2 100644
--- a/Code/LeudaemiaLikeMe/app/src/main/java/com/example/leudaemialikeme/Fragment/InvitationChannelFragment.java
+++ b/Code/LeudaemiaLikeMe/app/src/main/java/com/example/leudaemialikeme/Fragment/InvitationChannelFragment.java
@@ -2,7 +2,6 @@ package com.example.leudaemialikeme.Fragment;
import android.os.Build;
import android.os.Bundle;
-import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@@ -168,7 +167,6 @@ public class InvitationChannelFragment extends Fragment {
@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
- * See the Android Training lesson Communicating with Other Fragments for more information.
- */
- public interface OnFragmentInteractionListener {
- // TODO: Update argument type and name
- void onFragmentInteraction(Uri uri);
- }
-}
diff --git a/Code/LeudaemiaLikeMe/app/src/main/java/com/example/leudaemialikeme/Fragment/QuestionHistoryFragment.java b/Code/LeudaemiaLikeMe/app/src/main/java/com/example/leudaemialikeme/Fragment/QuestionHistoryFragment.java
index 145256f..1741777 100644
--- a/Code/LeudaemiaLikeMe/app/src/main/java/com/example/leudaemialikeme/Fragment/QuestionHistoryFragment.java
+++ b/Code/LeudaemiaLikeMe/app/src/main/java/com/example/leudaemialikeme/Fragment/QuestionHistoryFragment.java
@@ -131,8 +131,13 @@ public class QuestionHistoryFragment extends Fragment {
if (message.equals("success")) {
List> resourceList=new ArrayList<>();
static List
>(){}.getType());
getActivity().runOnUiThread(new Runnable(){
@@ -378,7 +376,6 @@ 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 数据
Type listType = new TypeToken
>>() {
}.getType();
diff --git a/Code/LeudaemiaLikeMe/app/src/main/java/com/example/leudaemialikeme/Fragment/MessageChannelFragment.java b/Code/LeudaemiaLikeMe/app/src/main/java/com/example/leudaemialikeme/Fragment/MessageChannelFragment.java
index df08f27..a263559 100644
--- a/Code/LeudaemiaLikeMe/app/src/main/java/com/example/leudaemialikeme/Fragment/MessageChannelFragment.java
+++ b/Code/LeudaemiaLikeMe/app/src/main/java/com/example/leudaemialikeme/Fragment/MessageChannelFragment.java
@@ -26,7 +26,7 @@ public class MessageChannelFragment extends Fragment {
private TextView mTitleField;
private List
>(){}.getType());
questionAllList = questionList;
- HistoryQuestionAdapter adapter = new HistoryQuestionAdapter(questionAllList, getContext());//创建适配器
- recyclerView.setAdapter(adapter);
+ getActivity().runOnUiThread(new Runnable() {
+ @Override
+ public void run() {
+ HistoryQuestionAdapter adapter = new HistoryQuestionAdapter(questionAllList, getContext());//创建适配器
+ recyclerView.setAdapter(adapter);
+ }
+ });
}
}
};
diff --git a/Code/LeudaemiaLikeMe/app/src/main/res/layout/activity_blogdetail.xml b/Code/LeudaemiaLikeMe/app/src/main/res/layout/activity_blogdetail.xml
index 825f87e..d20d1e8 100644
--- a/Code/LeudaemiaLikeMe/app/src/main/res/layout/activity_blogdetail.xml
+++ b/Code/LeudaemiaLikeMe/app/src/main/res/layout/activity_blogdetail.xml
@@ -57,27 +57,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-