diff --git a/model_zoo/official/lite/MindSpore_inhand/app/src/main/java/com/mindspore/himindspore/ui/gateway/CaseFragment.java b/model_zoo/official/lite/MindSpore_inhand/app/src/main/java/com/mindspore/himindspore/ui/gateway/CaseFragment.java index 275c10744c13b9c295dcaabf69ec4e8941a438b5..3e4182266eb9d7437df9277996b022a383317901 100644 --- a/model_zoo/official/lite/MindSpore_inhand/app/src/main/java/com/mindspore/himindspore/ui/gateway/CaseFragment.java +++ b/model_zoo/official/lite/MindSpore_inhand/app/src/main/java/com/mindspore/himindspore/ui/gateway/CaseFragment.java @@ -127,7 +127,7 @@ public class CaseFragment extends BaseFragment implements Gat @Override public void onRefresh(@NonNull @NotNull RefreshLayout refreshLayout) { - pageIndex = 1; + mList.clear(); isRefresh = true; presenter.requestGateMainData(pageIndex, pageSize, type); } diff --git a/model_zoo/official/lite/MindSpore_inhand/app/src/main/java/com/mindspore/himindspore/ui/gateway/ContentDetailActivity.java b/model_zoo/official/lite/MindSpore_inhand/app/src/main/java/com/mindspore/himindspore/ui/gateway/ContentDetailActivity.java index c0142dd07b4539b0dde87e9afe8eb04513cce33e..e33939b975bcd6b7eb691378cc34e44f3bc7cacf 100644 --- a/model_zoo/official/lite/MindSpore_inhand/app/src/main/java/com/mindspore/himindspore/ui/gateway/ContentDetailActivity.java +++ b/model_zoo/official/lite/MindSpore_inhand/app/src/main/java/com/mindspore/himindspore/ui/gateway/ContentDetailActivity.java @@ -2,6 +2,7 @@ package com.mindspore.himindspore.ui.gateway; import android.app.Activity; import android.content.Intent; +import android.util.Log; import android.view.View; import android.view.WindowManager; import android.widget.EditText; @@ -67,6 +68,7 @@ public class ContentDetailActivity extends BaseActivity imp recyclerView = findViewById(R.id.recyclerView); EditText mComEdit = findViewById(R.id.com_edit); mComEdit.setShowSoftInputOnFocus(false); + mComEdit.setOnClickListener(this); multipleStatusView = findViewById(R.id.multipleStatusView); presenter.requestTrendDetialData(id); @@ -183,6 +185,7 @@ public class ContentDetailActivity extends BaseActivity imp case R.id.com_favorites_image: case R.id.com_likes_image: case R.id.com_share: + case R.id.com_edit: MyToast.FunctionNoOpen(); break; default: diff --git a/model_zoo/official/lite/MindSpore_inhand/app/src/main/java/com/mindspore/himindspore/ui/gateway/IntroduceFragment.java b/model_zoo/official/lite/MindSpore_inhand/app/src/main/java/com/mindspore/himindspore/ui/gateway/IntroduceFragment.java index b8b9ee1d198fd5050ad1aab002785d9ba6051dff..1de4f625032e6741af83d3404910324d64d3b6eb 100644 --- a/model_zoo/official/lite/MindSpore_inhand/app/src/main/java/com/mindspore/himindspore/ui/gateway/IntroduceFragment.java +++ b/model_zoo/official/lite/MindSpore_inhand/app/src/main/java/com/mindspore/himindspore/ui/gateway/IntroduceFragment.java @@ -16,6 +16,7 @@ package com.mindspore.himindspore.ui.gateway; import android.os.Bundle; +import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -39,6 +40,9 @@ import com.mindspore.himindspore.ui.gateway.adapter.IntroduceCoreAdapter; import com.mindspore.himindspore.ui.gateway.mvp.GateContract; import com.mindspore.himindspore.ui.gateway.mvp.GateListPresenter; import com.scwang.smart.refresh.layout.SmartRefreshLayout; +import com.scwang.smart.refresh.layout.api.RefreshLayout; +import com.scwang.smart.refresh.layout.listener.OnRefreshListener; +import com.scwang.smart.refresh.layout.listener.OnRefreshLoadMoreListener; import java.util.ArrayList; import java.util.List; @@ -100,11 +104,12 @@ public class IntroduceFragment extends BaseFragment implement private void initDatas() { smartRefreshLayout.setFooterHeight(0); smartRefreshLayout.setEnableRefresh(true); + smartRefreshLayout.setEnableLoadMore(true); smartRefreshLayout.setEnableHeaderTranslationContent(true); smartRefreshLayout.setOnRefreshListener(refreshLayout -> { isRefresh = true; mList.clear(); - presenter.requestGateMainData(pageIndex, pageSize,type); + presenter.requestGateMainData(pageIndex, pageSize, type); }); layoutManager = new VirtualLayoutManager(getActivity()); @@ -126,7 +131,7 @@ public class IntroduceFragment extends BaseFragment implement GateMainBean.EntitiesBean bean = mList.get(i); if ("BANNER".equalsIgnoreCase(bean.getType())) { bannerList.add(bean); - } else if ("MODULE".equalsIgnoreCase( bean.getType())) { + } else if ("MODULE".equalsIgnoreCase(bean.getType())) { strackList.add(bean); } else if ("CORE".equalsIgnoreCase(bean.getType())) { coreList.add(bean); @@ -139,13 +144,10 @@ public class IntroduceFragment extends BaseFragment implement IntroduceBannerAdapter bannerAdapter = new IntroduceBannerAdapter(getActivity(), singleLayoutHelper, bannerList); delegateAdapter.addAdapter(bannerAdapter); - viewPool.setMaxRecycledViews(itemType++, mList.size()); SingleLayoutHelper horizontalListLayoutHelper = new SingleLayoutHelper(); IntroduceComponentAdapter introduceComponentAdapter = new IntroduceComponentAdapter(getActivity(), horizontalListLayoutHelper, strackList); delegateAdapter.addAdapter(introduceComponentAdapter); - - viewPool.setMaxRecycledViews(itemType++, mList.size()); SingleLayoutHelper horizontalListLayoutHelper2 = new SingleLayoutHelper(); IntroduceCoreAdapter introduceCoreAdapter = new IntroduceCoreAdapter(getActivity(), horizontalListLayoutHelper2, coreList); delegateAdapter.addAdapter(introduceCoreAdapter); @@ -155,7 +157,7 @@ public class IntroduceFragment extends BaseFragment implement @Override protected void lazyInit() { mList.clear(); - presenter.requestGateMainData(pageIndex, pageSize,type); + presenter.requestGateMainData(pageIndex, pageSize, type); } @Override @@ -175,8 +177,9 @@ public class IntroduceFragment extends BaseFragment implement @Override public void getResponseData(BaseResponseBean baseBean) { this.gateMainBean = baseBean.getData(); + Log.e("jiagouzhanshi", gateMainBean.toString()); multipleStatusView.showContent(); - + delegateAdapter.clear(); if (gateMainBean.getNumber() == 0) { mList.clear(); mList.addAll(gateMainBean.getEntities()); diff --git a/model_zoo/official/lite/MindSpore_inhand/app/src/main/java/com/mindspore/himindspore/ui/gateway/TrendFragment.java b/model_zoo/official/lite/MindSpore_inhand/app/src/main/java/com/mindspore/himindspore/ui/gateway/TrendFragment.java index 00584c0e412138a1abf1b693c3798c75556440b7..77651f9e9992dbf774c86ebba104e1a379a9e230 100644 --- a/model_zoo/official/lite/MindSpore_inhand/app/src/main/java/com/mindspore/himindspore/ui/gateway/TrendFragment.java +++ b/model_zoo/official/lite/MindSpore_inhand/app/src/main/java/com/mindspore/himindspore/ui/gateway/TrendFragment.java @@ -129,7 +129,7 @@ public class TrendFragment extends BaseFragment implements Ga @Override public void onRefresh(@NonNull @NotNull RefreshLayout refreshLayout) { - pageIndex = 1; + mList.clear(); isRefresh = true; presenter.requestGateMainData(pageIndex, pageSize, type); } diff --git a/model_zoo/official/lite/MindSpore_inhand/app/src/main/java/com/mindspore/himindspore/ui/gateway/adapter/IntroduceComponentAdapter.java b/model_zoo/official/lite/MindSpore_inhand/app/src/main/java/com/mindspore/himindspore/ui/gateway/adapter/IntroduceComponentAdapter.java index c066308ed365a77ccddc7ad02519f78b9c058be6..750d817ff0de2ca26dea7166fad94330bf3f871b 100644 --- a/model_zoo/official/lite/MindSpore_inhand/app/src/main/java/com/mindspore/himindspore/ui/gateway/adapter/IntroduceComponentAdapter.java +++ b/model_zoo/official/lite/MindSpore_inhand/app/src/main/java/com/mindspore/himindspore/ui/gateway/adapter/IntroduceComponentAdapter.java @@ -61,7 +61,6 @@ public class IntroduceComponentAdapter extends DelegateAdapter.Adapter MyToast.MakeText("功能还未放开",800)); } @Override diff --git a/model_zoo/official/lite/MindSpore_inhand/app/src/main/java/com/mindspore/himindspore/ui/gateway/adapter/IntroduceCoreAdapter.java b/model_zoo/official/lite/MindSpore_inhand/app/src/main/java/com/mindspore/himindspore/ui/gateway/adapter/IntroduceCoreAdapter.java index f7043cbb694e45a3cb411e9983b3033948644667..c279774c5bfe93e560645216741a5cd73556e1eb 100644 --- a/model_zoo/official/lite/MindSpore_inhand/app/src/main/java/com/mindspore/himindspore/ui/gateway/adapter/IntroduceCoreAdapter.java +++ b/model_zoo/official/lite/MindSpore_inhand/app/src/main/java/com/mindspore/himindspore/ui/gateway/adapter/IntroduceCoreAdapter.java @@ -68,7 +68,6 @@ public class IntroduceCoreAdapter extends DelegateAdapter.Adapter MyToast.MakeText("功能还未放开", 800)); } @@ -123,13 +122,11 @@ public class IntroduceCoreAdapter extends DelegateAdapter.Adapter - -