Commit 68baa86db1480ccafc84433b6b0788c8585aaa8c
1 parent
e80f77fb
Exists in
yxb_dev
and in
2 other branches
no message
Showing
2 changed files
with
20 additions
and
21 deletions
Show diff stats
app/src/main/java/com/shunzhi/parent/presenter/consult/consultone/ConsultOnePresenter.java
| ... | ... | @@ -64,7 +64,6 @@ public class ConsultOnePresenter extends ConsultOneContract.ConsultOnePresenter{ |
| 64 | 64 | mRxManager.register(mIModel.getBanners(position,areaName).subscribe(new Consumer<JsonObject>() { |
| 65 | 65 | @Override |
| 66 | 66 | public void accept(JsonObject jsonObject) throws Exception { |
| 67 | - Log.d("66666","getBanners="+jsonObject); | |
| 68 | 67 | if (jsonObject.get("status").getAsString().equals("1")){ |
| 69 | 68 | JsonArray jsonArray=jsonObject.getAsJsonArray("data"); |
| 70 | 69 | List<GuangGaoBean> guangGaoBeanList=new ArrayList<>(); | ... | ... |
app/src/main/java/com/shunzhi/parent/ui/fragment/consult/ConsultOneLevelFragment.java
| ... | ... | @@ -68,25 +68,6 @@ public class ConsultOneLevelFragment extends BaseMVPCompatFragment<ConsultOneCon |
| 68 | 68 | initViews(view); |
| 69 | 69 | } |
| 70 | 70 | |
| 71 | - private void initRecyclerView(List<GuangGaoBean> guangGaoBeanList) { | |
| 72 | - | |
| 73 | - if (null == myGrallyAdapter) myGrallyAdapter = new MyGrallyAdapter(); | |
| 74 | - myGrallyAdapter.addAll(guangGaoBeanList); | |
| 75 | - recyclerViewGrally.setAdapter(myGrallyAdapter); | |
| 76 | - recyclerViewGrally.addOnScrollListener(new RecyclerView.OnScrollListener() { | |
| 77 | - @Override | |
| 78 | - public void onScrollStateChanged(RecyclerView recyclerView, int newState) { | |
| 79 | - super.onScrollStateChanged(recyclerView, newState); | |
| 80 | - } | |
| 81 | - | |
| 82 | - @Override | |
| 83 | - public void onScrolled(RecyclerView recyclerView, int dx, int dy) { | |
| 84 | - super.onScrolled(recyclerView, dx, dy); | |
| 85 | - } | |
| 86 | - }); | |
| 87 | - | |
| 88 | - } | |
| 89 | - | |
| 90 | 71 | private void initViews(View view) { |
| 91 | 72 | channel = getArguments().getString("channel"); |
| 92 | 73 | layout_control = view.findViewById(R.id.layout_control); |
| ... | ... | @@ -146,6 +127,25 @@ public class ConsultOneLevelFragment extends BaseMVPCompatFragment<ConsultOneCon |
| 146 | 127 | initRecyclerView(guangGaoBeanList); |
| 147 | 128 | } |
| 148 | 129 | |
| 130 | + private void initRecyclerView(List<GuangGaoBean> guangGaoBeanList) { | |
| 131 | + | |
| 132 | + if (null == myGrallyAdapter) myGrallyAdapter = new MyGrallyAdapter(); | |
| 133 | + myGrallyAdapter.addAll(guangGaoBeanList); | |
| 134 | + recyclerViewGrally.setAdapter(myGrallyAdapter); | |
| 135 | + recyclerViewGrally.addOnScrollListener(new RecyclerView.OnScrollListener() { | |
| 136 | + @Override | |
| 137 | + public void onScrollStateChanged(RecyclerView recyclerView, int newState) { | |
| 138 | + super.onScrollStateChanged(recyclerView, newState); | |
| 139 | + } | |
| 140 | + | |
| 141 | + @Override | |
| 142 | + public void onScrolled(RecyclerView recyclerView, int dx, int dy) { | |
| 143 | + super.onScrolled(recyclerView, dx, dy); | |
| 144 | + } | |
| 145 | + }); | |
| 146 | + | |
| 147 | + } | |
| 148 | + | |
| 149 | 149 | @Override |
| 150 | 150 | public void showConsultContent(List<ChannelContextBean> list) { |
| 151 | 151 | myConsultBeanList.addAll(list); |
| ... | ... | @@ -216,7 +216,7 @@ public class ConsultOneLevelFragment extends BaseMVPCompatFragment<ConsultOneCon |
| 216 | 216 | |
| 217 | 217 | @Override |
| 218 | 218 | public void onBindViewHolder(GuangGaoBean object, int position) { |
| 219 | - Glide.with(getActivity()).load(AppConfig.BASE_URL_IMG + object.fileSrc).error(R.drawable.ic_launcher_foreground).into(iv_grally); | |
| 219 | + Glide.with(getActivity()).load(AppConfig.BASE_URL_FILE + object.fileSrc).error(R.drawable.ic_launcher_foreground).into(iv_grally); | |
| 220 | 220 | tv_grally_title.setText(object.describe + ""); |
| 221 | 221 | } |
| 222 | 222 | } | ... | ... |