Commit 7c993489fe8822f5e8b66aa4897b8093d5666fc3
1 parent
8176e156
Exists in
yxb_dev
and in
2 other branches
no message
Showing
15 changed files
with
43 additions
and
36 deletions
 
Show diff stats
app/src/main/java/com/shunzhi/parent/adapter/MyConsultAdapter.java
| ... | ... | @@ -87,7 +87,7 @@ public class MyConsultAdapter extends BaseRecyclerViewAdapter<ChannelContextBean | 
| 87 | 87 | normal_content.setVisibility(View.VISIBLE); | 
| 88 | 88 | tvConsultTitle.setText(object.getTitle()); | 
| 89 | 89 | tvConsultContent.setText(object.getContent()); | 
| 90 | - tvPingLunNums.setText("评论:"+object.getTalkNum()+""); | |
| 90 | + tvPingLunNums.setText("浏览量:"+object.getLookNum()+""); | |
| 91 | 91 | tvZhuanFaNums.setText("转发:"+object.getForwardingNum()+""); | 
| 92 | 92 | GlideUtils.showImg(mContext,iv_consult,object.getImage()); | 
| 93 | 93 | normal_content.setOnClickListener(new View.OnClickListener() { | ... | ... | 
app/src/main/java/com/shunzhi/parent/bean/channel/ChannelContextBean.java
| ... | ... | @@ -16,7 +16,15 @@ public class ChannelContextBean implements Serializable{ | 
| 16 | 16 | private int talkNum; | 
| 17 | 17 | private int orderById; | 
| 18 | 18 | private int isAds; | 
| 19 | + private int lookNum; | |
| 19 | 20 | |
| 21 | + public int getLookNum() { | |
| 22 | + return lookNum; | |
| 23 | + } | |
| 24 | + | |
| 25 | + public void setLookNum(int lookNum) { | |
| 26 | + this.lookNum = lookNum; | |
| 27 | + } | |
| 20 | 28 | |
| 21 | 29 | public int getId() { | 
| 22 | 30 | return id; | 
| ... | ... | @@ -92,17 +100,18 @@ public class ChannelContextBean implements Serializable{ | 
| 92 | 100 | |
| 93 | 101 | @Override | 
| 94 | 102 | public String toString() { | 
| 95 | - return "ChannelContextBean:{" + | |
| 96 | - ",id='" + id + '\'' + | |
| 97 | - ",image='" + image + '\'' + | |
| 98 | - ",title='" + title + '\'' + | |
| 99 | - ",url='" + url + '\'' + | |
| 100 | - ",content='" + content + '\'' + | |
| 101 | - ",forwardingNum='" + forwardingNum + '\'' + | |
| 102 | - ",talkNum='" + talkNum + '\'' + | |
| 103 | - ",orderById='" + orderById + '\'' + | |
| 103 | + return "ChannelContextBean{" + | |
| 104 | + "id=" + id + | |
| 105 | + ", image='" + image + '\'' + | |
| 106 | + ", title='" + title + '\'' + | |
| 107 | + ", url='" + url + '\'' + | |
| 108 | + ", content='" + content + '\'' + | |
| 109 | + ", forwardingNum=" + forwardingNum + | |
| 110 | + ", talkNum=" + talkNum + | |
| 111 | + ", orderById=" + orderById + | |
| 104 | 112 | ", isAds=" + isAds + | 
| 105 | - "}"; | |
| 113 | + ", lookNum=" + lookNum + | |
| 114 | + '}'; | |
| 106 | 115 | } | 
| 107 | 116 | |
| 108 | 117 | } | ... | ... | 
app/src/main/java/com/shunzhi/parent/manager/MessageManager.java
| ... | ... | @@ -79,9 +79,9 @@ public class MessageManager { | 
| 79 | 79 | public void onEvent(StatusCode statusCode) { | 
| 80 | 80 | if (statusCode == StatusCode.KICKOUT) { | 
| 81 | 81 | Context context = AppContext.getInstance(); | 
| 82 | - Intent i = new Intent(context, LoginAndRegistActivity.class); | |
| 83 | - i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK); | |
| 84 | - context.startActivity(i); | |
| 82 | +// Intent i = new Intent(context, LoginAndRegistActivity.class); | |
| 83 | +// i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK); | |
| 84 | +// context.startActivity(i); | |
| 85 | 85 | } | 
| 86 | 86 | } | 
| 87 | 87 | }, true); | ... | ... | 
app/src/main/java/com/shunzhi/parent/ui/MainActivity.java
| ... | ... | @@ -103,13 +103,14 @@ public class MainActivity extends BaseCompatActivity implements PermissionUtils. | 
| 103 | 103 | if (index == i) fragmentTransaction.show(fragments[index]); | 
| 104 | 104 | else fragmentTransaction.hide(fragments[i]); | 
| 105 | 105 | } | 
| 106 | + if (index==CONSULT_INDEX)consultFragment.refresh(); | |
| 106 | 107 | fragmentTransaction.commit(); | 
| 107 | 108 | } | 
| 108 | 109 | |
| 109 | 110 | @Override | 
| 110 | 111 | protected void onNewIntent(Intent intent) { | 
| 111 | 112 | super.onNewIntent(intent); | 
| 112 | - handIntent(intent); | |
| 113 | +// handIntent(intent); | |
| 113 | 114 | } | 
| 114 | 115 | |
| 115 | 116 | private void handIntent(Intent intent) { | ... | ... | 
app/src/main/java/com/shunzhi/parent/ui/activity/orderdetail/OrderDetailActivity.java
| ... | ... | @@ -175,19 +175,19 @@ public class OrderDetailActivity extends BaseMVPCompatActivity<OrderDetailContra | 
| 175 | 175 | switch (object.payState){ | 
| 176 | 176 | case 0://待支付 | 
| 177 | 177 | tvPayState.setText("待支付"); | 
| 178 | - ivState.setBackgroundColor(getResources().getColor(R.color.md_red_500)); | |
| 178 | + ivState.setImageDrawable(getResources().getDrawable(R.drawable.order_wait)); | |
| 179 | 179 | break; | 
| 180 | 180 | case 1://支付成功 | 
| 181 | 181 | tvPayState.setText("支付成功"); | 
| 182 | - ivState.setImageDrawable(getResources().getDrawable(R.drawable.success)); | |
| 182 | + ivState.setImageDrawable(getResources().getDrawable(R.drawable.order_success)); | |
| 183 | 183 | break; | 
| 184 | 184 | case 2://交易关闭 | 
| 185 | 185 | tvPayState.setText("交易关闭"); | 
| 186 | - ivState.setBackgroundColor(getResources().getColor(R.color.gray)); | |
| 186 | + ivState.setImageDrawable(getResources().getDrawable(R.drawable.wait_fail)); | |
| 187 | 187 | break; | 
| 188 | 188 | case 3: | 
| 189 | 189 | tvPayState.setText("支付失败"); | 
| 190 | - ivState.setImageDrawable(getResources().getDrawable(R.drawable.close)); | |
| 190 | + ivState.setImageDrawable(getResources().getDrawable(R.drawable.wait_fail)); | |
| 191 | 191 | break; | 
| 192 | 192 | } | 
| 193 | 193 | ... | ... | 
app/src/main/java/com/shunzhi/parent/ui/fragment/CePingFragment.java
| ... | ... | @@ -100,10 +100,7 @@ public class CePingFragment extends BaseMVPCompatFragment<CepingContract.CePingP | 
| 100 | 100 | @Override | 
| 101 | 101 | public void onResume() { | 
| 102 | 102 | super.onResume(); | 
| 103 | -// if (!tvLocalAddress.getText().toString().equals(AppContext.getInstance().cityName)){ | |
| 104 | 103 | tvLocalAddress.setText(AppContext.getInstance().district); | 
| 105 | -// addTools(); | |
| 106 | -// } | |
| 107 | 104 | } | 
| 108 | 105 | |
| 109 | 106 | private void initListeners(View view) { | ... | ... | 
app/src/main/java/com/shunzhi/parent/ui/fragment/ConsultFragment.java
| ... | ... | @@ -94,7 +94,6 @@ public class ConsultFragment extends BaseMVPCompatFragment<ConsultContract.Consu | 
| 94 | 94 | videoplayer.replayTextView.setVisibility(View.GONE); | 
| 95 | 95 | videoplayer.backButton.setVisibility(View.GONE); | 
| 96 | 96 | |
| 97 | - | |
| 98 | 97 | mPresenter.getBanners("2", AppContext.getInstance().district); | 
| 99 | 98 | |
| 100 | 99 | initBroadCast(); | 
| ... | ... | @@ -103,7 +102,8 @@ public class ConsultFragment extends BaseMVPCompatFragment<ConsultContract.Consu | 
| 103 | 102 | } | 
| 104 | 103 | |
| 105 | 104 | private void initRecycler() { | 
| 106 | - recycler_context.setLayoutManager(new LinearLayoutManager(getActivity())); | |
| 105 | + | |
| 106 | + recycler_context.setPullRefreshEnabled(false); | |
| 107 | 107 | recycler_context.setLoadingListener(new XRecyclerView.LoadingListener() { | 
| 108 | 108 | @Override | 
| 109 | 109 | public void onRefresh() { | 
| ... | ... | @@ -275,4 +275,8 @@ public class ConsultFragment extends BaseMVPCompatFragment<ConsultContract.Consu | 
| 275 | 275 | AppContext.getInstance().cityName = name.split(" ")[1]; | 
| 276 | 276 | AppContext.getInstance().district = name.split(" ")[2]; | 
| 277 | 277 | } | 
| 278 | + | |
| 279 | + public void refresh() { | |
| 280 | + mPresenter.getContextChannel(AppContext.getInstance().district,0,1,pageIndex); | |
| 281 | + } | |
| 278 | 282 | } | ... | ... | 
app/src/main/java/com/shunzhi/parent/ui/fragment/StartFragment.java
| ... | ... | @@ -110,7 +110,6 @@ public class StartFragment extends BaseMVPCompatFragment<ConsultContract.Consult | 
| 110 | 110 | |
| 111 | 111 | private void initBannes(List<GuangGaoBean> guangGaoBeanList) { | 
| 112 | 112 | try { | 
| 113 | - Log.d("66666","initBannes"+guangGaoBeanList); | |
| 114 | 113 | if (isQidong) { | 
| 115 | 114 | String fileUrl = "", describe = ""; | 
| 116 | 115 | for (int i = 0; i < guangGaoBeanList.size(); i++) { | ... | ... | 
1.49 KB
1.4 KB
1.49 KB
app/src/main/res/layout/fragment_consult_one_level.xml
| ... | ... | @@ -4,17 +4,12 @@ | 
| 4 | 4 | android:layout_height="match_parent" | 
| 5 | 5 | android:orientation="vertical" | 
| 6 | 6 | android:background="@color/bgColor" | 
| 7 | - android:paddingTop="@dimen/size_dp_10" | |
| 8 | - android:paddingRight="@dimen/size_dp_10" | |
| 9 | - android:paddingLeft="@dimen/size_dp_10" | |
| 10 | 7 | tools:context="com.shunzhi.parent.ui.fragment.consult.ConsultOneLevelFragment"> | 
| 11 | 8 | |
| 12 | 9 | <android.support.v7.widget.RecyclerView | 
| 13 | 10 | android:id="@+id/recyclerViewGrally" | 
| 14 | 11 | android:layout_width="match_parent" | 
| 15 | - android:layout_height="0dp" | |
| 16 | - android:layout_weight="1" | |
| 17 | - android:layout_marginBottom="@dimen/size_dp_10" | |
| 12 | + android:layout_height="150dp" | |
| 18 | 13 | ></android.support.v7.widget.RecyclerView> | 
| 19 | 14 | |
| 20 | 15 | <include layout="@layout/layout_textandimgshow"/> | 
| ... | ... | @@ -22,8 +17,9 @@ | 
| 22 | 17 | <com.jcodecraeer.xrecyclerview.XRecyclerView | 
| 23 | 18 | android:layout_marginTop="@dimen/size_dp_10" | 
| 24 | 19 | android:layout_width="match_parent" | 
| 25 | - android:layout_height="0dp" | |
| 26 | - android:layout_weight="3" | |
| 20 | + android:layout_height="match_parent" | |
| 21 | + android:layout_marginLeft="@dimen/size_dp_10" | |
| 22 | + android:layout_marginRight="@dimen/size_dp_10" | |
| 27 | 23 | android:id="@+id/recyclerViewConsultOne" | 
| 28 | 24 | ></com.jcodecraeer.xrecyclerview.XRecyclerView> | 
| 29 | 25 | ... | ... | 
app/src/main/res/layout/fragment_zi_xun.xml
app/src/main/res/layout/layout_consult_content.xml
app/src/main/res/layout/text_and_img_show.xml
| ... | ... | @@ -16,8 +16,9 @@ | 
| 16 | 16 | |
| 17 | 17 | <ImageView | 
| 18 | 18 | android:id="@+id/image" | 
| 19 | - android:layout_width="@dimen/size_dp_50" | |
| 20 | - android:layout_height="@dimen/size_dp_50" | |
| 19 | + android:layout_width="wrap_content" | |
| 20 | + android:layout_height="wrap_content" | |
| 21 | + android:src="@drawable/zczx" | |
| 21 | 22 | android:scaleType="fitXY" | 
| 22 | 23 | /> | 
| 23 | 24 | ... | ... |