Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
android
/
dayu
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
3e07c10e
authored
Feb 27, 2020
by
mReturn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user
parent
b04401aa
Hide whitespace changes
Inline
Side-by-side
Showing
40 changed files
with
1432 additions
and
429 deletions
baseSDK/src/main/res/drawable-xxhdpi/icon_money_bag.png
baseSDK/src/main/res/drawable-xxhdpi/icon_money_bag2.png
baseSDK/src/main/res/drawable/bg_order_step_item1.xml
baseSDK/src/main/res/drawable/bg_order_step_item2.xml
baseSDK/src/main/res/drawable/bg_order_step_item3.xml
baseSDK/src/main/res/drawable/bg_order_step_title1.xml
baseSDK/src/main/res/drawable/bg_order_step_title2.xml
baseSDK/src/main/res/drawable/bg_order_step_title3.xml
baseSDK/src/main/res/drawable/btn_blue_commom.xml
baseSDK/src/main/res/drawable/btn_green_commom.xml
baseSDK/src/main/res/values/colors.xml
baseSDK/src/main/res/values/strings.xml
baseSDK/src/main/res/values/styles.xml
saleCenter/src/main/res/layout/activity_order_detail.xml
saleCenter/src/main/res/layout/item_sale_product.xml
userCenter/src/main/java/com/dayu/usercenter/api/UserService2.java
userCenter/src/main/java/com/dayu/usercenter/event/EditBankEvent.java
userCenter/src/main/java/com/dayu/usercenter/model/bean/GlobelRateBean.java
userCenter/src/main/java/com/dayu/usercenter/model/bean/RatioConfigBean.java
userCenter/src/main/java/com/dayu/usercenter/model/bean/StarRatioBean.java
userCenter/src/main/java/com/dayu/usercenter/model/bean/TreeAddressBean.java
userCenter/src/main/java/com/dayu/usercenter/presenter/homeuser/HomeUserPresenter.java
userCenter/src/main/java/com/dayu/usercenter/presenter/userinfo/UserInfoContract.java
userCenter/src/main/java/com/dayu/usercenter/presenter/userinfo/UserInfoPresenter.java
userCenter/src/main/java/com/dayu/usercenter/ui/activity2/EditAddressActivity.java
userCenter/src/main/java/com/dayu/usercenter/ui/activity2/EditBankActivity.java
userCenter/src/main/java/com/dayu/usercenter/ui/activity2/SaleRecordActivity.java
userCenter/src/main/java/com/dayu/usercenter/ui/activity2/ServiceRecordActivity.java
userCenter/src/main/java/com/dayu/usercenter/ui/activity2/TestRecordActivity.java
userCenter/src/main/java/com/dayu/usercenter/ui/activity2/UserInfoActivity.java
userCenter/src/main/release/AndroidManifest.xml
userCenter/src/main/res/layout/activity_edit_address.xml
userCenter/src/main/res/layout/activity_edit_bank.xml
userCenter/src/main/res/layout/activity_sale_record.xml
userCenter/src/main/res/layout/activity_service_record.xml
userCenter/src/main/res/layout/activity_test_record.xml
userCenter/src/main/res/layout/activity_user_info.xml
userCenter/src/main/res/layout/item_record_common.xml
userCenter/src/main/res/layout/item_rule_star_ratio.xml
userCenter/src/main/res/values/strings.xml
baseSDK/src/main/res/drawable-xxhdpi/icon_money_bag.png
0 → 100644
View file @
3e07c10e
11 KB
baseSDK/src/main/res/drawable-xxhdpi/icon_money_bag2.png
0 → 100644
View file @
3e07c10e
19 KB
baseSDK/src/main/res/drawable/bg_order_step_item1.xml
View file @
3e07c10e
...
...
@@ -3,7 +3,7 @@
<!-- 边框颜色值 -->
<item>
<shape>
<solid
android:color=
"@color/
cl_home_title_text_colo
r"
/>
<solid
android:color=
"@color/
table_borde
r"
/>
</shape>
</item>
...
...
baseSDK/src/main/res/drawable/bg_order_step_item2.xml
View file @
3e07c10e
...
...
@@ -3,7 +3,7 @@
<!-- 边框颜色值 -->
<item>
<shape>
<solid
android:color=
"@color/
cl_home_title_text_colo
r"
/>
<solid
android:color=
"@color/
table_borde
r"
/>
</shape>
</item>
...
...
baseSDK/src/main/res/drawable/bg_order_step_item3.xml
View file @
3e07c10e
...
...
@@ -3,7 +3,7 @@
<!-- 边框颜色值 -->
<item>
<shape>
<solid
android:color=
"@color/
cl_home_title_text_colo
r"
/>
<solid
android:color=
"@color/
table_borde
r"
/>
</shape>
</item>
...
...
baseSDK/src/main/res/drawable/bg_order_step_title1.xml
View file @
3e07c10e
...
...
@@ -3,7 +3,7 @@
<!-- 边框颜色值 -->
<item>
<shape>
<solid
android:color=
"@color/
cl_home_title_text_colo
r"
/>
<solid
android:color=
"@color/
table_borde
r"
/>
</shape>
</item>
...
...
@@ -11,11 +11,12 @@
<item
android:right=
"@dimen/dp_sale_step"
android:left=
"@dimen/dp_sale_step"
android:top=
"@dimen/dp_sale_step"
android:bottom=
"@dimen/dp_sale_step"
>
<shape>
<!--这个是背景颜色-->
<solid
android:color=
"
#c6c6c6
"
/>
<solid
android:color=
"
@color/table_title_bg
"
/>
<!--这个是按钮中的字体与按钮内的四周边距-->
<!--<padding android:bottom="10dp"-->
<!--android:left="10dp"-->
...
...
baseSDK/src/main/res/drawable/bg_order_step_title2.xml
View file @
3e07c10e
...
...
@@ -3,17 +3,18 @@
<!-- 边框颜色值 -->
<item>
<shape>
<solid
android:color=
"@color/
cl_home_title_text_colo
r"
/>
<solid
android:color=
"@color/
table_borde
r"
/>
</shape>
</item>
<!--这个是按钮边框设置为四周 并且宽度为1-->
<item
android:top=
"@dimen/dp_sale_step"
android:bottom=
"@dimen/dp_sale_step"
>
<shape>
<!--这个是背景颜色-->
<solid
android:color=
"
#c6c6c6
"
/>
<solid
android:color=
"
@color/table_title_bg
"
/>
</shape>
</item>
</layer-list>
\ No newline at end of file
baseSDK/src/main/res/drawable/bg_order_step_title3.xml
View file @
3e07c10e
...
...
@@ -3,18 +3,19 @@
<!-- 边框颜色值 -->
<item>
<shape>
<solid
android:color=
"@color/
cl_home_title_text_colo
r"
/>
<solid
android:color=
"@color/
table_borde
r"
/>
</shape>
</item>
<!--这个是按钮边框设置为四周 并且宽度为1-->
<item
android:top=
"@dimen/dp_sale_step"
android:bottom=
"@dimen/dp_sale_step"
android:right=
"@dimen/dp_sale_step"
>
<shape>
<!--这个是背景颜色-->
<solid
android:color=
"
#c6c6c6
"
/>
<solid
android:color=
"
@color/table_title_bg
"
/>
</shape>
</item>
</layer-list>
\ No newline at end of file
baseSDK/src/main/res/drawable/btn_blue_commom.xml
0 → 100644
View file @
3e07c10e
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<corners
android:radius=
"3dp"
/>
<solid
android:color=
"@color/cl_receiving_order_item_data"
/>
</shape>
\ No newline at end of file
baseSDK/src/main/res/drawable/btn_green_commom.xml
0 → 100644
View file @
3e07c10e
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<corners
android:radius=
"3dp"
/>
<solid
android:color=
"@color/text_common_green"
/>
</shape>
\ No newline at end of file
baseSDK/src/main/res/values/colors.xml
View file @
3e07c10e
...
...
@@ -11,6 +11,7 @@
<color
name=
"cl_home_listview_bg"
>
#f5f5f5
</color>
<color
name=
"cl_order_item_line_bg"
>
#e5e5e5
</color>
<color
name=
"cl_order_item_date"
>
#00c45d
</color>
<color
name=
"text_common_green"
>
#00c45d
</color>
<color
name=
"cl_receiving_order_item_data"
>
#3faafc
</color>
<color
name=
"cl_tab_yellow"
>
#ffbe2d
</color>
<color
name=
"cl_tab_read"
>
#ff5a4b
</color>
...
...
@@ -35,12 +36,15 @@
<color
name=
"common_red"
>
#FF5A4B
</color>
<color
name=
"light_grey"
>
#FF666666
</color>
<color
name=
"bg_button"
>
#FF3FAAFC
</color>
<color
name=
"text_common_blue"
>
#FF3FAAFC
</color>
<color
name=
"editext_color"
>
#FFB6B6B6
</color>
<color
name=
"view_color"
>
#E6E6E6
</color>
<color
name=
"blue_register"
>
#FF0e15fb
</color>
<color
name=
"color_ee"
>
#eeeeee
</color>
<color
name=
"table_border"
>
#666666
</color>
<color
name=
"table_title_bg"
>
#d5d5d5
</color>
...
...
baseSDK/src/main/res/values/strings.xml
View file @
3e07c10e
...
...
@@ -859,6 +859,7 @@ C) 在甲方使用大鱼平å°æœåŠ¡è¿‡ç¨‹ä¸äº§ç”Ÿçš„业务数æ®ï¼Œå®¢æˆ·æ•°æ
<string
name=
"sale_time_str"
>
时间
</string>
<string
name=
"sale_progress_str"
>
进度
</string>
<string
name=
"sale_record_str"
>
详细记录
</string>
<string
name=
"income_money"
>
收入金额
</string>
<!--sale-->
<!--user-->
...
...
@@ -925,5 +926,10 @@ C) 在甲方使用大鱼平å°æœåŠ¡è¿‡ç¨‹ä¸äº§ç”Ÿçš„业务数æ®ï¼Œå®¢æˆ·æ•°æ
<string
name=
"save_success"
>
保存成功
</string>
<string
name=
"save_fail"
>
保存失败
</string>
<string
name=
"record_income_total"
>
收入总额(元)
</string>
<string
name=
"record_reward_total"
>
收入总额(元)
</string>
<string
name=
"record_done_service"
>
完成服务工单
</string>
<string
name=
"record_done_sale"
>
完成销售工单
</string>
</resources>
baseSDK/src/main/res/values/styles.xml
View file @
3e07c10e
...
...
@@ -26,6 +26,7 @@
<item
name=
"android:layout_marginTop"
>
10dp
</item>
<item
name=
"android:layout_marginRight"
>
0dp
</item>
</style>
<style
name=
"sale_record_value"
parent=
"sale_linearlayout"
>
<item
name=
"android:layout_marginTop"
>
15dp
</item>
<item
name=
"android:layout_marginRight"
>
0dp
</item>
...
...
@@ -43,11 +44,13 @@
<style
name=
"sale_item_text2"
parent=
"sale_item_text"
>
<item
name=
"android:layout_marginLeft"
>
@dimen/size_order_item_tooltext_ml
</item>
</style>
<style
name=
"sale_detail_text"
parent=
"sale_item_text"
>
<item
name=
"android:layout_width"
>
90dp
</item>
<item
name=
"android:gravity"
>
right
</item>
<item
name=
"android:layout_marginRight"
>
@dimen/dp_20
</item>
</style>
<style
name=
"sale_record_text"
parent=
"sale_item_text"
>
<item
name=
"android:layout_width"
>
100dp
</item>
<item
name=
"android:layout_marginRight"
>
@dimen/dp_20
</item>
...
...
@@ -64,12 +67,18 @@
<style
name=
"tv_user_edit"
parent=
"sale_item_text"
>
<item
name=
"android:textSize"
>
16sp
</item>
<item
name=
"android:layout_width"
>
90dp
</item>
</style>
<style
name=
"tv_user_edit2"
parent=
"sale_item_text"
>
<item
name=
"android:textSize"
>
16sp
</item>
<item
name=
"android:layout_width"
>
80dp
</item>
</style>
<style
name=
"edt_user_edit"
>
<item
name=
"android:layout_width"
>
match_parent
</item>
<item
name=
"android:layout_height"
>
match_parent
</item>
<item
name=
"android:paddingLeft"
>
@dimen/dp_15
</item>
<item
name=
"android:paddingLeft"
>
5dp
</item>
<item
name=
"android:background"
>
@color/transparent
</item>
<item
name=
"android:textColor"
>
@color/default_text_color
</item>
<item
name=
"android:textSize"
>
14sp
</item>
...
...
@@ -86,12 +95,6 @@
</style>
<style
name=
"title"
>
<item
name=
"android:layout_width"
>
match_parent
</item>
<item
name=
"android:layout_height"
>
@dimen/size_main_title
</item>
...
...
saleCenter/src/main/res/layout/activity_order_detail.xml
View file @
3e07c10e
...
...
@@ -218,16 +218,12 @@
android:layout_marginTop=
"@dimen/dp_15"
/>
<View
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/dp_sale_step"
android:layout_marginTop=
"5dp"
android:background=
"@color/cl_home_title_text_color"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"25dp"
android:orientation=
"horizontal"
android:layout_marginTop=
"5dp"
>
<TextView
style=
"@style/sale_item_text"
...
...
saleCenter/src/main/res/layout/item_sale_product.xml
View file @
3e07c10e
...
...
@@ -99,7 +99,7 @@
android:layout_width=
"0dp"
android:layout_height=
"30dp"
android:layout_weight=
"1"
android:background=
"@
color/cl_home_button
"
android:background=
"@
drawable/btn_blue_commom
"
android:gravity=
"center"
android:text=
"@string/special_collect"
android:textColor=
"@color/white"
/>
...
...
@@ -110,7 +110,7 @@
android:layout_height=
"30dp"
android:layout_marginLeft=
"20dp"
android:layout_weight=
"1"
android:background=
"@
color/cl_order_item_date
"
android:background=
"@
drawable/btn_green_commom
"
android:gravity=
"center"
android:text=
"@string/share_recommend"
android:textColor=
"@color/white"
/>
...
...
userCenter/src/main/java/com/dayu/usercenter/api/UserService2.java
View file @
3e07c10e
...
...
@@ -7,7 +7,10 @@ import com.dayu.usercenter.model.ApplyLicenceData;
import
com.dayu.usercenter.model.SaveSceneData
;
import
com.dayu.usercenter.model.bean.BusinessSceneBean
;
import
com.dayu.usercenter.model.EditBankData
;
import
com.dayu.usercenter.model.bean.GlobelRateBean
;
import
com.dayu.usercenter.model.bean.ServiceTypeBean
;
import
com.dayu.usercenter.model.bean.StarRatioBean
;
import
com.dayu.usercenter.model.bean.TreeAddressBean
;
import
com.dayu.usercenter.model.bean.UserBankInfoBean
;
import
com.dayu.usercenter.model.bean.UserInfoBean
;
import
com.dayu.usercenter.model.bean.UserLicenceBean
;
...
...
@@ -47,7 +50,7 @@ public interface UserService2 {
* @param data
* @return
*/
// @POST(
"/api-settlement
/payAccountBank")
// @POST(
Constants.API_7800+"
/payAccountBank")
@PUT
(
Constants
.
API_7800
+
"/payAccountBank"
)
Observable
<
BaseResponse
<
Boolean
>>
setBankInfo
(
@Body
EditBankData
data
);
...
...
@@ -119,6 +122,35 @@ public interface UserService2 {
@POST
(
Constants
.
API_7100
+
"/licenceRelationEngineer/apply"
)
Observable
<
BaseResponse
<
Boolean
>>
applyLicence
(
@Body
ApplyLicenceData
data
);
/**
* 星级比例
* @return
*/
@GET
(
Constants
.
API_7300
+
"/engineerStarRatio/list"
)
Observable
<
BaseResponse
<
List
<
StarRatioBean
>>>
getStarRatios
();
/**
* 佣金比例
* @return
*/
@GET
(
Constants
.
API_7800
+
"/globelRateConfig/{id}"
)
Observable
<
BaseResponse
<
GlobelRateBean
>>
getGlobelRate
(
@Path
(
"id"
)
int
id
);
/**
* 所有佣金比例
* @return
*/
@GET
(
Constants
.
API_7800
+
"/globelRateConfig?page=1&pageSize=10"
)
Observable
<
BaseResponse
<
BasePageBean
<
GlobelRateBean
>>>
getGlobelRateAll
();
/**
* 地址(省市区)信息
* @param parednId -1.查询省份数据
* @return
*/
@GET
(
Constants
.
API_7300
+
"/geography/tree/{parentId}"
)
Observable
<
BaseResponse
<
List
<
TreeAddressBean
>>>
getTreeAddress
(
@Path
(
"parentId"
)
int
parednId
);
}
userCenter/src/main/java/com/dayu/usercenter/event/EditBankEvent.java
0 → 100644
View file @
3e07c10e
package
com
.
dayu
.
usercenter
.
event
;
public
class
EditBankEvent
{
public
String
bankName
;
public
String
bankAccount
;
public
String
bankHolder
;
public
EditBankEvent
(
String
bankName
,
String
bankAccount
,
String
bankHolder
)
{
this
.
bankName
=
bankName
;
this
.
bankAccount
=
bankAccount
;
this
.
bankHolder
=
bankHolder
;
}
}
userCenter/src/main/java/com/dayu/usercenter/model/bean/GlobelRateBean.java
0 → 100644
View file @
3e07c10e
package
com
.
dayu
.
usercenter
.
model
.
bean
;
public
class
GlobelRateBean
{
/**
* id : 1
* mobileServiceCharge : 0.6
* mobileServiceIncomeCharge : 5
* mobileIncomeFreePoint : 2000
* engineerSalesCommissionRate : 15
* userRebateRate : 15
* receiptPlatformCommissionRatio : 0.2
*/
private
int
id
;
private
double
mobileServiceCharge
;
private
int
mobileServiceIncomeCharge
;
private
int
mobileIncomeFreePoint
;
private
int
engineerSalesCommissionRate
;
private
int
userRebateRate
;
private
double
receiptPlatformCommissionRatio
;
public
int
getId
()
{
return
id
;
}
public
void
setId
(
int
id
)
{
this
.
id
=
id
;
}
public
double
getMobileServiceCharge
()
{
return
mobileServiceCharge
;
}
public
void
setMobileServiceCharge
(
double
mobileServiceCharge
)
{
this
.
mobileServiceCharge
=
mobileServiceCharge
;
}
public
int
getMobileServiceIncomeCharge
()
{
return
mobileServiceIncomeCharge
;
}
public
void
setMobileServiceIncomeCharge
(
int
mobileServiceIncomeCharge
)
{
this
.
mobileServiceIncomeCharge
=
mobileServiceIncomeCharge
;
}
public
int
getMobileIncomeFreePoint
()
{
return
mobileIncomeFreePoint
;
}
public
void
setMobileIncomeFreePoint
(
int
mobileIncomeFreePoint
)
{
this
.
mobileIncomeFreePoint
=
mobileIncomeFreePoint
;
}
public
int
getEngineerSalesCommissionRate
()
{
return
engineerSalesCommissionRate
;
}
public
void
setEngineerSalesCommissionRate
(
int
engineerSalesCommissionRate
)
{
this
.
engineerSalesCommissionRate
=
engineerSalesCommissionRate
;
}
public
int
getUserRebateRate
()
{
return
userRebateRate
;
}
public
void
setUserRebateRate
(
int
userRebateRate
)
{
this
.
userRebateRate
=
userRebateRate
;
}
public
double
getReceiptPlatformCommissionRatio
()
{
return
receiptPlatformCommissionRatio
;
}
public
void
setReceiptPlatformCommissionRatio
(
double
receiptPlatformCommissionRatio
)
{
this
.
receiptPlatformCommissionRatio
=
receiptPlatformCommissionRatio
;
}
}
userCenter/src/main/java/com/dayu/usercenter/model/bean/RatioConfigBean.java
0 → 100644
View file @
3e07c10e
package
com
.
dayu
.
usercenter
.
model
.
bean
;
public
class
RatioConfigBean
{
/**
* engineerSalesCommissionRate : 0
* id : 0
* mobileIncomeFreePoint : 0
* mobileServiceCharge : 0
* mobileServiceIncomeCharge : 0
* receiptPlatformCommissionRatio : 0
* userRebateRate : 0
*/
private
int
engineerSalesCommissionRate
;
private
int
id
;
private
int
mobileIncomeFreePoint
;
private
int
mobileServiceCharge
;
private
int
mobileServiceIncomeCharge
;
private
int
receiptPlatformCommissionRatio
;
private
int
userRebateRate
;
public
int
getEngineerSalesCommissionRate
()
{
return
engineerSalesCommissionRate
;
}
public
void
setEngineerSalesCommissionRate
(
int
engineerSalesCommissionRate
)
{
this
.
engineerSalesCommissionRate
=
engineerSalesCommissionRate
;
}
public
int
getId
()
{
return
id
;
}
public
void
setId
(
int
id
)
{
this
.
id
=
id
;
}
public
int
getMobileIncomeFreePoint
()
{
return
mobileIncomeFreePoint
;
}
public
void
setMobileIncomeFreePoint
(
int
mobileIncomeFreePoint
)
{
this
.
mobileIncomeFreePoint
=
mobileIncomeFreePoint
;
}
public
int
getMobileServiceCharge
()
{
return
mobileServiceCharge
;
}
public
void
setMobileServiceCharge
(
int
mobileServiceCharge
)
{
this
.
mobileServiceCharge
=
mobileServiceCharge
;
}
public
int
getMobileServiceIncomeCharge
()
{
return
mobileServiceIncomeCharge
;
}
public
void
setMobileServiceIncomeCharge
(
int
mobileServiceIncomeCharge
)
{
this
.
mobileServiceIncomeCharge
=
mobileServiceIncomeCharge
;
}
public
int
getReceiptPlatformCommissionRatio
()
{
return
receiptPlatformCommissionRatio
;
}
public
void
setReceiptPlatformCommissionRatio
(
int
receiptPlatformCommissionRatio
)
{
this
.
receiptPlatformCommissionRatio
=
receiptPlatformCommissionRatio
;
}
public
int
getUserRebateRate
()
{
return
userRebateRate
;
}
public
void
setUserRebateRate
(
int
userRebateRate
)
{
this
.
userRebateRate
=
userRebateRate
;
}
}
userCenter/src/main/java/com/dayu/usercenter/model/bean/StarRatioBean.java
0 → 100644
View file @
3e07c10e
package
com
.
dayu
.
usercenter
.
model
.
bean
;
public
class
StarRatioBean
{
/**
* id : 0
* ratio : 0
* starLevel : 0
* starLevelName : string
*/
private
int
id
;
private
int
ratio
;
private
int
starLevel
;
private
String
starLevelName
;
public
int
getId
()
{
return
id
;
}
public
void
setId
(
int
id
)
{
this
.
id
=
id
;
}
public
int
getRatio
()
{
return
ratio
;
}
public
void
setRatio
(
int
ratio
)
{
this
.
ratio
=
ratio
;
}
public
int
getStarLevel
()
{
return
starLevel
;
}
public
void
setStarLevel
(
int
starLevel
)
{
this
.
starLevel
=
starLevel
;
}
public
String
getStarLevelName
()
{
return
starLevelName
;
}
public
void
setStarLevelName
(
String
starLevelName
)
{
this
.
starLevelName
=
starLevelName
;
}
}
userCenter/src/main/java/com/dayu/usercenter/model/bean/TreeAddressBean.java
0 → 100644
View file @
3e07c10e
package
com
.
dayu
.
usercenter
.
model
.
bean
;
import
java.util.List
;
public
class
TreeAddressBean
{
/**
* id : 2
* text : 北京城区
* state : open
* checked : false
* attributes : null
* children : []
* parentId : 1
* disabled : false
* parent : false
*/
private
String
id
;
private
String
text
;
private
String
state
;
private
boolean
checked
;
private
Object
attributes
;
private
String
parentId
;
private
boolean
disabled
;
private
boolean
parent
;
private
List
<?>
children
;
public
String
getId
()
{
return
id
;
}
public
void
setId
(
String
id
)
{
this
.
id
=
id
;
}
public
String
getText
()
{
return
text
;
}
public
void
setText
(
String
text
)
{
this
.
text
=
text
;
}
public
String
getState
()
{
return
state
;
}
public
void
setState
(
String
state
)
{
this
.
state
=
state
;
}
public
boolean
isChecked
()
{
return
checked
;
}
public
void
setChecked
(
boolean
checked
)
{
this
.
checked
=
checked
;
}
public
Object
getAttributes
()
{
return
attributes
;
}
public
void
setAttributes
(
Object
attributes
)
{
this
.
attributes
=
attributes
;
}
public
String
getParentId
()
{
return
parentId
;
}
public
void
setParentId
(
String
parentId
)
{
this
.
parentId
=
parentId
;
}
public
boolean
isDisabled
()
{
return
disabled
;
}
public
void
setDisabled
(
boolean
disabled
)
{
this
.
disabled
=
disabled
;
}
public
boolean
isParent
()
{
return
parent
;
}
public
void
setParent
(
boolean
parent
)
{
this
.
parent
=
parent
;
}
public
List
<?>
getChildren
()
{
return
children
;
}
public
void
setChildren
(
List
<?>
children
)
{
this
.
children
=
children
;
}
}
userCenter/src/main/java/com/dayu/usercenter/presenter/homeuser/HomeUserPresenter.java
View file @
3e07c10e
...
...
@@ -67,7 +67,7 @@ public class HomeUserPresenter extends HomeUserContract.Presenter {
@Override
public
void
dumpToOrderRecord
()
{
//
mView.startActivity(ServiceRecordActivity.class);
mView
.
startActivity
(
ServiceRecordActivity
.
class
);
}
@Override
...
...
@@ -77,7 +77,7 @@ public class HomeUserPresenter extends HomeUserContract.Presenter {
@Override
public
void
dumpToSaleRecord
()
{
//
mView.startActivity(SaleRecordActivity.class);
mView
.
startActivity
(
SaleRecordActivity
.
class
);
}
@Override
...
...
userCenter/src/main/java/com/dayu/usercenter/presenter/userinfo/UserInfoContract.java
View file @
3e07c10e
...
...
@@ -3,6 +3,10 @@ package com.dayu.usercenter.presenter.userinfo;
import
com.dayu.base.ui.presenter.BasePresenter
;
import
com.dayu.common.BaseView
;
import
com.dayu.usercenter.model.bean.GlobelRateBean
;
import
com.dayu.usercenter.model.bean.StarRatioBean
;
import
java.util.List
;
/**
* Created by luo on 2016/8/4.
...
...
@@ -10,7 +14,8 @@ import com.dayu.common.BaseView;
public
interface
UserInfoContract
{
interface
View
extends
BaseView
{
void
setStarRatioData
(
List
<
StarRatioBean
>
starRatios
);
void
setGlobelRate
(
GlobelRateBean
rate
);
}
abstract
class
Presenter
extends
BasePresenter
<
View
>
{
...
...
userCenter/src/main/java/com/dayu/usercenter/presenter/userinfo/UserInfoPresenter.java
View file @
3e07c10e
...
...
@@ -7,6 +7,7 @@ import com.dayu.event.UserInfo;
import
com.dayu.usercenter.api.UserService2
;
import
com.dayu.usercenter.model.bean.UserBankInfoBean
;
import
com.dayu.usercenter.model.bean.UserInfoBean
;
import
com.dayu.utils.ToastUtils
;
import
com.dayu.utils.UserManager
;
import
io.reactivex.Observable
;
...
...
@@ -16,6 +17,7 @@ import io.reactivex.Observable;
* on 2017/11/14.
*/
public
class
UserInfoPresenter
extends
UserInfoContract
.
Presenter
{
public
ObservableField
<
String
>
mUrl
=
new
ObservableField
<>();
public
ObservableField
<
UserInfoBean
>
info
=
new
ObservableField
<>();
public
ObservableField
<
UserBankInfoBean
>
bankInfo
=
new
ObservableField
<
UserBankInfoBean
>();
// public ObservableField<Boolean> status = new ObservableField<>();
...
...
@@ -54,6 +56,12 @@ public class UserInfoPresenter extends UserInfoContract.Presenter {
bankInfo
.
set
((
UserBankInfoBean
)
data
);
}
}));
//星级佣金
Api
.
getService
(
UserService2
.
class
).
getStarRatios
().
compose
(
Api
.
applySchedulers
())
.
subscribe
(
baseObserver
(
datas
->
mView
.
setStarRatioData
(
datas
)));
//佣金比率
Api
.
getService
(
UserService2
.
class
).
getGlobelRate
(
1
).
compose
(
Api
.
applySchedulers
())
.
subscribe
(
baseObserver
(
data
->
mView
.
setGlobelRate
(
data
)));
}
}
userCenter/src/main/java/com/dayu/usercenter/ui/activity2/EditAddressActivity.java
0 → 100644
View file @
3e07c10e
package
com
.
dayu
.
usercenter
.
ui
.
activity2
;
import
android.text.Editable
;
import
android.text.TextUtils
;
import
android.widget.EditText
;
import
com.dayu.base.api.Api
;
import
com.dayu.base.ui.activity.BaseActivity
;
import
com.dayu.base.ui.presenter.SImplePresenter
;
import
com.dayu.common.MyTextWatcher
;
import
com.dayu.usercenter.R
;
import
com.dayu.usercenter.api.UserService2
;
import
com.dayu.usercenter.databinding.ActivityEditAddressBinding
;
import
com.dayu.usercenter.model.bean.TreeAddressBean
;
import
com.dayu.utils.ToastUtils
;
import
java.util.ArrayList
;
import
java.util.List
;
public
class
EditAddressActivity
extends
BaseActivity
<
SImplePresenter
,
ActivityEditAddressBinding
>
{
private
String
name
;
private
String
phone
;
private
String
province
;
private
String
city
;
private
String
area
;
private
String
detailAddr
;
private
int
provinceId
;
private
int
cityId
;
private
int
areaId
;
private
List
<
TreeAddressBean
>
provinceList
=
new
ArrayList
<>();
private
List
<
TreeAddressBean
>
cityList
=
new
ArrayList
<>();
private
List
<
TreeAddressBean
>
areaList
=
new
ArrayList
<>();
@Override
public
void
setPresenter
()
{
}
@Override
public
int
getLayoutId
()
{
return
R
.
layout
.
activity_edit_address
;
}
@Override
public
void
initView
()
{
initUser
();
mBind
.
titleBack
.
setOnClickListener
(
view
->
dumpBack
());
addEdtListener
(
mBind
.
edtName
);
addEdtListener
(
mBind
.
edtPhone
);
addEdtListener
(
mBind
.
edtDetailAddr
);
mBind
.
tvSubmit
.
setOnClickListener
(
view
->
submit
());
getTreeAddrData
(-
1
,
1
,
false
);
}
/**
* 获取地址信息
* @param pId
* @param type 1.省 2.市 3.区
* @param showDialog 是否显示选择框
*/
private
void
getTreeAddrData
(
int
pId
,
int
type
,
boolean
showDialog
)
{
Api
.
getService
(
UserService2
.
class
).
getTreeAddress
(
pId
).
compose
(
Api
.
applySchedulers
())
.
safeSubscribe
(
mPresenter
.
baseObserver
(
datas
->{
dealTreeAddrData
(
type
,
datas
,
showDialog
);
}));
}
private
void
dealTreeAddrData
(
int
type
,
List
<
TreeAddressBean
>
datas
,
boolean
showDialog
)
{
ToastUtils
.
showShortToast
(
"addrs: "
+
datas
.
size
());
switch
(
type
){
case
1
:
provinceList
=
datas
;
break
;
case
2
:
cityList
=
datas
;
break
;
case
3
:
areaList
=
datas
;
break
;
}
}
//为EditText添加监听事件
private
void
addEdtListener
(
EditText
editText
)
{
editText
.
addTextChangedListener
(
new
MyTextWatcher
()
{
@Override
public
void
afterTextChanged
(
Editable
s
)
{
updateSubmitSatte
();
}
});
}
//判断是否能提交
private
void
updateSubmitSatte
()
{
name
=
mBind
.
edtName
.
getText
().
toString
().
trim
();
phone
=
mBind
.
edtPhone
.
getText
().
toString
().
trim
();
detailAddr
=
mBind
.
edtDetailAddr
.
getText
().
toString
().
trim
();
boolean
canSubmit
=
!
TextUtils
.
isEmpty
(
name
)
&&
!
TextUtils
.
isEmpty
(
phone
)
&&
!
TextUtils
.
isEmpty
(
detailAddr
);
changeBtnstate
(
canSubmit
);
}
//改变提交按钮状态
private
void
changeBtnstate
(
boolean
canSubmit
)
{
mBind
.
tvSubmit
.
setEnabled
(
canSubmit
);
mBind
.
tvSubmit
.
setAlpha
(
canSubmit
?
1.0f
:
0.35f
);
}
private
void
submit
()
{
}
}
userCenter/src/main/java/com/dayu/usercenter/ui/activity2/EditBankActivity.java
View file @
3e07c10e
...
...
@@ -12,10 +12,13 @@ import com.dayu.event.UserInfo;
import
com.dayu.usercenter.R
;
import
com.dayu.usercenter.api.UserService2
;
import
com.dayu.usercenter.databinding.ActivityEditBankBinding
;
import
com.dayu.usercenter.event.EditBankEvent
;
import
com.dayu.usercenter.model.EditBankData
;
import
com.dayu.utils.ToastUtils
;
import
com.dayu.utils.UserManager
;
import
org.greenrobot.eventbus.EventBus
;
public
class
EditBankActivity
extends
BaseActivity
<
SImplePresenter
,
ActivityEditBankBinding
>
{
private
String
bankName
;
private
String
bankAccount
;
...
...
@@ -48,7 +51,7 @@ public class EditBankActivity extends BaseActivity<SImplePresenter, ActivityEdit
showDialog
();
Api
.
getService
(
UserService2
.
class
).
getUserBankInfo
(
mUserId
).
compose
(
Api
.
applySchedulers
())
.
subscribe
(
mPresenter
.
baseObserver
(
userBankInfoBean
->
{
if
(
userBankInfoBean
!=
null
){
if
(
userBankInfoBean
!=
null
)
{
setted
=
true
;
mBind
.
edtBankName
.
setText
(
userBankInfoBean
.
getBankName
());
mBind
.
edtBankAccount
.
setText
(
userBankInfoBean
.
getBankAccount
());
...
...
@@ -58,6 +61,7 @@ public class EditBankActivity extends BaseActivity<SImplePresenter, ActivityEdit
}));
}
//为EditText添加监听事件
private
void
addEdtListener
(
EditText
editText
)
{
editText
.
addTextChangedListener
(
new
MyTextWatcher
()
{
@Override
...
...
@@ -67,6 +71,7 @@ public class EditBankActivity extends BaseActivity<SImplePresenter, ActivityEdit
});
}
//判断是否能提交
private
void
updateSubmitSatte
()
{
bankName
=
mBind
.
edtBankName
.
getText
().
toString
().
trim
();
bankAccount
=
mBind
.
edtBankAccount
.
getText
().
toString
().
trim
();
...
...
@@ -75,18 +80,25 @@ public class EditBankActivity extends BaseActivity<SImplePresenter, ActivityEdit
changeBtnstate
(
canSubmit
);
}
//改变提交按钮状态
private
void
changeBtnstate
(
boolean
canSubmit
)
{
mBind
.
tvSubmit
.
setEnabled
(
canSubmit
);
mBind
.
tvSubmit
.
setAlpha
(
canSubmit
?
1.0f
:
0.35f
);
}
//提交数据
private
void
submit
()
{
// ToastUtils.showShortToast("setted: "+setted);
showDialog
();
EditBankData
data
=
new
EditBankData
(
bankAccount
,
bankName
,
bankHolder
,
mUserId
,
1
);
Api
.
getService
(
UserService2
.
class
).
setBankInfo
(
data
).
compose
(
Api
.
applySchedulers
())
.
subscribe
(
mPresenter
.
baseObserver
(
reslut
->
{
ToastUtils
.
showShortToast
(
reslut
?
R
.
string
.
submit_success
:
R
.
string
.
submit_fail
);
if
(
reslut
)
{
EventBus
.
getDefault
().
post
(
new
EditBankEvent
(
bankName
,
bankAccount
,
bankHolder
));
finish
();
}
else
{
// ToastUtils.showShortToast(R.string.submit_fail);
}
}));
}
}
userCenter/src/main/java/com/dayu/usercenter/ui/activity2/SaleRecordActivity.java
View file @
3e07c10e
...
...
@@ -38,103 +38,7 @@ public class SaleRecordActivity extends BaseActivity<SImplePresenter,ActivitySal
@Override
public
void
initView
()
{
mBind
.
receivingBack
.
setOnClickListener
(
v
->
dumpBack
());
initChart
();
}
private
void
initChart
()
{
mBind
.
barChart
.
getDescription
().
setEnabled
(
false
);
//设置最大值条目,超出之后不会有值
mBind
.
barChart
.
setMaxVisibleValueCount
(
60
);
//分别在x轴和y轴上进行缩放
mBind
.
barChart
.
setPinchZoom
(
true
);
//设置剩余统计图的阴影
mBind
.
barChart
.
setDrawBarShadow
(
false
);
//设置网格布局
mBind
.
barChart
.
setDrawGridBackground
(
true
);
//通过自定义一个x轴标签来实现2,015 有分割符符bug
ValueFormatter
custom
=
new
MyValueFormatter
(
" "
);
//获取x轴线
XAxis
xAxis
=
mBind
.
barChart
.
getXAxis
();
//设置x轴的显示位置
xAxis
.
setPosition
(
XAxis
.
XAxisPosition
.
BOTTOM
);
//设置网格布局
xAxis
.
setDrawGridLines
(
true
);
//图表将避免第一个和最后一个标签条目被减掉在图表或屏幕的边缘
xAxis
.
setAvoidFirstLastClipping
(
false
);
//绘制标签 指x轴上的对应数值 默认true
xAxis
.
setDrawLabels
(
true
);
xAxis
.
setValueFormatter
(
custom
);
//缩放后x 轴数据重叠问题
xAxis
.
setGranularityEnabled
(
true
);
//获取右边y标签
YAxis
axisRight
=
mBind
.
barChart
.
getAxisRight
();
axisRight
.
setStartAtZero
(
true
);
//获取左边y轴的标签
YAxis
axisLeft
=
mBind
.
barChart
.
getAxisLeft
();
//设置Y轴数值 从零开始
axisLeft
.
setStartAtZero
(
true
);
mBind
.
barChart
.
getAxisLeft
().
setDrawGridLines
(
false
);
//设置动画时间
mBind
.
barChart
.
animateXY
(
600
,
600
);
mBind
.
barChart
.
getLegend
().
setEnabled
(
true
);
getData
();
//设置柱形统计图上的值
mBind
.
barChart
.
getData
().
setValueTextSize
(
10
);
for
(
IDataSet
set
:
mBind
.
barChart
.
getData
().
getDataSets
())
{
set
.
setDrawValues
(!
set
.
isDrawValuesEnabled
());
}
}
private
void
getData
(){
ArrayList
<
BarEntry
>
values
=
new
ArrayList
<>();
Float
aFloat
=
Float
.
valueOf
(
"1"
);
Log
.
v
(
"xue"
,
"aFloat+++++"
+
aFloat
);
BarEntry
barEntry
=
new
BarEntry
(
aFloat
,
Float
.
valueOf
(
"100"
));
BarEntry
barEntry1
=
new
BarEntry
(
Float
.
valueOf
(
"2"
),
Float
.
valueOf
(
"210"
));
BarEntry
barEntry2
=
new
BarEntry
(
Float
.
valueOf
(
"3"
),
Float
.
valueOf
(
"300"
));
BarEntry
barEntry3
=
new
BarEntry
(
Float
.
valueOf
(
"4"
),
Float
.
valueOf
(
"450"
));
BarEntry
barEntry4
=
new
BarEntry
(
Float
.
valueOf
(
"5"
),
Float
.
valueOf
(
"300"
));
BarEntry
barEntry5
=
new
BarEntry
(
Float
.
valueOf
(
"6"
),
Float
.
valueOf
(
"650"
));
BarEntry
barEntry6
=
new
BarEntry
(
Float
.
valueOf
(
"7"
),
Float
.
valueOf
(
"740"
));
values
.
add
(
barEntry
);
values
.
add
(
barEntry1
);
values
.
add
(
barEntry2
);
values
.
add
(
barEntry3
);
values
.
add
(
barEntry4
);
values
.
add
(
barEntry5
);
values
.
add
(
barEntry6
);
BarDataSet
set1
;
if
(
mBind
.
barChart
.
getData
()
!=
null
&&
mBind
.
barChart
.
getData
().
getDataSetCount
()
>
0
)
{
set1
=
(
BarDataSet
)
mBind
.
barChart
.
getData
().
getDataSetByIndex
(
0
);
set1
.
setValues
(
values
);
mBind
.
barChart
.
getData
().
notifyDataChanged
();
mBind
.
barChart
.
notifyDataSetChanged
();
}
else
{
set1
=
new
BarDataSet
(
values
,
"元"
);
// set1.setColors(ColorTemplate.VORDIPLOM_COLORS);
set1
.
setDrawValues
(
false
);
ArrayList
<
IBarDataSet
>
dataSets
=
new
ArrayList
<>();
dataSets
.
add
(
set1
);
BarData
data
=
new
BarData
(
dataSets
);
mBind
.
barChart
.
setData
(
data
);
mBind
.
barChart
.
setFitBars
(
true
);
}
//绘制图表
mBind
.
barChart
.
invalidate
();
}
}
userCenter/src/main/java/com/dayu/usercenter/ui/activity2/ServiceRecordActivity.java
View file @
3e07c10e
package
com
.
dayu
.
usercenter
.
ui
.
activity2
;
import
android.support.v7.widget.LinearLayoutManager
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.chad.library.adapter.base.BaseViewHolder
;
import
com.dayu.base.ui.activity.BaseActivity
;
import
com.dayu.base.ui.presenter.SImplePresenter
;
import
com.dayu.usercenter.R
;
import
com.dayu.usercenter.databinding.ActivityServiceRecordBinding
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
* Created by mReturn
* on 2020/2/15
...
...
@@ -23,5 +30,26 @@ public class ServiceRecordActivity extends BaseActivity<SImplePresenter,Activity
@Override
public
void
initView
()
{
mBind
.
receivingBack
.
setOnClickListener
(
v
->
dumpBack
());
setAdapter
();
}
private
void
setAdapter
()
{
List
<
String
>
testList
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
13
;
i
++)
{
testList
.
add
(
"test data"
+
i
);
}
BaseQuickAdapter
<
String
,
BaseViewHolder
>
adapter
=
new
BaseQuickAdapter
<
String
,
BaseViewHolder
>(
R
.
layout
.
item_record_common
,
testList
)
{
@Override
protected
void
convert
(
BaseViewHolder
helper
,
String
item
)
{
helper
.
setText
(
R
.
id
.
tv_item1
,
item
);
helper
.
setText
(
R
.
id
.
tv_item2
,
item
);
helper
.
setText
(
R
.
id
.
tv_item3
,
item
);
}
};
mBind
.
rvRecord
.
setLayoutManager
(
new
LinearLayoutManager
(
this
));
mBind
.
rvRecord
.
setAdapter
(
adapter
);
}
}
userCenter/src/main/java/com/dayu/usercenter/ui/activity2/TestRecordActivity.java
0 → 100644
View file @
3e07c10e
package
com
.
dayu
.
usercenter
.
ui
.
activity2
;
import
android.util.Log
;
import
com.dayu.base.ui.activity.BaseActivity
;
import
com.dayu.base.ui.presenter.SImplePresenter
;
import
com.dayu.usercenter.R
;
import
com.dayu.usercenter.databinding.ActivitySaleRecordBinding
;
import
com.dayu.usercenter.databinding.ActivityTestRecordBinding
;
import
com.dayu.usercenter.ui.MyValueFormatter
;
import
com.github.mikephil.charting.components.XAxis
;
import
com.github.mikephil.charting.components.YAxis
;
import
com.github.mikephil.charting.data.BarData
;
import
com.github.mikephil.charting.data.BarDataSet
;
import
com.github.mikephil.charting.data.BarEntry
;
import
com.github.mikephil.charting.formatter.ValueFormatter
;
import
com.github.mikephil.charting.interfaces.datasets.IBarDataSet
;
import
com.github.mikephil.charting.interfaces.datasets.IDataSet
;
import
java.util.ArrayList
;
/**
* Created by mReturn
**/
public
class
TestRecordActivity
extends
BaseActivity
<
SImplePresenter
,
ActivityTestRecordBinding
>
{
@Override
public
int
getLayoutId
()
{
return
R
.
layout
.
activity_test_record
;
}
@Override
public
void
setPresenter
()
{
}
@Override
public
void
initView
()
{
mBind
.
receivingBack
.
setOnClickListener
(
v
->
dumpBack
());
initChart
();
}
private
void
initChart
()
{
mBind
.
barChart
.
getDescription
().
setEnabled
(
false
);
//设置最大值条目,超出之后不会有值
mBind
.
barChart
.
setMaxVisibleValueCount
(
60
);
//分别在x轴和y轴上进行缩放
mBind
.
barChart
.
setPinchZoom
(
true
);
//设置剩余统计图的阴影
mBind
.
barChart
.
setDrawBarShadow
(
false
);
//设置网格布局
mBind
.
barChart
.
setDrawGridBackground
(
true
);
//通过自定义一个x轴标签来实现2,015 有分割符符bug
ValueFormatter
custom
=
new
MyValueFormatter
(
" "
);
//获取x轴线
XAxis
xAxis
=
mBind
.
barChart
.
getXAxis
();
//设置x轴的显示位置
xAxis
.
setPosition
(
XAxis
.
XAxisPosition
.
BOTTOM
);
//设置网格布局
xAxis
.
setDrawGridLines
(
true
);
//图表将避免第一个和最后一个标签条目被减掉在图表或屏幕的边缘
xAxis
.
setAvoidFirstLastClipping
(
false
);
//绘制标签 指x轴上的对应数值 默认true
xAxis
.
setDrawLabels
(
true
);
xAxis
.
setValueFormatter
(
custom
);
//缩放后x 轴数据重叠问题
xAxis
.
setGranularityEnabled
(
true
);
//获取右边y标签
YAxis
axisRight
=
mBind
.
barChart
.
getAxisRight
();
axisRight
.
setStartAtZero
(
true
);
//获取左边y轴的标签
YAxis
axisLeft
=
mBind
.
barChart
.
getAxisLeft
();
//设置Y轴数值 从零开始
axisLeft
.
setStartAtZero
(
true
);
mBind
.
barChart
.
getAxisLeft
().
setDrawGridLines
(
false
);
//设置动画时间
mBind
.
barChart
.
animateXY
(
600
,
600
);
mBind
.
barChart
.
getLegend
().
setEnabled
(
true
);
getData
();
//设置柱形统计图上的值
mBind
.
barChart
.
getData
().
setValueTextSize
(
10
);
for
(
IDataSet
set
:
mBind
.
barChart
.
getData
().
getDataSets
())
{
set
.
setDrawValues
(!
set
.
isDrawValuesEnabled
());
}
}
private
void
getData
(){
ArrayList
<
BarEntry
>
values
=
new
ArrayList
<>();
Float
aFloat
=
Float
.
valueOf
(
"1"
);
Log
.
v
(
"xue"
,
"aFloat+++++"
+
aFloat
);
BarEntry
barEntry
=
new
BarEntry
(
aFloat
,
Float
.
valueOf
(
"100"
));
BarEntry
barEntry1
=
new
BarEntry
(
Float
.
valueOf
(
"2"
),
Float
.
valueOf
(
"210"
));
BarEntry
barEntry2
=
new
BarEntry
(
Float
.
valueOf
(
"3"
),
Float
.
valueOf
(
"300"
));
BarEntry
barEntry3
=
new
BarEntry
(
Float
.
valueOf
(
"4"
),
Float
.
valueOf
(
"450"
));
BarEntry
barEntry4
=
new
BarEntry
(
Float
.
valueOf
(
"5"
),
Float
.
valueOf
(
"300"
));
BarEntry
barEntry5
=
new
BarEntry
(
Float
.
valueOf
(
"6"
),
Float
.
valueOf
(
"650"
));
BarEntry
barEntry6
=
new
BarEntry
(
Float
.
valueOf
(
"7"
),
Float
.
valueOf
(
"740"
));
values
.
add
(
barEntry
);
values
.
add
(
barEntry1
);
values
.
add
(
barEntry2
);
values
.
add
(
barEntry3
);
values
.
add
(
barEntry4
);
values
.
add
(
barEntry5
);
values
.
add
(
barEntry6
);
BarDataSet
set1
;
if
(
mBind
.
barChart
.
getData
()
!=
null
&&
mBind
.
barChart
.
getData
().
getDataSetCount
()
>
0
)
{
set1
=
(
BarDataSet
)
mBind
.
barChart
.
getData
().
getDataSetByIndex
(
0
);
set1
.
setValues
(
values
);
mBind
.
barChart
.
getData
().
notifyDataChanged
();
mBind
.
barChart
.
notifyDataSetChanged
();
}
else
{
set1
=
new
BarDataSet
(
values
,
"元"
);
// set1.setColors(ColorTemplate.VORDIPLOM_COLORS);
set1
.
setDrawValues
(
false
);
ArrayList
<
IBarDataSet
>
dataSets
=
new
ArrayList
<>();
dataSets
.
add
(
set1
);
BarData
data
=
new
BarData
(
dataSets
);
mBind
.
barChart
.
setData
(
data
);
mBind
.
barChart
.
setFitBars
(
true
);
}
//绘制图表
mBind
.
barChart
.
invalidate
();
}
}
userCenter/src/main/java/com/dayu/usercenter/ui/activity2/UserInfoActivity.java
View file @
3e07c10e
...
...
@@ -8,11 +8,19 @@ import android.widget.TextView;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.chad.library.adapter.base.BaseViewHolder
;
import
com.dayu.base.ui.activity.BaseActivity
;
import
com.dayu.event.UserInfo
;
import
com.dayu.usercenter.R
;
import
com.dayu.usercenter.databinding.ActivityUserInfoBinding
;
import
com.dayu.usercenter.event.EditBankEvent
;
import
com.dayu.usercenter.model.bean.GlobelRateBean
;
import
com.dayu.usercenter.model.bean.StarRatioBean
;
import
com.dayu.usercenter.presenter.userinfo.UserInfoContract
;
import
com.dayu.usercenter.presenter.userinfo.UserInfoPresenter
;
import
com.dayu.usercenter.ui.activity.PersonInfoActivity
;
import
com.dayu.utils.UserManager
;
import
org.greenrobot.eventbus.EventBus
;
import
org.greenrobot.eventbus.Subscribe
;
import
java.util.Arrays
;
import
java.util.List
;
...
...
@@ -23,6 +31,7 @@ import java.util.List;
**/
public
class
UserInfoActivity
extends
BaseActivity
<
UserInfoPresenter
,
ActivityUserInfoBinding
>
implements
UserInfoContract
.
View
{
private
String
globelRate
=
""
;
@Override
public
void
setPresenter
()
{
mBind
.
setPresenter
(
mPresenter
);
...
...
@@ -35,66 +44,95 @@ public class UserInfoActivity extends BaseActivity<UserInfoPresenter, ActivityUs
@Override
public
void
initView
()
{
initStarTitle
();
setStarItemAdapter
();
setUserRulr2
(
"15%"
);
EventBus
.
getDefault
().
register
(
this
);
setUserRule2
(
globelRate
+
"%"
);
mBind
.
cvHeader
.
setOnClickListener
(
view
->
startActivity
(
PersonInfoActivity
.
class
));
mBind
.
btnEditBank
.
setOnClickListener
(
view
->
startActivity
(
EditBankActivity
.
class
));
mBind
.
btnEditAddr
.
setOnClickListener
(
view
->
startActivity
(
EditAddressActivity
.
class
));
}
private
void
setUserRul
r
2
(
String
rulr2
)
{
private
void
setUserRul
e
2
(
String
rulr2
)
{
String
str
=
getString
(
R
.
string
.
user_info_rule2_1
)+
"<font color='#3e96e2'>"
+
rulr2
+
"</font>"
+
getString
(
R
.
string
.
user_info_rule2_2
);
mBind
.
tvRule2
.
setText
(
Html
.
fromHtml
(
str
));
}
private
void
initStarTitle
()
{
String
[]
titles
=
new
String
[]{
getString
(
R
.
string
.
user_rule_star
),
getString
(
R
.
string
.
user_rule_star5
),
getString
(
R
.
string
.
user_rule_star4
),
getString
(
R
.
string
.
user_rule_star3
),
getString
(
R
.
string
.
user_rule_star2
),
getString
(
R
.
string
.
user_rule_star1
)};
List
<
String
>
titleList
=
Arrays
.
asList
(
titles
);
BaseQuickAdapter
<
String
,
BaseViewHolder
>
titleAdapter
=
new
BaseQuickAdapter
<
String
,
BaseViewHolder
>(
R
.
layout
.
item_rule_star
,
titleList
)
{
@Override
protected
void
convert
(
BaseViewHolder
helper
,
String
item
)
{
TextView
tvItem
=
helper
.
getView
(
R
.
id
.
tv_item
);
tvItem
.
setText
(
item
);
if
(
mData
.
indexOf
(
item
)
==
0
||
mData
.
indexOf
(
item
)
==
mData
.
size
()
-
1
)
{
tvItem
.
setBackgroundResource
(
R
.
drawable
.
bg_order_step_title1
);
}
else
if
(
mData
.
indexOf
(
item
)
==
mData
.
size
()
-
2
){
tvItem
.
setBackgroundResource
(
R
.
drawable
.
bg_order_step_title2
);
}
else
{
tvItem
.
setBackgroundResource
(
R
.
drawable
.
bg_order_step_title3
);
}
}
};
mBind
.
rvStarTitle
.
setLayoutManager
(
new
GridLayoutManager
(
this
,
6
));
mBind
.
rvStarTitle
.
setAdapter
(
titleAdapter
);
@Override
public
void
onResume
()
{
super
.
onResume
();
UserInfo
userInfo
=
UserManager
.
getInstance
().
getUser
();
if
(
userInfo
!=
null
)
{
mPresenter
.
mUrl
.
set
(
userInfo
.
getHeaderImg
());
}
}
private
void
setStarItemAdapter
()
{
String
[]
datas
=
new
String
[]{
getString
(
R
.
string
.
commission_str
),
"10%"
,
"15%"
,
"20%"
,
"30%"
,
"40%"
};
List
<
String
>
dataList
=
Arrays
.
asList
(
datas
);
BaseQuickAdapter
<
String
,
BaseViewHolder
>
titleAdapter
=
new
BaseQuickAdapter
<
String
,
BaseViewHolder
>(
R
.
layout
.
item_rule_star
,
dataList
)
{
@Override
public
void
setStarRatioData
(
List
<
StarRatioBean
>
starRatios
)
{
if
(
starRatios
==
null
||
starRatios
.
size
()
==
0
)
return
;
StarRatioBean
ratioBean
=
new
StarRatioBean
();
ratioBean
.
setId
(-
1
);
starRatios
.
add
(
0
,
ratioBean
);
// for (int i=0;i<7;i++){
// StarRatioBean bean = new StarRatioBean();
// bean.setRatio(10*i);
// bean.setStarLevelName(i+"星");
// starRatios.add(bean);
// }
// ToastUtils.showShortToast("star ratio: "+starRatios.size());
BaseQuickAdapter
<
StarRatioBean
,
BaseViewHolder
>
mAdapter
=
new
BaseQuickAdapter
<
StarRatioBean
,
BaseViewHolder
>(
R
.
layout
.
item_rule_star_ratio
,
starRatios
)
{
@Override
protected
void
convert
(
BaseViewHolder
helper
,
St
ring
item
)
{
TextView
tvItem
=
helper
.
getView
(
R
.
id
.
tv_item
);
tvItem
.
setText
(
item
);
protected
void
convert
(
BaseViewHolder
helper
,
St
arRatioBean
item
)
{
TextView
tvItem
1
=
helper
.
getView
(
R
.
id
.
tv_item1
);
TextView
tvItem2
=
helper
.
getView
(
R
.
id
.
tv_item2
);
if
(
mData
.
indexOf
(
item
)
==
0
||
mData
.
indexOf
(
item
)
==
mData
.
size
()
-
1
)
{
tvItem
.
setBackgroundResource
(
R
.
drawable
.
bg_order_step_item1
);
tvItem1
.
setBackgroundResource
(
R
.
drawable
.
bg_order_step_title1
);
tvItem2
.
setBackgroundResource
(
R
.
drawable
.
bg_order_step_item1
);
}
else
if
(
mData
.
indexOf
(
item
)
==
mData
.
size
()
-
2
){
tvItem
.
setBackgroundResource
(
R
.
drawable
.
bg_order_step_item2
);
tvItem1
.
setBackgroundResource
(
R
.
drawable
.
bg_order_step_title2
);
tvItem2
.
setBackgroundResource
(
R
.
drawable
.
bg_order_step_item2
);
}
else
{
tvItem
.
setBackgroundResource
(
R
.
drawable
.
bg_order_step_item3
);
tvItem1
.
setBackgroundResource
(
R
.
drawable
.
bg_order_step_title3
);
tvItem2
.
setBackgroundResource
(
R
.
drawable
.
bg_order_step_item3
);
}
if
(
mData
.
indexOf
(
item
)
>
0
){
tvItem
.
setTextColor
(
Color
.
parseColor
(
"#3e96e2"
));
tvItem2
.
setTextColor
(
Color
.
parseColor
(
"#3e96e2"
));
}
if
(
mData
.
indexOf
(
item
)
==
0
){
tvItem1
.
setText
(
getString
(
R
.
string
.
user_rule_star
));
tvItem2
.
setText
(
getString
(
R
.
string
.
commission_str
));
}
else
{
tvItem1
.
setText
(
item
.
getStarLevelName
());
tvItem2
.
setText
(
item
.
getRatio
()+
"%"
);
}
}
};
mBind
.
rvStarValue
.
setLayoutManager
(
new
GridLayoutManager
(
this
,
6
));
mBind
.
rvStarValue
.
setAdapter
(
titleAdapter
);
int
spancount
=
starRatios
.
size
()>
6
?
starRatios
.
size
():
6
;
mBind
.
rvStarValue
.
setLayoutManager
(
new
GridLayoutManager
(
this
,
spancount
));
mBind
.
rvStarValue
.
setAdapter
(
mAdapter
);
}
@Override
public
void
setGlobelRate
(
GlobelRateBean
rate
)
{
if
(
rate
!=
null
){
globelRate
=
rate
.
getEngineerSalesCommissionRate
()+
""
;
}
setUserRule2
(
globelRate
+
"%"
);
}
@Override
protected
void
onDestroy
()
{
super
.
onDestroy
();
EventBus
.
getDefault
().
unregister
(
this
);
}
@Subscribe
public
void
onBankInfoChange
(
EditBankEvent
event
){
mBind
.
tvBankName
.
setText
(
event
.
bankName
);
mBind
.
tvBankAccount
.
setText
(
event
.
bankAccount
);
mBind
.
tvBankHolder
.
setText
(
event
.
bankHolder
);
}
}
userCenter/src/main/release/AndroidManifest.xml
View file @
3e07c10e
...
...
@@ -90,6 +90,10 @@
android:name=
".ui.activity2.EditBankActivity"
android:windowSoftInputMode=
"stateHidden"
android:screenOrientation=
"portrait"
/>
<activity
android:name=
".ui.activity2.EditAddressActivity"
android:windowSoftInputMode=
"stateHidden"
android:screenOrientation=
"portrait"
/>
</application>
</manifest>
userCenter/src/main/res/layout/activity_edit_address.xml
0 → 100644
View file @
3e07c10e
<?xml version="1.0" encoding="utf-8"?>
<layout
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:orientation=
"vertical"
>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@color/cl_home_listview_bg"
android:orientation=
"vertical"
android:visibility=
"visible"
>
<RelativeLayout
android:id=
"@+id/title_idea"
style=
"@style/title"
>
<TextView
android:id=
"@+id/text_idea"
style=
"@style/text_title"
android:text=
"@string/user_addr_info"
/>
<ImageView
android:id=
"@+id/title_back"
style=
"@style/title_image_back"
/>
<ImageView
style=
"@style/card_line"
android:layout_alignParentBottom=
"true"
/>
</RelativeLayout>
</RelativeLayout>
<LinearLayout
style=
"@style/ll_user_edit"
>
<TextView
style=
"@style/tv_user_edit2"
android:text=
"@string/name_"
/>
<EditText
android:id=
"@+id/edt_name"
style=
"@style/edt_user_edit"
/>
</LinearLayout>
<LinearLayout
style=
"@style/ll_user_edit"
android:layout_marginTop=
"2dp"
>
<TextView
style=
"@style/tv_user_edit2"
android:text=
"@string/phone_"
/>
<EditText
android:id=
"@+id/edt_phone"
style=
"@style/edt_user_edit"
android:inputType=
"number"
/>
</LinearLayout>
<LinearLayout
android:id=
"@+id/ll_province"
style=
"@style/ll_user_edit"
android:layout_marginTop=
"2dp"
>
<TextView
style=
"@style/tv_user_edit2"
android:text=
"@string/belong_province"
/>
<EditText
android:id=
"@+id/edt_province"
style=
"@style/edt_user_edit"
android:layout_width=
"wrap_content"
android:layout_weight=
"1"
android:enabled=
"false"
android:hint=
"@string/select_province_hint"
android:inputType=
"number"
/>
<ImageView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_vertical"
android:background=
"@drawable/icon_arrow_right"
/>
</LinearLayout>
<LinearLayout
android:id=
"@+id/ll_city"
style=
"@style/ll_user_edit"
android:layout_marginTop=
"2dp"
android:visibility=
"gone"
>
<TextView
style=
"@style/tv_user_edit2"
android:text=
"@string/setlect_ciy"
/>
<EditText
android:id=
"@+id/edt_city"
style=
"@style/edt_user_edit"
android:layout_width=
"wrap_content"
android:layout_weight=
"1"
android:enabled=
"false"
android:hint=
"@string/setlect_ciy_hint"
android:inputType=
"number"
/>
<ImageView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_vertical"
android:background=
"@drawable/icon_arrow_right"
/>
</LinearLayout>
<LinearLayout
android:id=
"@+id/ll_area"
style=
"@style/ll_user_edit"
android:layout_marginTop=
"2dp"
android:visibility=
"gone"
>
<TextView
style=
"@style/tv_user_edit2"
android:text=
"@string/setlect_area"
/>
<EditText
android:id=
"@+id/edt_area"
style=
"@style/edt_user_edit"
android:layout_width=
"wrap_content"
android:layout_weight=
"1"
android:enabled=
"false"
android:hint=
"@string/setlect_area_hint"
android:inputType=
"number"
/>
<ImageView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_vertical"
android:background=
"@drawable/icon_arrow_right"
/>
</LinearLayout>
<LinearLayout
style=
"@style/ll_user_edit"
android:layout_marginTop=
"2dp"
>
<TextView
style=
"@style/tv_user_edit2"
android:text=
"@string/deatail_addr_"
/>
<EditText
android:id=
"@+id/edt_detail_addr"
style=
"@style/edt_user_edit"
/>
</LinearLayout>
<View
android:layout_width=
"wrap_content"
android:layout_height=
"0dp"
android:layout_weight=
"1"
/>
<TextView
android:id=
"@+id/tv_submit"
style=
"@style/btn_bottom_common"
android:layout_margin=
"20dp"
android:alpha=
"0.35"
android:enabled=
"false"
android:text=
"@string/submit"
/>
</LinearLayout>
</layout>
userCenter/src/main/res/layout/activity_edit_bank.xml
View file @
3e07c10e
...
...
@@ -41,7 +41,6 @@
<EditText
android:id=
"@+id/edt_bank_name"
style=
"@style/edt_user_edit"
android:hint=
"@string/user_bank_name_hint"
/>
</LinearLayout>
...
...
@@ -57,8 +56,7 @@
android:id=
"@+id/edt_bank_account"
style=
"@style/edt_user_edit"
android:inputType=
"number"
android:hint=
"@string/user_bank_account_hint"
android:maxLength=
"20"
/>
/>
</LinearLayout>
<LinearLayout
...
...
@@ -72,7 +70,6 @@
<EditText
android:id=
"@+id/edt_bank_holder"
style=
"@style/edt_user_edit"
android:hint=
"@string/user_bank_holer_hint"
/>
</LinearLayout>
...
...
userCenter/src/main/res/layout/activity_sale_record.xml
View file @
3e07c10e
...
...
@@ -4,6 +4,8 @@
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:paddingLeft=
"1dp"
android:paddingRight=
"1dp"
android:orientation=
"vertical"
>
<RelativeLayout
...
...
@@ -22,139 +24,93 @@
</RelativeLayout>
<ImageView
style=
"@style/card_line"
/>
<android.support.v4.widget.NestedScrollView
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
android:layout_height=
"wrap_content"
android:orientation=
"horizontal"
>
<ImageView
android:layout_width=
"130dp"
android:layout_height=
"110dp"
android:background=
"@color/cl_white"
android:src=
"@drawable/icon_money_bag2"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:gravity=
"center_horizontal"
android:orientation=
"vertical"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@color/cl_white"
android:gravity=
"center"
>
<Button
android:id=
"@+id/btn_week"
android:layout_width=
"0dp"
android:layout_height=
"35dp"
android:layout_weight=
"1"
android:background=
"@drawable/detail_center_selector"
android:gravity=
"center"
android:text=
"@string/week_str"
/>
<Button
android:id=
"@+id/btn_month"
android:layout_width=
"0dp"
android:layout_height=
"35dp"
android:layout_weight=
"1"
android:background=
"@drawable/detail_center_selector"
android:gravity=
"center"
android:text=
"@string/month_str"
/>
<Button
android:id=
"@+id/btn_year"
android:layout_width=
"0dp"
android:layout_height=
"35dp"
android:layout_weight=
"1"
android:background=
"@drawable/detail_end_selector"
android:gravity=
"center"
android:text=
"@string/year_str"
/>
</LinearLayout>
<com.github.mikephil.charting.charts.BarChart
android:visibility=
"gone"
android:id=
"@+id/bar_chart"
android:layout_width=
"match_parent"
android:layout_height=
"300dp"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_margin=
"15dp"
android:background=
"@color/cl_white"
android:orientation=
"vertical"
android:padding=
"10dp"
>
<LinearLayout
style=
"@style/sale_record_value"
android:layout_marginTop=
"10dp"
>
<TextView
style=
"@style/sale_record_text"
android:text=
"@string/success_recommend_money"
/>
<TextView
android:id=
"@+id/tv_recommend_money"
style=
"@style/sale_item_text2"
android:text=
"0"
/>
</LinearLayout>
<LinearLayout
style=
"@style/sale_record_value"
>
<TextView
style=
"@style/sale_record_text"
android:text=
"@string/success_sale_orders"
/>
<TextView
android:id=
"@+id/tv_order_count"
style=
"@style/sale_item_text2"
android:text=
"0"
/>
</LinearLayout>
<LinearLayout
style=
"@style/sale_record_value"
>
<TextView
style=
"@style/sale_record_text"
android:text=
"@string/earned_sale_bonus"
/>
<TextView
android:id=
"@+id/tv_bonus"
style=
"@style/sale_item_text2"
/>
</LinearLayout>
<LinearLayout
style=
"@style/sale_record_value"
>
<TextView
style=
"@style/sale_record_text"
android:text=
"@string/record_city_ranking"
/>
<TextView
android:id=
"@+id/tv_city_rank"
style=
"@style/sale_item_text2"
/>
</LinearLayout>
<LinearLayout
style=
"@style/sale_record_value"
>
<TextView
style=
"@style/sale_record_text"
android:text=
"@string/record_provincial_ranking"
/>
<TextView
android:id=
"@+id/tv_province_rank"
style=
"@style/sale_item_text2"
/>
</LinearLayout>
<LinearLayout
style=
"@style/sale_record_value"
android:layout_marginBottom=
"10dp"
>
<TextView
style=
"@style/sale_record_text"
android:text=
"@string/record_country_ranking"
/>
<TextView
android:id=
"@+id/tv_country_rank"
style=
"@style/sale_item_text2"
/>
</LinearLayout>
</LinearLayout>
<TextView
style=
"@style/sale_item_text"
android:layout_width=
"wrap_content"
android:layout_marginTop=
"10dp"
android:text=
"0.0"
android:textColor=
"@color/text_common_green"
android:textSize=
"18sp"
/>
<TextView
style=
"@style/sale_item_text"
android:text=
"@string/record_reward_total"
android:textSize=
"14sp"
/>
<TextView
style=
"@style/sale_item_text"
android:layout_marginTop=
"5dp"
android:text=
"0"
android:textColor=
"@color/text_common_blue"
android:textSize=
"18sp"
/>
<TextView
style=
"@style/sale_item_text"
android:text=
"@string/record_done_sale"
android:textSize=
"14sp"
/>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_marginTop=
"15dp"
android:layout_width=
"match_parent"
android:layout_height=
"30dp"
android:orientation=
"horizontal"
>
<TextView
style=
"@style/sale_item_text"
android:layout_width=
"0dp"
android:layout_height=
"match_parent"
android:layout_weight=
"1"
android:background=
"@drawable/bg_order_step_title1"
android:gravity=
"center"
android:text=
"@string/reward_money"
/>
<TextView
style=
"@style/sale_item_text"
android:layout_width=
"0dp"
android:layout_height=
"match_parent"
android:layout_weight=
"2"
android:background=
"@drawable/bg_order_step_title2"
android:gravity=
"center"
android:text=
"@string/reward_company"
/>
<TextView
style=
"@style/sale_item_text"
android:layout_width=
"0dp"
android:layout_height=
"match_parent"
android:layout_weight=
"1"
android:background=
"@drawable/bg_order_step_title1"
android:gravity=
"center"
android:text=
"@string/reward_date"
/>
</LinearLayout>
<android.support.v7.widget.RecyclerView
android:id=
"@+id/rv_record"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginBottom=
"2dp"
android:overScrollMode=
"never"
/>
</android.support.v4.widget.NestedScrollView>
</LinearLayout>
</layout>
\ No newline at end of file
userCenter/src/main/res/layout/activity_service_record.xml
View file @
3e07c10e
...
...
@@ -4,7 +4,9 @@
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:orientation=
"vertical"
>
android:orientation=
"vertical"
android:paddingLeft=
"1dp"
android:paddingRight=
"1dp"
>
<RelativeLayout
android:id=
"@+id/title_back"
...
...
@@ -13,139 +15,99 @@
<TextView
android:id=
"@+id/tv_title"
style=
"@style/text_title"
android:text=
"@string/user_service_record"
/>
android:text=
"@string/user_service_record"
/>
<ImageView
android:id=
"@+id/receiving_back"
style=
"@style/title_image_back"
/>
style=
"@style/title_image_back"
/>
</RelativeLayout>
<ImageView
style=
"@style/card_line"
/>
<android.support.v4.widget.NestedScrollView
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
android:layout_height=
"wrap_content"
android:orientation=
"horizontal"
>
<ImageView
android:layout_width=
"130dp"
android:layout_height=
"110dp"
android:background=
"@color/cl_white"
android:src=
"@drawable/icon_money_bag2"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:gravity=
"center_horizontal"
android:orientation=
"vertical"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@color/cl_white"
android:gravity=
"center"
>
<Button
android:id=
"@+id/btn_week"
android:layout_width=
"0dp"
android:layout_height=
"35dp"
android:layout_weight=
"1"
android:background=
"@drawable/detail_center_selector"
android:gravity=
"center"
android:text=
"@string/week_str"
/>
<Button
android:id=
"@+id/btn_month"
android:layout_width=
"0dp"
android:layout_height=
"35dp"
android:layout_weight=
"1"
android:background=
"@drawable/detail_center_selector"
android:gravity=
"center"
android:text=
"@string/month_str"
/>
<Button
android:id=
"@+id/btn_year"
android:layout_width=
"0dp"
android:layout_height=
"35dp"
android:layout_weight=
"1"
android:background=
"@drawable/detail_end_selector"
android:gravity=
"center"
android:text=
"@string/year_str"
/>
</LinearLayout>
<com.github.mikephil.charting.charts.BarChart
android:visibility=
"gone"
android:id=
"@+id/bar_chart"
android:layout_width=
"match_parent"
android:layout_height=
"300dp"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_margin=
"15dp"
android:background=
"@color/cl_white"
android:orientation=
"vertical"
android:padding=
"10dp"
>
<LinearLayout
style=
"@style/sale_record_value"
android:layout_marginTop=
"10dp"
>
<TextView
style=
"@style/sale_record_text"
android:layout_height=
"match_parent"
android:text=
"@string/success_sale_orders"
/>
<TextView
android:id=
"@+id/tv_orders_conut"
style=
"@style/sale_item_text2"
android:text=
"0"
/>
</LinearLayout>
<LinearLayout
style=
"@style/sale_record_value"
>
<TextView
style=
"@style/sale_record_text"
android:text=
"@string/success_service_income"
/>
<TextView
android:id=
"@+id/tv_income"
style=
"@style/sale_item_text2"
android:text=
"0"
/>
</LinearLayout>
<LinearLayout
style=
"@style/sale_record_value"
>
<TextView
style=
"@style/sale_record_text"
android:text=
"@string/record_city_ranking"
/>
<TextView
android:id=
"@+id/tv_city_rank"
style=
"@style/sale_item_text2"
/>
</LinearLayout>
<LinearLayout
style=
"@style/sale_record_value"
>
<TextView
style=
"@style/sale_record_text"
android:text=
"@string/record_provincial_ranking"
/>
<TextView
android:id=
"@+id/tv_province_rank"
style=
"@style/sale_item_text2"
/>
</LinearLayout>
<LinearLayout
style=
"@style/sale_record_value"
android:layout_marginBottom=
"10dp"
>
<TextView
style=
"@style/sale_record_text"
android:text=
"@string/record_country_ranking"
/>
<TextView
android:id=
"@+id/tv_country_rank"
style=
"@style/sale_item_text2"
/>
</LinearLayout>
</LinearLayout>
<TextView
style=
"@style/sale_item_text"
android:layout_width=
"wrap_content"
android:layout_marginTop=
"10dp"
android:text=
"0.0"
android:textColor=
"@color/text_common_green"
android:textSize=
"18sp"
/>
<TextView
style=
"@style/sale_item_text"
android:text=
"@string/record_income_total"
android:textSize=
"14sp"
/>
<TextView
style=
"@style/sale_item_text"
android:layout_marginTop=
"5dp"
android:text=
"0"
android:textColor=
"@color/text_common_blue"
android:textSize=
"18sp"
/>
<TextView
style=
"@style/sale_item_text"
android:text=
"@string/record_done_service"
android:textSize=
"14sp"
/>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_marginTop=
"15dp"
android:layout_width=
"match_parent"
android:layout_height=
"30dp"
android:orientation=
"horizontal"
>
</android.support.v4.widget.NestedScrollView>
<TextView
style=
"@style/sale_item_text"
android:layout_width=
"0dp"
android:layout_height=
"match_parent"
android:layout_weight=
"1"
android:background=
"@drawable/bg_order_step_title1"
android:gravity=
"center"
android:text=
"@string/income_money"
/>
<TextView
style=
"@style/sale_item_text"
android:layout_width=
"0dp"
android:layout_height=
"match_parent"
android:layout_weight=
"2"
android:background=
"@drawable/bg_order_step_title2"
android:gravity=
"center"
android:text=
"@string/oreder_sender_payer"
/>
<TextView
style=
"@style/sale_item_text"
android:layout_width=
"0dp"
android:layout_height=
"match_parent"
android:layout_weight=
"1"
android:background=
"@drawable/bg_order_step_title1"
android:gravity=
"center"
android:text=
"@string/pay_date"
/>
</LinearLayout>
<android.support.v7.widget.RecyclerView
android:id=
"@+id/rv_record"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginBottom=
"2dp"
android:overScrollMode=
"never"
/>
</LinearLayout>
</layout>
\ No newline at end of file
userCenter/src/main/res/layout/activity_test_record.xml
0 → 100644
View file @
3e07c10e
<?xml version="1.0" encoding="utf-8"?>
<layout
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:orientation=
"vertical"
>
<RelativeLayout
android:id=
"@+id/title_back"
style=
"@style/title"
>
<TextView
android:id=
"@+id/tv_title"
style=
"@style/text_title"
android:text=
"@string/user_sale_record"
/>
<ImageView
android:id=
"@+id/receiving_back"
style=
"@style/title_image_back"
/>
</RelativeLayout>
<ImageView
style=
"@style/card_line"
/>
<android.support.v4.widget.NestedScrollView
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@color/cl_white"
android:gravity=
"center"
>
<Button
android:id=
"@+id/btn_week"
android:layout_width=
"0dp"
android:layout_height=
"35dp"
android:layout_weight=
"1"
android:background=
"@drawable/detail_center_selector"
android:gravity=
"center"
android:text=
"@string/week_str"
/>
<Button
android:id=
"@+id/btn_month"
android:layout_width=
"0dp"
android:layout_height=
"35dp"
android:layout_weight=
"1"
android:background=
"@drawable/detail_center_selector"
android:gravity=
"center"
android:text=
"@string/month_str"
/>
<Button
android:id=
"@+id/btn_year"
android:layout_width=
"0dp"
android:layout_height=
"35dp"
android:layout_weight=
"1"
android:background=
"@drawable/detail_end_selector"
android:gravity=
"center"
android:text=
"@string/year_str"
/>
</LinearLayout>
<com.github.mikephil.charting.charts.BarChart
android:visibility=
"gone"
android:id=
"@+id/bar_chart"
android:layout_width=
"match_parent"
android:layout_height=
"300dp"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_margin=
"15dp"
android:background=
"@color/cl_white"
android:orientation=
"vertical"
android:padding=
"10dp"
>
<LinearLayout
style=
"@style/sale_record_value"
android:layout_marginTop=
"10dp"
>
<TextView
style=
"@style/sale_record_text"
android:text=
"@string/success_recommend_money"
/>
<TextView
android:id=
"@+id/tv_recommend_money"
style=
"@style/sale_item_text2"
android:text=
"0"
/>
</LinearLayout>
<LinearLayout
style=
"@style/sale_record_value"
>
<TextView
style=
"@style/sale_record_text"
android:text=
"@string/success_sale_orders"
/>
<TextView
android:id=
"@+id/tv_order_count"
style=
"@style/sale_item_text2"
android:text=
"0"
/>
</LinearLayout>
<LinearLayout
style=
"@style/sale_record_value"
>
<TextView
style=
"@style/sale_record_text"
android:text=
"@string/earned_sale_bonus"
/>
<TextView
android:id=
"@+id/tv_bonus"
style=
"@style/sale_item_text2"
/>
</LinearLayout>
<LinearLayout
style=
"@style/sale_record_value"
>
<TextView
style=
"@style/sale_record_text"
android:text=
"@string/record_city_ranking"
/>
<TextView
android:id=
"@+id/tv_city_rank"
style=
"@style/sale_item_text2"
/>
</LinearLayout>
<LinearLayout
style=
"@style/sale_record_value"
>
<TextView
style=
"@style/sale_record_text"
android:text=
"@string/record_provincial_ranking"
/>
<TextView
android:id=
"@+id/tv_province_rank"
style=
"@style/sale_item_text2"
/>
</LinearLayout>
<LinearLayout
style=
"@style/sale_record_value"
android:layout_marginBottom=
"10dp"
>
<TextView
style=
"@style/sale_record_text"
android:text=
"@string/record_country_ranking"
/>
<TextView
android:id=
"@+id/tv_country_rank"
style=
"@style/sale_item_text2"
/>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_margin=
"15dp"
android:background=
"@color/cl_white"
android:orientation=
"vertical"
android:padding=
"10dp"
>
<LinearLayout
style=
"@style/sale_record_value"
android:layout_marginTop=
"10dp"
>
<TextView
style=
"@style/sale_record_text"
android:layout_height=
"match_parent"
android:text=
"@string/success_sale_orders"
/>
<TextView
android:id=
"@+id/tv_orders_conut"
style=
"@style/sale_item_text2"
android:text=
"0"
/>
</LinearLayout>
<LinearLayout
style=
"@style/sale_record_value"
>
<TextView
style=
"@style/sale_record_text"
android:text=
"@string/success_service_income"
/>
<TextView
android:id=
"@+id/tv_income"
style=
"@style/sale_item_text2"
android:text=
"0"
/>
</LinearLayout>
<LinearLayout
style=
"@style/sale_record_value"
>
<TextView
style=
"@style/sale_record_text"
android:text=
"@string/record_city_ranking"
/>
<TextView
android:id=
"@+id/tv_city_rank2"
style=
"@style/sale_item_text2"
/>
</LinearLayout>
<LinearLayout
style=
"@style/sale_record_value"
>
<TextView
style=
"@style/sale_record_text"
android:text=
"@string/record_provincial_ranking"
/>
<TextView
android:id=
"@+id/tv_province_rank2"
style=
"@style/sale_item_text2"
/>
</LinearLayout>
<LinearLayout
style=
"@style/sale_record_value"
android:layout_marginBottom=
"10dp"
>
<TextView
style=
"@style/sale_record_text"
android:text=
"@string/record_country_ranking"
/>
<TextView
android:id=
"@+id/tv_country_rank2"
style=
"@style/sale_item_text2"
/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</android.support.v4.widget.NestedScrollView>
</LinearLayout>
</layout>
\ No newline at end of file
userCenter/src/main/res/layout/activity_user_info.xml
View file @
3e07c10e
...
...
@@ -116,7 +116,7 @@
<com.dayu.widgets.CircleImageView
android:id=
"@+id/cv_header"
imageUrl=
"@{presenter.
info.account
Url}"
imageUrl=
"@{presenter.
m
Url}"
android:layout_width=
"80dp"
android:layout_height=
"80dp"
android:layout_alignParentRight=
"true"
...
...
@@ -147,7 +147,9 @@
style=
"@style/sale_item_text"
android:text=
"@string/user_bank_name"
/>
<TextView
style=
"@style/sale_item_text2"
<TextView
android:id=
"@+id/tv_bank_name"
style=
"@style/sale_item_text2"
android:text=
"@{presenter.bankInfo.bankName}"
/>
</LinearLayout>
...
...
@@ -157,7 +159,9 @@
style=
"@style/sale_item_text"
android:text=
"@string/user_bank_account"
/>
<TextView
style=
"@style/sale_item_text2"
<TextView
android:id=
"@+id/tv_bank_account"
style=
"@style/sale_item_text2"
android:text=
"@{presenter.bankInfo.bankAccount}"
/>
</LinearLayout>
...
...
@@ -167,7 +171,9 @@
style=
"@style/sale_item_text"
android:text=
"@string/user_bank_holer"
/>
<TextView
style=
"@style/sale_item_text2"
<TextView
android:id=
"@+id/tv_bank_holder"
style=
"@style/sale_item_text2"
android:text=
"@{presenter.bankInfo.realName}"
/>
</LinearLayout>
...
...
@@ -224,7 +230,7 @@
<TextView
style=
"@style/sale_item_text"
android:text=
"@string/user_re
gist
er_phone"
/>
android:text=
"@string/user_re
ceiv
er_phone"
/>
<TextView
style=
"@style/sale_item_text2"
/>
</LinearLayout>
...
...
@@ -264,19 +270,8 @@
android:maxLines=
"15"
/>
<View
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/dp_sale_step"
android:layout_marginTop=
"5dp"
android:background=
"@color/cl_home_title_text_color"
/>
<android.support.v7.widget.RecyclerView
android:id=
"@+id/rv_star_title"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:overScrollMode=
"never"
/>
<android.support.v7.widget.RecyclerView
android:layout_marginTop=
"15dp"
android:id=
"@+id/rv_star_value"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
...
...
userCenter/src/main/res/layout/item_record_common.xml
0 → 100644
View file @
3e07c10e
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"30dp"
android:orientation=
"horizontal"
>
<TextView
android:id=
"@+id/tv_item1"
style=
"@style/sale_item_text"
android:layout_width=
"0dp"
android:layout_weight=
"1"
android:layout_height=
"match_parent"
android:background=
"@drawable/bg_order_step_item1"
android:gravity=
"center"
/>
<TextView
android:id=
"@+id/tv_item2"
style=
"@style/sale_item_text"
android:layout_width=
"0dp"
android:layout_weight=
"2"
android:layout_height=
"match_parent"
android:background=
"@drawable/bg_order_step_item2"
android:gravity=
"center"
/>
<TextView
android:id=
"@+id/tv_item3"
style=
"@style/sale_item_text"
android:layout_width=
"0dp"
android:layout_weight=
"1"
android:layout_height=
"match_parent"
android:background=
"@drawable/bg_order_step_item1"
android:gravity=
"center"
/>
</LinearLayout>
userCenter/src/main/res/layout/item_rule_star_ratio.xml
0 → 100644
View file @
3e07c10e
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
>
<TextView
android:id=
"@+id/tv_item1"
style=
"@style/sale_item_text"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:gravity=
"center"
/>
<TextView
android:id=
"@+id/tv_item2"
style=
"@style/sale_item_text"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:gravity=
"center"
/>
</LinearLayout>
userCenter/src/main/res/values/strings.xml
View file @
3e07c10e
<resources>
<string
name=
"app_name"
>
userCenter
</string>
<string
name=
"input_new_pwd"
>
填写新密码
</string>
<string
name=
"income_money"
>
收入金额
</string>
<string
name=
"oreder_sender_payer"
>
派单付费方
</string>
<string
name=
"pay_date"
>
支付日期
</string>
<string
name=
"reward_money"
>
奖励金额
</string>
<string
name=
"reward_company"
>
奖励方
</string>
<string
name=
"reward_date"
>
奖励日期
</string>
<string
name=
"deatail_addr_"
>
详细地址:
</string>
<string
name=
"name_"
>
姓 名:
</string>
<string
name=
"phone_"
>
手机号:
</string>
<string
name=
"belong_province"
>
所在地区
</string>
<string
name=
"select_province_hint"
>
请选择省
</string>
<string
name=
"setlect_ciy"
>
选择市
</string>
<string
name=
"setlect_ciy_hint"
>
请选择市
</string>
<string
name=
"setlect_area"
>
选择区
</string>
<string
name=
"setlect_area_hint"
>
请选择区
</string>
</resources>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment