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,7 +87,7 @@ public class MyConsultAdapter extends BaseRecyclerViewAdapter<ChannelContextBean | ||
87 | normal_content.setVisibility(View.VISIBLE); | 87 | normal_content.setVisibility(View.VISIBLE); |
88 | tvConsultTitle.setText(object.getTitle()); | 88 | tvConsultTitle.setText(object.getTitle()); |
89 | tvConsultContent.setText(object.getContent()); | 89 | tvConsultContent.setText(object.getContent()); |
90 | - tvPingLunNums.setText("评论:"+object.getTalkNum()+""); | 90 | + tvPingLunNums.setText("浏览量:"+object.getLookNum()+""); |
91 | tvZhuanFaNums.setText("转发:"+object.getForwardingNum()+""); | 91 | tvZhuanFaNums.setText("转发:"+object.getForwardingNum()+""); |
92 | GlideUtils.showImg(mContext,iv_consult,object.getImage()); | 92 | GlideUtils.showImg(mContext,iv_consult,object.getImage()); |
93 | normal_content.setOnClickListener(new View.OnClickListener() { | 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,7 +16,15 @@ public class ChannelContextBean implements Serializable{ | ||
16 | private int talkNum; | 16 | private int talkNum; |
17 | private int orderById; | 17 | private int orderById; |
18 | private int isAds; | 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 | public int getId() { | 29 | public int getId() { |
22 | return id; | 30 | return id; |
@@ -92,17 +100,18 @@ public class ChannelContextBean implements Serializable{ | @@ -92,17 +100,18 @@ public class ChannelContextBean implements Serializable{ | ||
92 | 100 | ||
93 | @Override | 101 | @Override |
94 | public String toString() { | 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 | ", isAds=" + isAds + | 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,9 +79,9 @@ public class MessageManager { | ||
79 | public void onEvent(StatusCode statusCode) { | 79 | public void onEvent(StatusCode statusCode) { |
80 | if (statusCode == StatusCode.KICKOUT) { | 80 | if (statusCode == StatusCode.KICKOUT) { |
81 | Context context = AppContext.getInstance(); | 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 | }, true); | 87 | }, true); |
app/src/main/java/com/shunzhi/parent/ui/MainActivity.java
@@ -103,13 +103,14 @@ public class MainActivity extends BaseCompatActivity implements PermissionUtils. | @@ -103,13 +103,14 @@ public class MainActivity extends BaseCompatActivity implements PermissionUtils. | ||
103 | if (index == i) fragmentTransaction.show(fragments[index]); | 103 | if (index == i) fragmentTransaction.show(fragments[index]); |
104 | else fragmentTransaction.hide(fragments[i]); | 104 | else fragmentTransaction.hide(fragments[i]); |
105 | } | 105 | } |
106 | + if (index==CONSULT_INDEX)consultFragment.refresh(); | ||
106 | fragmentTransaction.commit(); | 107 | fragmentTransaction.commit(); |
107 | } | 108 | } |
108 | 109 | ||
109 | @Override | 110 | @Override |
110 | protected void onNewIntent(Intent intent) { | 111 | protected void onNewIntent(Intent intent) { |
111 | super.onNewIntent(intent); | 112 | super.onNewIntent(intent); |
112 | - handIntent(intent); | 113 | +// handIntent(intent); |
113 | } | 114 | } |
114 | 115 | ||
115 | private void handIntent(Intent intent) { | 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,19 +175,19 @@ public class OrderDetailActivity extends BaseMVPCompatActivity<OrderDetailContra | ||
175 | switch (object.payState){ | 175 | switch (object.payState){ |
176 | case 0://待支付 | 176 | case 0://待支付 |
177 | tvPayState.setText("待支付"); | 177 | tvPayState.setText("待支付"); |
178 | - ivState.setBackgroundColor(getResources().getColor(R.color.md_red_500)); | 178 | + ivState.setImageDrawable(getResources().getDrawable(R.drawable.order_wait)); |
179 | break; | 179 | break; |
180 | case 1://支付成功 | 180 | case 1://支付成功 |
181 | tvPayState.setText("支付成功"); | 181 | tvPayState.setText("支付成功"); |
182 | - ivState.setImageDrawable(getResources().getDrawable(R.drawable.success)); | 182 | + ivState.setImageDrawable(getResources().getDrawable(R.drawable.order_success)); |
183 | break; | 183 | break; |
184 | case 2://交易关闭 | 184 | case 2://交易关闭 |
185 | tvPayState.setText("交易关闭"); | 185 | tvPayState.setText("交易关闭"); |
186 | - ivState.setBackgroundColor(getResources().getColor(R.color.gray)); | 186 | + ivState.setImageDrawable(getResources().getDrawable(R.drawable.wait_fail)); |
187 | break; | 187 | break; |
188 | case 3: | 188 | case 3: |
189 | tvPayState.setText("支付失败"); | 189 | tvPayState.setText("支付失败"); |
190 | - ivState.setImageDrawable(getResources().getDrawable(R.drawable.close)); | 190 | + ivState.setImageDrawable(getResources().getDrawable(R.drawable.wait_fail)); |
191 | break; | 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,10 +100,7 @@ public class CePingFragment extends BaseMVPCompatFragment<CepingContract.CePingP | ||
100 | @Override | 100 | @Override |
101 | public void onResume() { | 101 | public void onResume() { |
102 | super.onResume(); | 102 | super.onResume(); |
103 | -// if (!tvLocalAddress.getText().toString().equals(AppContext.getInstance().cityName)){ | ||
104 | tvLocalAddress.setText(AppContext.getInstance().district); | 103 | tvLocalAddress.setText(AppContext.getInstance().district); |
105 | -// addTools(); | ||
106 | -// } | ||
107 | } | 104 | } |
108 | 105 | ||
109 | private void initListeners(View view) { | 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,7 +94,6 @@ public class ConsultFragment extends BaseMVPCompatFragment<ConsultContract.Consu | ||
94 | videoplayer.replayTextView.setVisibility(View.GONE); | 94 | videoplayer.replayTextView.setVisibility(View.GONE); |
95 | videoplayer.backButton.setVisibility(View.GONE); | 95 | videoplayer.backButton.setVisibility(View.GONE); |
96 | 96 | ||
97 | - | ||
98 | mPresenter.getBanners("2", AppContext.getInstance().district); | 97 | mPresenter.getBanners("2", AppContext.getInstance().district); |
99 | 98 | ||
100 | initBroadCast(); | 99 | initBroadCast(); |
@@ -103,7 +102,8 @@ public class ConsultFragment extends BaseMVPCompatFragment<ConsultContract.Consu | @@ -103,7 +102,8 @@ public class ConsultFragment extends BaseMVPCompatFragment<ConsultContract.Consu | ||
103 | } | 102 | } |
104 | 103 | ||
105 | private void initRecycler() { | 104 | private void initRecycler() { |
106 | - recycler_context.setLayoutManager(new LinearLayoutManager(getActivity())); | 105 | + |
106 | + recycler_context.setPullRefreshEnabled(false); | ||
107 | recycler_context.setLoadingListener(new XRecyclerView.LoadingListener() { | 107 | recycler_context.setLoadingListener(new XRecyclerView.LoadingListener() { |
108 | @Override | 108 | @Override |
109 | public void onRefresh() { | 109 | public void onRefresh() { |
@@ -275,4 +275,8 @@ public class ConsultFragment extends BaseMVPCompatFragment<ConsultContract.Consu | @@ -275,4 +275,8 @@ public class ConsultFragment extends BaseMVPCompatFragment<ConsultContract.Consu | ||
275 | AppContext.getInstance().cityName = name.split(" ")[1]; | 275 | AppContext.getInstance().cityName = name.split(" ")[1]; |
276 | AppContext.getInstance().district = name.split(" ")[2]; | 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,7 +110,6 @@ public class StartFragment extends BaseMVPCompatFragment<ConsultContract.Consult | ||
110 | 110 | ||
111 | private void initBannes(List<GuangGaoBean> guangGaoBeanList) { | 111 | private void initBannes(List<GuangGaoBean> guangGaoBeanList) { |
112 | try { | 112 | try { |
113 | - Log.d("66666","initBannes"+guangGaoBeanList); | ||
114 | if (isQidong) { | 113 | if (isQidong) { |
115 | String fileUrl = "", describe = ""; | 114 | String fileUrl = "", describe = ""; |
116 | for (int i = 0; i < guangGaoBeanList.size(); i++) { | 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,17 +4,12 @@ | ||
4 | android:layout_height="match_parent" | 4 | android:layout_height="match_parent" |
5 | android:orientation="vertical" | 5 | android:orientation="vertical" |
6 | android:background="@color/bgColor" | 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 | tools:context="com.shunzhi.parent.ui.fragment.consult.ConsultOneLevelFragment"> | 7 | tools:context="com.shunzhi.parent.ui.fragment.consult.ConsultOneLevelFragment"> |
11 | 8 | ||
12 | <android.support.v7.widget.RecyclerView | 9 | <android.support.v7.widget.RecyclerView |
13 | android:id="@+id/recyclerViewGrally" | 10 | android:id="@+id/recyclerViewGrally" |
14 | android:layout_width="match_parent" | 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 | ></android.support.v7.widget.RecyclerView> | 13 | ></android.support.v7.widget.RecyclerView> |
19 | 14 | ||
20 | <include layout="@layout/layout_textandimgshow"/> | 15 | <include layout="@layout/layout_textandimgshow"/> |
@@ -22,8 +17,9 @@ | @@ -22,8 +17,9 @@ | ||
22 | <com.jcodecraeer.xrecyclerview.XRecyclerView | 17 | <com.jcodecraeer.xrecyclerview.XRecyclerView |
23 | android:layout_marginTop="@dimen/size_dp_10" | 18 | android:layout_marginTop="@dimen/size_dp_10" |
24 | android:layout_width="match_parent" | 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 | android:id="@+id/recyclerViewConsultOne" | 23 | android:id="@+id/recyclerViewConsultOne" |
28 | ></com.jcodecraeer.xrecyclerview.XRecyclerView> | 24 | ></com.jcodecraeer.xrecyclerview.XRecyclerView> |
29 | 25 |
app/src/main/res/layout/fragment_zi_xun.xml
@@ -37,7 +37,6 @@ | @@ -37,7 +37,6 @@ | ||
37 | android:orientation="vertical" | 37 | android:orientation="vertical" |
38 | android:paddingLeft="@dimen/size_dp_10" | 38 | android:paddingLeft="@dimen/size_dp_10" |
39 | android:paddingRight="@dimen/size_dp_10"> | 39 | android:paddingRight="@dimen/size_dp_10"> |
40 | - | ||
41 | <TextView | 40 | <TextView |
42 | android:layout_width="match_parent" | 41 | android:layout_width="match_parent" |
43 | android:layout_height="wrap_content" | 42 | android:layout_height="wrap_content" |
app/src/main/res/layout/layout_consult_content.xml
@@ -72,6 +72,7 @@ | @@ -72,6 +72,7 @@ | ||
72 | android:layout_alignParentRight="true" | 72 | android:layout_alignParentRight="true" |
73 | android:layout_centerVertical="true" | 73 | android:layout_centerVertical="true" |
74 | android:text="转发:50" | 74 | android:text="转发:50" |
75 | + android:visibility="gone" | ||
75 | android:textSize="@dimen/textSize14" /> | 76 | android:textSize="@dimen/textSize14" /> |
76 | </RelativeLayout> | 77 | </RelativeLayout> |
77 | </FrameLayout> | 78 | </FrameLayout> |
app/src/main/res/layout/text_and_img_show.xml
@@ -16,8 +16,9 @@ | @@ -16,8 +16,9 @@ | ||
16 | 16 | ||
17 | <ImageView | 17 | <ImageView |
18 | android:id="@+id/image" | 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 | android:scaleType="fitXY" | 22 | android:scaleType="fitXY" |
22 | /> | 23 | /> |
23 | 24 |