@@ -12,9 +12,12 @@ import android.widget.TextView; |
||
| 12 | 12 |
import android.widget.ViewSwitcher; |
| 13 | 13 |
|
| 14 | 14 |
import ai.pai.lensman.R; |
| 15 |
+import ai.pai.lensman.activities.PriceSettingActivity; |
|
| 16 |
+import ai.pai.lensman.activities.WebViewActivity; |
|
| 15 | 17 |
import ai.pai.lensman.base.BaseActivity; |
| 16 | 18 |
import ai.pai.lensman.bean.BriefsBean; |
| 17 | 19 |
import ai.pai.lensman.settings.SettingsActivity; |
| 20 |
+import ai.pai.lensman.utils.UrlContainer; |
|
| 18 | 21 |
import butterknife.BindView; |
| 19 | 22 |
import butterknife.ButterKnife; |
| 20 | 23 |
import butterknife.OnClick; |
@@ -29,6 +32,7 @@ public class BriefsActivity extends BaseActivity implements BriefsContract.View{
|
||
| 29 | 32 |
@BindView(R.id.switcher_system_msg) TextSwitcher systemMsgSwitch; |
| 30 | 33 |
@BindView(R.id.tv_box_num) TextView boxNumText; |
| 31 | 34 |
@BindView(R.id.tv_box_status) TextView boxStatusText; |
| 35 |
+ @BindView(R.id.tv_current_price) TextView currentPriceText; |
|
| 32 | 36 |
|
| 33 | 37 |
private BriefsPresenter presenter; |
| 34 | 38 |
|
@@ -74,6 +78,18 @@ public class BriefsActivity extends BaseActivity implements BriefsContract.View{
|
||
| 74 | 78 |
startActivity(new Intent(this, SettingsActivity.class)); |
| 75 | 79 |
} |
| 76 | 80 |
|
| 81 |
+ @OnClick(R.id.layout_price_setting) |
|
| 82 |
+ void goToSetPrice(){
|
|
| 83 |
+ startActivity(new Intent(this, PriceSettingActivity.class)); |
|
| 84 |
+ } |
|
| 85 |
+ |
|
| 86 |
+ @OnClick(R.id.layout_price_introduction) |
|
| 87 |
+ void goToPriceIntroduction(){
|
|
| 88 |
+ Intent intent = new Intent(this,WebViewActivity.class); |
|
| 89 |
+ intent.putExtra("url", UrlContainer.PLATFORM_PRICE_RULES_PAGE_URL);
|
|
| 90 |
+ intent.putExtra("title",getString(R.string.platform_price_rule));
|
|
| 91 |
+ startActivity(intent); |
|
| 92 |
+ } |
|
| 77 | 93 |
|
| 78 | 94 |
@Override |
| 79 | 95 |
protected void onDestroy() {
|
@@ -80,7 +80,6 @@ public class BriefsPresenter implements BriefsContract.Presenter,BaseInteractor. |
||
| 80 | 80 |
} |
| 81 | 81 |
|
| 82 | 82 |
private String getNextOrderMessage(){
|
| 83 |
- currentMsg = null; |
|
| 84 | 83 |
if(briefsBean == null || briefsBean.msgList==null || briefsBean.msgList.size()==0){
|
| 85 | 84 |
return NULL_STR; |
| 86 | 85 |
} |
@@ -91,11 +90,10 @@ public class BriefsPresenter implements BriefsContract.Presenter,BaseInteractor. |
||
| 91 | 90 |
|
| 92 | 91 |
private String formatOrderContent(MessageBean messageBean){
|
| 93 | 92 |
return App.getAppContext().getString(R.string.customer_bought_photo_money, |
| 94 |
- new java.text.DecimalFormat("#.00").format(messageBean.totalFee*1.0f/100));
|
|
| 93 |
+ String.format("%.2f",messageBean.totalFee*1.0f/100));
|
|
| 95 | 94 |
} |
| 96 | 95 |
|
| 97 | 96 |
private String getNextSystemMessage(){
|
| 98 |
- currentSystemMsg = null; |
|
| 99 | 97 |
if(briefsBean == null || briefsBean.systemMsgList==null || briefsBean.systemMsgList.size()==0){
|
| 100 | 98 |
return NULL_STR; |
| 101 | 99 |
} |
@@ -110,7 +108,7 @@ public class BriefsPresenter implements BriefsContract.Presenter,BaseInteractor. |
||
| 110 | 108 |
|
| 111 | 109 |
@Override |
| 112 | 110 |
public void clickCurrentOrderMsg() {
|
| 113 |
- if(currentMsg==null){
|
|
| 111 |
+ if(currentMsg == null){
|
|
| 114 | 112 |
return; |
| 115 | 113 |
} |
| 116 | 114 |
|
@@ -118,15 +116,15 @@ public class BriefsPresenter implements BriefsContract.Presenter,BaseInteractor. |
||
| 118 | 116 |
|
| 119 | 117 |
@Override |
| 120 | 118 |
public void clickCurrentSysMsg() {
|
| 121 |
- if(currentSystemMsg==null){
|
|
| 119 |
+ if(currentSystemMsg == null){
|
|
| 122 | 120 |
return; |
| 123 | 121 |
} |
| 124 | 122 |
if(currentSystemMsg.url == null){
|
| 125 | 123 |
return; |
| 126 | 124 |
} |
| 127 |
- Intent declareIntent = new Intent(context,WebViewActivity.class); |
|
| 128 |
- declareIntent.putExtra("url",currentSystemMsg.url);
|
|
| 129 |
- declareIntent.putExtra("title",currentSystemMsg.title);
|
|
| 130 |
- context.startActivity(declareIntent); |
|
| 125 |
+ Intent intent = new Intent(context,WebViewActivity.class); |
|
| 126 |
+ intent.putExtra("url",currentSystemMsg.url);
|
|
| 127 |
+ intent.putExtra("title",currentSystemMsg.title);
|
|
| 128 |
+ context.startActivity(intent); |
|
| 131 | 129 |
} |
| 132 | 130 |
} |
@@ -65,5 +65,7 @@ public class UrlContainer {
|
||
| 65 | 65 |
*/ |
| 66 | 66 |
public static final String PRICE_FIX_URL = HOST_URL+"l/price_fix"; |
| 67 | 67 |
|
| 68 |
+ public static final String PLATFORM_PRICE_RULES_PAGE_URL = "http://www.baidu.com"; |
|
| 69 |
+ |
|
| 68 | 70 |
|
| 69 | 71 |
} |
@@ -391,12 +391,23 @@ |
||
| 391 | 391 |
android:orientation="vertical"> |
| 392 | 392 |
|
| 393 | 393 |
<LinearLayout |
| 394 |
+ android:id="@+id/layout_price_setting" |
|
| 394 | 395 |
android:layout_width="match_parent" |
| 395 | 396 |
android:layout_height="44dp" |
| 396 | 397 |
android:paddingRight="6dp" |
| 397 | 398 |
android:orientation="horizontal"> |
| 398 | 399 |
|
| 399 | 400 |
<TextView |
| 401 |
+ android:layout_width="wrap_content" |
|
| 402 |
+ android:layout_height="wrap_content" |
|
| 403 |
+ android:layout_gravity="center_vertical" |
|
| 404 |
+ android:text="@string/price_manage" |
|
| 405 |
+ android:paddingLeft="10dp" |
|
| 406 |
+ android:textColor="@color/dark_grey" |
|
| 407 |
+ android:textSize="16sp" /> |
|
| 408 |
+ |
|
| 409 |
+ <TextView |
|
| 410 |
+ android:id="@+id/tv_current_price" |
|
| 400 | 411 |
android:layout_width="0dp" |
| 401 | 412 |
android:layout_height="wrap_content" |
| 402 | 413 |
android:layout_gravity="center_vertical" |
@@ -420,6 +431,7 @@ |
||
| 420 | 431 |
android:background="@color/text_hint_grey_color"/> |
| 421 | 432 |
|
| 422 | 433 |
<LinearLayout |
| 434 |
+ android:id="@+id/layout_price_introduction" |
|
| 423 | 435 |
android:layout_width="match_parent" |
| 424 | 436 |
android:layout_height="44dp" |
| 425 | 437 |
android:paddingRight="6dp" |