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
c03ca250
authored
Feb 15, 2020
by
mReturn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user
parent
da569c02
Hide whitespace changes
Inline
Side-by-side
Showing
35 changed files
with
2365 additions
and
13 deletions
app/src/main/java/com/dayu/bigfish/ui/MainActivity.java
baseSDK/build.gradle
baseSDK/src/main/java/com/dayu/base/ui/activity/DataBindingActivity.java
baseSDK/src/main/java/com/dayu/base/ui/fragment/DataBindingFragment.java
baseSDK/src/main/res/drawable/bg_order_step_item3.xml
baseSDK/src/main/res/drawable/bg_order_step_title3.xml
baseSDK/src/main/res/values/strings.xml
baseSDK/src/main/res/values/styles.xml
saleCenter/src/main/res/layout/activity_order_detail.xml
userCenter/src/main/java/com/dayu/usercenter/data/protocol/EngineerInfo.java
userCenter/src/main/java/com/dayu/usercenter/presenter/homeuser/HomeUserContract.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/MyValueFormatter.java
userCenter/src/main/java/com/dayu/usercenter/ui/activity2/BusinessTypeActivity.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/UserInfoActivity.java
userCenter/src/main/java/com/dayu/usercenter/ui/activity2/UserLicenceActivity.java
userCenter/src/main/java/com/dayu/usercenter/ui/fragment/HomePersonFragment.java
userCenter/src/main/java/com/dayu/usercenter/ui/fragment/HomeUserFragment.java
userCenter/src/main/java/com/dayu/usercenter/ui/fragment/UserLicenceFragment.java
userCenter/src/main/release/AndroidManifest.xml
userCenter/src/main/res/layout/activity_business_type.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_user_info.xml
userCenter/src/main/res/layout/activity_user_licence.xml
userCenter/src/main/res/layout/fragment_home_user.xml
userCenter/src/main/res/layout/fragment_user_licence.xml
userCenter/src/main/res/layout/item_business_type.xml
userCenter/src/main/res/layout/item_rule_star.xml
userCenter/src/main/res/layout/item_user_licence.xml
userCenter/src/main/res/values/styles.xml
app/src/main/java/com/dayu/bigfish/ui/MainActivity.java
View file @
c03ca250
...
...
@@ -46,6 +46,7 @@ import com.dayu.provider.event.RefreshReceivingNum;
import
com.dayu.provider.event.SwtichFragment
;
import
com.dayu.provider.router.RouterPath
;
import
com.dayu.usercenter.ui.fragment.HomePersonFragment
;
import
com.dayu.usercenter.ui.fragment.HomeUserFragment
;
import
com.dayu.utils.SPUtils
;
import
com.dayu.utils.TimeUtils
;
import
com.dayu.utils.UserManager
;
...
...
@@ -80,7 +81,8 @@ public class MainActivity extends BaseActivity<MainPresenter, ActivityMainBindin
private
HomeSaleFragment
saleFragment
;
private
HomeOrderFragment
secondFragment
;
// private HomeMessageFragment thirdFragment;
private
HomePersonFragment
fourFragment
;
// private HomePersonFragment fourFragment;
private
HomeUserFragment
fourFragment
;
private
int
mFirstPositon
=
0
;
private
BadgeView
mBadgeView
;
private
BadgeView
mOrderBadgeView
;
...
...
@@ -96,7 +98,7 @@ public class MainActivity extends BaseActivity<MainPresenter, ActivityMainBindin
saleFragment
=
HomeSaleFragment
.
newInstance
();
secondFragment
=
HomeOrderFragment
.
newInstance
();
// thirdFragment = HomeMessageFragment.newInstance();
fourFragment
=
Home
Person
Fragment
.
newInstance
();
fourFragment
=
Home
User
Fragment
.
newInstance
();
if
(
UserManager
.
getInstance
().
getRole
()
==
Constants
.
ENGINEER
)
{
// firstFragment = HomeFirstTabFragment.newInstance();
// mFragments = new Fragment[]{firstFragment, secondFragment, thirdFragment, fourFragment};
...
...
baseSDK/build.gradle
View file @
c03ca250
...
...
@@ -75,6 +75,7 @@ dependencies {
api
'com.github.CymChad:BaseRecyclerViewAdapterHelper:2.9.35'
api
'com.badoo.mobile:android-weak-handler:1.1'
api
'com.youth.banner:banner:1.4.10'
api
'com.github.PhilJay:MPAndroidChart:v3.1.0'
// api 'tv.danmaku.ijk.media:ijkplayer-java:0.8.4'
// api 'tv.danmaku.ijk.media:ijkplayer-armv7a:0.8.4'
...
...
baseSDK/src/main/java/com/dayu/base/ui/activity/DataBindingActivity.java
View file @
c03ca250
...
...
@@ -53,12 +53,11 @@ public abstract class DataBindingActivity<B extends ViewDataBinding> extends App
}
public
abstract
int
getLayoutId
();
protected
void
initPresenter
()
{
}
public
abstract
int
getLayoutId
();
public
abstract
void
initView
();
@Override
...
...
baseSDK/src/main/java/com/dayu/base/ui/fragment/DataBindingFragment.java
View file @
c03ca250
...
...
@@ -64,13 +64,13 @@ public abstract class DataBindingFragment<B extends ViewDataBinding> extends Fra
return
view
;
}
public
abstract
void
initView
();
public
abstract
int
getLayoutId
();
protected
void
initPresenter
()
{
}
public
abstract
void
initView
();
/**
* 如果是与ViewPager一起使用,调用的是setUserVisibleHint
...
...
baseSDK/src/main/res/drawable/bg_order_step_item3.xml
0 → 100644
View file @
c03ca250
<?xml version="1.0" encoding="UTF-8"?>
<layer-list
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<!-- 边框颜色值 -->
<item>
<shape>
<solid
android:color=
"@color/cl_home_title_text_color"
/>
</shape>
</item>
<!--这个是按钮边框设置为四周 并且宽度为1-->
<item
android:bottom=
"@dimen/dp_sale_step"
android:right=
"@dimen/dp_sale_step"
>
<shape>
<!--这个是背景颜色-->
<solid
android:color=
"@color/cl_white"
/>
</shape>
</item>
</layer-list>
\ No newline at end of file
baseSDK/src/main/res/drawable/bg_order_step_title3.xml
0 → 100644
View file @
c03ca250
<?xml version="1.0" encoding="UTF-8"?>
<layer-list
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<!-- 边框颜色值 -->
<item>
<shape>
<solid
android:color=
"@color/cl_home_title_text_color"
/>
</shape>
</item>
<!--这个是按钮边框设置为四周 并且宽度为1-->
<item
android:bottom=
"@dimen/dp_sale_step"
android:right=
"@dimen/dp_sale_step"
>
<shape>
<!--这个是背景颜色-->
<solid
android:color=
"#c6c6c6"
/>
</shape>
</item>
</layer-list>
\ No newline at end of file
baseSDK/src/main/res/values/strings.xml
View file @
c03ca250
...
...
@@ -861,6 +861,61 @@ C) 在甲方使用大鱼平å°æœåŠ¡è¿‡ç¨‹ä¸äº§ç”Ÿçš„业务数æ®ï¼Œå®¢æˆ·æ•°æ
<string
name=
"sale_record_str"
>
详细记录
</string>
<!--sale-->
<!--user-->
<string
name=
"user_customer_satisfied"
>
客户满意度
</string>
<string
name=
"user_sale_reward"
>
销售奖励
</string>
<string
name=
"user_service_income"
>
服务收入
</string>
<string
name=
"user_service_record"
>
服务业绩
</string>
<string
name=
"user_sale_record"
>
销售业绩
</string>
<string
name=
"user_word_orders"
>
工单总数
</string>
<string
name=
"user_business_type"
>
业务品类
</string>
<string
name=
"user_info_setting"
>
个人资料设置
</string>
<string
name=
"user_register_info"
>
基本注册信息
</string>
<string
name=
"user_name_str"
>
姓名:
</string>
<string
name=
"user_register_phone"
>
注册手机号:
</string>
<string
name=
"user_register_time"
>
注册日期:
</string>
<string
name=
"user_id_num"
>
身份证号:
</string>
<string
name=
"user_bank_info"
>
银行账户信息
</string>
<string
name=
"user_bank_name"
>
开户银行:
</string>
<string
name=
"user_bank_account"
>
银行账号:
</string>
<string
name=
"user_bank_holer"
>
开户人姓名:
</string>
<string
name=
"user_addr_info"
>
快递地址信息
</string>
<string
name=
"user_receiver_addr"
>
收件地址:
</string>
<string
name=
"user_receiver_name"
>
收件人姓名:
</string>
<string
name=
"user_receiver_phone"
>
收件人手机号:
</string>
<string
name=
"edit_str"
>
编辑
</string>
<string
name=
"user_info_rule"
>
规则须知:
</string>
<string
name=
"user_info_rule1"
>
1、 所有通过合法身份有效注册的个人,都可以通过本APP学习业务技能、
开展销售服务工作,并获得相应的报酬
</string>
<string
name=
"user_info_rule2_1"
>
2、大鱼平台按每笔销售奖金的
</string>
<string
name=
"user_info_rule2_2"
>
收取佣金(含依法代个人扣缴的劳务收入所得税);
按每单服务质量评价星级收取服务费佣金(含依法代扣代缴的个人劳务收入所得税)。
</string>
<string
name=
"user_info_rule3"
>
3、严禁任何违反国家法律法规和平台规则的行为。一经发现,
大鱼公司有权停止APP系统服务、并采取相应处罚措施、追究经济赔偿责任、依法移交司法机关处理。
</string>
<string
name=
"customer_hot_line"
>
大鱼客服热线:400-0086-898
</string>
<string
name=
"commission_str"
>
佣金
</string>
<string
name=
"user_rule_star"
>
星级
</string>
<string
name=
"user_rule_star1"
>
一星
</string>
<string
name=
"user_rule_star2"
>
二星
</string>
<string
name=
"user_rule_star3"
>
三星
</string>
<string
name=
"user_rule_star4"
>
四星
</string>
<string
name=
"user_rule_star5"
>
五星
</string>
<string
name=
"business_choose_scene"
>
请选择自己可开展销售的业务场景:
</string>
<string
name=
"business_choose_type"
>
请选择自己能提供服务的产品类型:
</string>
<string
name=
"licence_haved"
>
已获认证资质
</string>
<string
name=
"licence_all"
>
全部认证资质
</string>
<string
name=
"licence_apply_str"
>
申请
</string>
<string
name=
"week_str"
>
周
</string>
<string
name=
"month_str"
>
月
</string>
<string
name=
"year_str"
>
年
</string>
<string
name=
"success_recommend_money"
>
成功推荐销售额:
</string>
<string
name=
"success_sale_orders"
>
成功销售订单数:
</string>
<string
name=
"earned_sale_bonus"
>
获得销售奖励金:
</string>
<string
name=
"record_city_ranking"
>
本市业绩排名:
</string>
<string
name=
"record_provincial_ranking"
>
本省业绩排名:
</string>
<string
name=
"record_country_ranking"
>
全国业绩排名:
</string>
<string
name=
"success_service_orders"
>
成功服务工单数:
</string>
<string
name=
"success_service_income"
>
获得服务收入:
</string>
</resources>
baseSDK/src/main/res/values/styles.xml
View file @
c03ca250
...
...
@@ -26,6 +26,10 @@
<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>
</style>
<style
name=
"sale_item_text"
>
<item
name=
"android:layout_width"
>
wrap_content
</item>
...
...
@@ -44,6 +48,10 @@
<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>
</style>
<style
name=
"title"
>
...
...
saleCenter/src/main/res/layout/activity_order_detail.xml
View file @
c03ca250
...
...
@@ -23,7 +23,6 @@
</android.support.v7.widget.Toolbar>
<android.support.v4.widget.NestedScrollView
android:id=
"@+id/nsv_operate"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:paddingLeft=
"@dimen/dp_15"
...
...
userCenter/src/main/java/com/dayu/usercenter/data/protocol/EngineerInfo.java
View file @
c03ca250
...
...
@@ -21,7 +21,7 @@ public class EngineerInfo extends BaseObservable implements Serializable {
private
String
identityUrl
;
private
String
accountUrl
;
private
int
auditStatus
;
private
Object
createTime
;
private
String
createTime
;
private
Object
created
;
private
Object
updateTime
;
private
Object
updated
;
...
...
@@ -95,11 +95,11 @@ public class EngineerInfo extends BaseObservable implements Serializable {
notifyPropertyChanged
(
BR
.
aduitStatus
);
}
public
Object
getCreateTime
()
{
public
String
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
Object
createTime
)
{
public
void
setCreateTime
(
String
createTime
)
{
this
.
createTime
=
createTime
;
}
...
...
userCenter/src/main/java/com/dayu/usercenter/presenter/homeuser/HomeUserContract.java
0 → 100644
View file @
c03ca250
package
com
.
dayu
.
usercenter
.
presenter
.
homeuser
;
import
com.dayu.base.ui.presenter.BasePresenter
;
import
com.dayu.common.BaseView
;
import
com.dayu.usercenter.data.protocol.EngineerInfo
;
import
com.dayu.usercenter.data.protocol.OrderRecord
;
import
com.dayu.usercenter.data.protocol.TodayAchievement
;
import
com.dayu.usercenter.data.protocol.TodayBalance
;
/**
* Created by luo on 2016/8/4.
*/
public
interface
HomeUserContract
{
interface
View
extends
BaseView
{
void
getPersonalInfoSuccess
(
EngineerInfo
info
);
void
getAchievementSuccess
(
TodayAchievement
achievement
);
void
getOrderRecordSuccess
(
OrderRecord
record
);
/**
* 是否显示绑定alipay的对话框.
*/
void
showAlipayDialog
();
/**
* 跳转到工单记录.
*/
void
dumpToOrderRecord
();
/**
* 跳转到设置.
*/
void
dumpToSetting
();
}
abstract
class
Presenter
extends
BasePresenter
<
View
>
{
//获取师傅的alipayAcccount
public
abstract
void
getAlipayAccount
(
int
accountId
);
public
abstract
void
getAllData
(
int
userId
,
int
siteId
);
/**
* 跳转到设置.
*/
public
abstract
void
dumpToSetting
();
/**
* 跳转到工单记录.
*/
public
abstract
void
dumpToOrderRecord
();
/**
* 跳转到资质列表.
*/
public
abstract
void
dumpToLicence
();
/**
* 跳转到销售业绩.
*/
public
abstract
void
dumpToSaleRecord
();
/**
* 跳转业务品类.
*/
public
abstract
void
dumpToBusinessType
();
}
}
userCenter/src/main/java/com/dayu/usercenter/presenter/homeuser/HomeUserPresenter.java
0 → 100644
View file @
c03ca250
package
com
.
dayu
.
usercenter
.
presenter
.
homeuser
;
import
android.databinding.ObservableField
;
import
com.dayu.common.BaseApplication
;
import
com.dayu.usercenter.api.UserApiFactory
;
import
com.dayu.usercenter.data.protocol.EngineerInfo
;
import
com.dayu.usercenter.data.protocol.OrderRecord
;
import
com.dayu.usercenter.data.protocol.TodayAchievement
;
import
com.dayu.usercenter.data.protocol.TodayBalance
;
import
com.dayu.usercenter.presenter.homefourtab.HomeFourContract
;
import
com.dayu.usercenter.ui.activity.PersonInfoActivity
;
import
com.dayu.usercenter.ui.activity.QualityCertificationActivity
;
import
com.dayu.usercenter.ui.activity2.BusinessTypeActivity
;
import
com.dayu.usercenter.ui.activity2.SaleRecordActivity
;
import
com.dayu.usercenter.ui.activity2.ServiceRecordActivity
;
import
com.dayu.usercenter.ui.activity2.UserLicenceActivity
;
import
com.umeng.analytics.MobclickAgent
;
import
io.reactivex.Observable
;
/**
* Created by luofan
* on 2017/11/8.
*/
public
class
HomeUserPresenter
extends
HomeUserContract
.
Presenter
{
public
ObservableField
<
String
>
mUrl
=
new
ObservableField
<>();
@Override
public
void
onAttached
()
{
}
@Override
public
void
getAlipayAccount
(
int
accountId
)
{
UserApiFactory
.
queryAlipay
(
accountId
).
subscribe
(
baseObserver
(
info
->
{
},
responeThrowable
->
{
if
(
"SETTLEMENT0015"
.
equals
(
responeThrowable
.
subCode
))
{
mView
.
showAlipayDialog
();
}
}));
}
@Override
public
void
getAllData
(
int
userId
,
int
siteId
)
{
Observable
.
mergeDelayError
(
UserApiFactory
.
getEngineerInfo
(
userId
),
UserApiFactory
.
getAchievement
(
siteId
,
userId
),
UserApiFactory
.
getOrderScore
(
siteId
,
userId
),
UserApiFactory
.
getTodayBalance
(
userId
)).
subscribe
(
baseObserver
(
o
->
{
if
(
o
instanceof
EngineerInfo
)
{
mView
.
getPersonalInfoSuccess
((
EngineerInfo
)
o
);
}
else
if
(
o
instanceof
TodayAchievement
)
{
mView
.
getAchievementSuccess
((
TodayAchievement
)
o
);
}
else
if
(
o
instanceof
OrderRecord
)
{
mView
.
getOrderRecordSuccess
((
OrderRecord
)
o
);
}
}));
}
@Override
public
void
dumpToSetting
()
{
mView
.
dumpToSetting
();
}
@Override
public
void
dumpToOrderRecord
()
{
mView
.
startActivity
(
ServiceRecordActivity
.
class
);
}
@Override
public
void
dumpToLicence
()
{
mView
.
startActivity
(
UserLicenceActivity
.
class
);
}
@Override
public
void
dumpToSaleRecord
()
{
mView
.
startActivity
(
SaleRecordActivity
.
class
);
}
@Override
public
void
dumpToBusinessType
()
{
mView
.
startActivity
(
BusinessTypeActivity
.
class
);
}
}
userCenter/src/main/java/com/dayu/usercenter/presenter/userinfo/UserInfoContract.java
0 → 100644
View file @
c03ca250
package
com
.
dayu
.
usercenter
.
presenter
.
userinfo
;
import
com.dayu.base.ui.presenter.BasePresenter
;
import
com.dayu.common.BaseView
;
/**
* Created by luo on 2016/8/4.
*/
public
interface
UserInfoContract
{
interface
View
extends
BaseView
{
}
abstract
class
Presenter
extends
BasePresenter
<
View
>
{
public
abstract
void
queryInfo
(
int
accountId
);
}
}
userCenter/src/main/java/com/dayu/usercenter/presenter/userinfo/UserInfoPresenter.java
0 → 100644
View file @
c03ca250
package
com
.
dayu
.
usercenter
.
presenter
.
userinfo
;
import
android.databinding.ObservableField
;
import
android.os.Bundle
;
import
android.text.TextUtils
;
import
com.dayu.common.BaseApplication
;
import
com.dayu.event.UserInfo
;
import
com.dayu.usercenter.api.UserApiFactory
;
import
com.dayu.usercenter.common.UserConstant
;
import
com.dayu.usercenter.data.protocol.EngineerInfo
;
import
com.dayu.usercenter.presenter.personinfo.PersonInfoContract
;
import
com.dayu.usercenter.ui.activity.IdentityCertificationActivity
;
import
com.dayu.usercenter.ui.activity.ModifyPwdActivity
;
import
com.dayu.usercenter.ui.activity.MyHeaderIvActivity
;
import
com.dayu.utils.UserManager
;
import
com.umeng.analytics.MobclickAgent
;
/**
* Created by luofan
* on 2017/11/14.
*/
public
class
UserInfoPresenter
extends
UserInfoContract
.
Presenter
{
public
ObservableField
<
EngineerInfo
>
info
=
new
ObservableField
<>();
public
ObservableField
<
Boolean
>
status
=
new
ObservableField
<>();
private
int
mAccountId
;
private
int
mDetectStatus
;
@Override
public
void
onAttached
()
{
UserInfo
info
=
UserManager
.
getInstance
().
getUser
();
mAccountId
=
Integer
.
parseInt
(
info
.
getAccountId
());
mDetectStatus
=
info
.
getDetectStatus
();
mView
.
showDialog
();
queryInfo
(
mAccountId
);
}
@Override
public
void
queryInfo
(
int
accountId
)
{
UserApiFactory
.
getEngineerInfo
(
accountId
).
subscribe
(
baseObserver
(
engineerInfo
->
{
info
.
set
(
engineerInfo
);
if
(!
TextUtils
.
isEmpty
(
engineerInfo
.
getIdentity
())
&&
mDetectStatus
==
1
)
{
status
.
set
(
false
);
}
else
{
status
.
set
(
true
);
}
}));
}
}
userCenter/src/main/java/com/dayu/usercenter/ui/MyValueFormatter.java
0 → 100644
View file @
c03ca250
package
com
.
dayu
.
usercenter
.
ui
;
import
com.github.mikephil.charting.components.AxisBase
;
import
com.github.mikephil.charting.components.XAxis
;
import
com.github.mikephil.charting.formatter.ValueFormatter
;
import
java.text.DecimalFormat
;
/**
* Created by mReturn
* on 2020/2/15
**/
public
class
MyValueFormatter
extends
ValueFormatter
{
private
final
DecimalFormat
mFormat
;
private
String
suffix
;
public
MyValueFormatter
(
String
suffix
)
{
mFormat
=
new
DecimalFormat
(
"0000"
);
this
.
suffix
=
suffix
;
}
@Override
public
String
getFormattedValue
(
float
value
)
{
return
mFormat
.
format
(
value
)
+
suffix
;
}
@Override
public
String
getAxisLabel
(
float
value
,
AxisBase
axis
)
{
if
(
axis
instanceof
XAxis
)
{
return
mFormat
.
format
(
value
);
}
else
if
(
value
>
0
)
{
return
mFormat
.
format
(
value
)
+
suffix
;
}
else
{
return
mFormat
.
format
(
value
);
}
}
}
userCenter/src/main/java/com/dayu/usercenter/ui/activity2/BusinessTypeActivity.java
0 → 100644
View file @
c03ca250
package
com
.
dayu
.
usercenter
.
ui
.
activity2
;
import
android.support.v7.widget.GridLayoutManager
;
import
android.support.v7.widget.LinearLayoutManager
;
import
android.widget.CheckBox
;
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.ActivityBusinessTypeBinding
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
* Created by mReturn
* on 2020/2/15
**/
public
class
BusinessTypeActivity
extends
BaseActivity
<
SImplePresenter
,
ActivityBusinessTypeBinding
>
{
@Override
public
void
setPresenter
()
{
}
@Override
public
int
getLayoutId
()
{
return
R
.
layout
.
activity_business_type
;
}
@Override
public
void
initView
()
{
mBind
.
receivingBack
.
setOnClickListener
(
v
->
dumpBack
());
setSceneAdapter
();
setTypeAdapter
();
}
private
void
setSceneAdapter
()
{
List
<
String
>
testList
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
5
;
i
++)
{
testList
.
add
(
"sale_scene"
+
i
);
}
BaseQuickAdapter
<
String
,
BaseViewHolder
>
mAdapter
=
new
BaseQuickAdapter
<
String
,
BaseViewHolder
>(
R
.
layout
.
item_business_type
,
testList
)
{
@Override
protected
void
convert
(
BaseViewHolder
helper
,
String
item
)
{
CheckBox
cbItem
=
helper
.
getView
(
R
.
id
.
cb_item
);
cbItem
.
setText
(
item
);
}
};
mBind
.
rvScene
.
setLayoutManager
(
new
GridLayoutManager
(
this
,
3
));
mBind
.
rvScene
.
setAdapter
(
mAdapter
);
}
private
void
setTypeAdapter
()
{
List
<
String
>
testList
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
15
;
i
++)
{
testList
.
add
(
"service_type"
+
i
);
}
BaseQuickAdapter
<
String
,
BaseViewHolder
>
mAdapter
=
new
BaseQuickAdapter
<
String
,
BaseViewHolder
>(
R
.
layout
.
item_business_type
,
testList
)
{
@Override
protected
void
convert
(
BaseViewHolder
helper
,
String
item
)
{
CheckBox
cbItem
=
helper
.
getView
(
R
.
id
.
cb_item
);
cbItem
.
setText
(
item
);
}
};
mBind
.
rvType
.
setLayoutManager
(
new
GridLayoutManager
(
this
,
2
));
mBind
.
rvType
.
setAdapter
(
mAdapter
);
}
}
userCenter/src/main/java/com/dayu/usercenter/ui/activity2/SaleRecordActivity.java
0 → 100644
View file @
c03ca250
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.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
com.github.mikephil.charting.utils.ColorTemplate
;
import
java.util.ArrayList
;
/**
* Created by mReturn
* on 2020/2/15
**/
public
class
SaleRecordActivity
extends
BaseActivity
<
SImplePresenter
,
ActivitySaleRecordBinding
>
{
@Override
public
int
getLayoutId
()
{
return
R
.
layout
.
activity_sale_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/ServiceRecordActivity.java
0 → 100644
View file @
c03ca250
package
com
.
dayu
.
usercenter
.
ui
.
activity2
;
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
;
/**
* Created by mReturn
* on 2020/2/15
**/
public
class
ServiceRecordActivity
extends
BaseActivity
<
SImplePresenter
,
ActivityServiceRecordBinding
>
{
@Override
public
void
setPresenter
()
{
}
@Override
public
int
getLayoutId
()
{
return
R
.
layout
.
activity_service_record
;
}
@Override
public
void
initView
()
{
mBind
.
receivingBack
.
setOnClickListener
(
v
->
dumpBack
());
}
}
userCenter/src/main/java/com/dayu/usercenter/ui/activity2/UserInfoActivity.java
0 → 100644
View file @
c03ca250
package
com
.
dayu
.
usercenter
.
ui
.
activity2
;
import
android.graphics.Color
;
import
android.support.v7.widget.GridLayoutManager
;
import
android.text.Html
;
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.usercenter.R
;
import
com.dayu.usercenter.databinding.ActivityUserInfoBinding
;
import
com.dayu.usercenter.presenter.userinfo.UserInfoContract
;
import
com.dayu.usercenter.presenter.userinfo.UserInfoPresenter
;
import
java.util.Arrays
;
import
java.util.List
;
/**
* Created by mReturn
* on 2020/2/15
**/
public
class
UserInfoActivity
extends
BaseActivity
<
UserInfoPresenter
,
ActivityUserInfoBinding
>
implements
UserInfoContract
.
View
{
@Override
public
void
setPresenter
()
{
mBind
.
setPresenter
(
mPresenter
);
}
@Override
public
int
getLayoutId
()
{
return
R
.
layout
.
activity_user_info
;
}
@Override
public
void
initView
()
{
initStarTitle
();
setStarItemAdapter
();
setUserRulr2
(
"15%"
);
}
private
void
setUserRulr2
(
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
);
}
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
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_item1
);
}
else
if
(
mData
.
indexOf
(
item
)
==
mData
.
size
()
-
2
){
tvItem
.
setBackgroundResource
(
R
.
drawable
.
bg_order_step_item2
);
}
else
{
tvItem
.
setBackgroundResource
(
R
.
drawable
.
bg_order_step_item3
);
}
if
(
mData
.
indexOf
(
item
)
>
0
){
tvItem
.
setTextColor
(
Color
.
parseColor
(
"#3e96e2"
));
}
}
};
mBind
.
rvStarValue
.
setLayoutManager
(
new
GridLayoutManager
(
this
,
6
));
mBind
.
rvStarValue
.
setAdapter
(
titleAdapter
);
}
}
userCenter/src/main/java/com/dayu/usercenter/ui/activity2/UserLicenceActivity.java
0 → 100644
View file @
c03ca250
package
com
.
dayu
.
usercenter
.
ui
.
activity2
;
import
android.support.v4.app.Fragment
;
import
android.support.v4.app.FragmentManager
;
import
android.support.v4.app.FragmentTransaction
;
import
com.dayu.base.ui.activity.BaseActivity
;
import
com.dayu.base.ui.presenter.SImplePresenter
;
import
com.dayu.usercenter.R
;
import
com.dayu.usercenter.databinding.ActivityUserLicenceBinding
;
import
com.dayu.usercenter.ui.fragment.UserLicenceFragment
;
import
java.util.ArrayList
;
/**
* Created by mReturn
**/
public
class
UserLicenceActivity
extends
BaseActivity
<
SImplePresenter
,
ActivityUserLicenceBinding
>
{
private
FragmentManager
mFragmentManger
;
private
ArrayList
<
Fragment
>
mFragments
=
new
ArrayList
<>();
private
int
mPosition
;
@Override
public
void
setPresenter
()
{
}
@Override
public
int
getLayoutId
()
{
return
R
.
layout
.
activity_user_licence
;
}
@Override
public
void
initView
()
{
mBind
.
receivingBack
.
setOnClickListener
(
v
->
dumpBack
());
mFragments
.
add
(
UserLicenceFragment
.
newInstance
(
1
));
mFragments
.
add
(
UserLicenceFragment
.
newInstance
(
2
));
initBtn
();
addFragment
();
}
public
void
initBtn
()
{
mBind
.
btnGoods
.
setSelected
(
true
);
mBind
.
btnGoods
.
setTextColor
(
getResources
().
getColor
(
R
.
color
.
white
));
mBind
.
btnGoods
.
setOnClickListener
((
view
)
->
{
reSelected
();
mBind
.
btnGoods
.
setSelected
(
true
);
mBind
.
btnGoods
.
setTextColor
(
getResources
().
getColor
(
R
.
color
.
white
));
showHideFragment
(
0
,
mPosition
);
});
mBind
.
btnSale
.
setOnClickListener
((
view
)
->
{
reSelected
();
mBind
.
btnSale
.
setSelected
(
true
);
mBind
.
btnSale
.
setTextColor
(
getResources
().
getColor
(
R
.
color
.
white
));
showHideFragment
(
1
,
mPosition
);
});
}
public
void
addFragment
()
{
mFragmentManger
=
getSupportFragmentManager
();
FragmentTransaction
transaction
=
mFragmentManger
.
beginTransaction
()
.
setTransition
(
FragmentTransaction
.
TRANSIT_FRAGMENT_OPEN
);
for
(
int
i
=
0
;
i
<
mFragments
.
size
();
i
++)
{
Fragment
fragment
=
mFragments
.
get
(
i
);
transaction
.
add
(
R
.
id
.
fl_container
,
fragment
);
transaction
.
hide
(
fragment
);
}
mPosition
=
0
;
transaction
.
show
(
mFragments
.
get
(
mPosition
));
transaction
.
commit
();
}
private
void
reSelected
()
{
mBind
.
btnGoods
.
setSelected
(
false
);
mBind
.
btnSale
.
setSelected
(
false
);
mBind
.
btnGoods
.
setTextColor
(
getResources
().
getColor
(
R
.
color
.
cl_home_button
));
mBind
.
btnSale
.
setTextColor
(
getResources
().
getColor
(
R
.
color
.
cl_home_button
));
}
private
void
showHideFragment
(
int
showPosition
,
int
hidePosition
)
{
if
(
showPosition
==
hidePosition
)
return
;
mFragmentManger
.
beginTransaction
()
.
show
(
mFragments
.
get
(
showPosition
))
.
hide
(
mFragments
.
get
(
hidePosition
))
.
commit
();
mPosition
=
showPosition
;
}
}
userCenter/src/main/java/com/dayu/usercenter/ui/fragment/HomePersonFragment.java
View file @
c03ca250
...
...
@@ -28,6 +28,7 @@ import com.dayu.usercenter.presenter.homefourtab.HomePersonPresenter;
import
com.dayu.usercenter.ui.activity.AccountBalanceActivity
;
import
com.dayu.usercenter.ui.activity.CommeWebViewActivity
;
import
com.dayu.usercenter.ui.activity.WithdrawalsActivity
;
import
com.dayu.usercenter.ui.activity2.UserInfoActivity
;
import
com.dayu.utils.ProgressUtil
;
import
com.dayu.utils.SPUtils
;
import
com.dayu.utils.UserManager
;
...
...
@@ -175,7 +176,8 @@ public class HomePersonFragment extends BaseFragment<HomePersonPresenter, Fragme
@Override
public
void
dumpToSetting
()
{
ARouter
.
getInstance
().
build
(
RouterPath
.
PATH_SETTING
).
navigation
();
// ARouter.getInstance().build(RouterPath.PATH_SETTING).navigation();
startActivity
(
UserInfoActivity
.
class
);
MobclickAgent
.
onEvent
(
mActivity
,
"setting"
);
}
...
...
userCenter/src/main/java/com/dayu/usercenter/ui/fragment/HomeUserFragment.java
0 → 100644
View file @
c03ca250
package
com
.
dayu
.
usercenter
.
ui
.
fragment
;
import
android.content.Intent
;
import
android.graphics.Bitmap
;
import
android.graphics.BitmapFactory
;
import
android.os.Bundle
;
import
android.text.TextUtils
;
import
android.view.ViewGroup
;
import
android.widget.ImageView
;
import
android.widget.LinearLayout
;
import
com.dayu.base.ui.fragment.BaseFragment
;
import
com.dayu.common.Constants
;
import
com.dayu.event.UserInfo
;
import
com.dayu.provider.event.CertificationEvent
;
import
com.dayu.usercenter.R
;
import
com.dayu.usercenter.data.protocol.EngineerInfo
;
import
com.dayu.usercenter.data.protocol.OrderRecord
;
import
com.dayu.usercenter.data.protocol.TodayAchievement
;
import
com.dayu.usercenter.databinding.FragmentHomeUserBinding
;
import
com.dayu.usercenter.presenter.homeuser.HomeUserContract
;
import
com.dayu.usercenter.presenter.homeuser.HomeUserPresenter
;
import
com.dayu.usercenter.ui.activity.WithdrawalsActivity
;
import
com.dayu.usercenter.ui.activity2.UserInfoActivity
;
import
com.dayu.utils.ProgressUtil
;
import
com.dayu.utils.SPUtils
;
import
com.dayu.utils.UserManager
;
import
com.dayu.widgets.CustomDialog
;
import
com.umeng.analytics.MobclickAgent
;
import
org.greenrobot.eventbus.EventBus
;
import
org.greenrobot.eventbus.Subscribe
;
import
org.greenrobot.eventbus.ThreadMode
;
/**
* Created by luofan
* on 2017/11/20.
*/
public
class
HomeUserFragment
extends
BaseFragment
<
HomeUserPresenter
,
FragmentHomeUserBinding
>
implements
HomeUserContract
.
View
{
private
static
final
String
TAG
=
"HomeUserFragment"
;
private
int
userId
;
private
int
siteId
;
private
String
mUserName
;
private
String
mUserPhone
;
private
String
mScore
;
private
int
mAccountBalance
;
public
static
HomeUserFragment
newInstance
()
{
Bundle
args
=
new
Bundle
();
HomeUserFragment
fragment
=
new
HomeUserFragment
();
fragment
.
setArguments
(
args
);
return
fragment
;
}
@Override
public
void
initView
()
{
UserInfo
userInfo
=
UserManager
.
getInstance
().
getUser
();
userId
=
Integer
.
parseInt
(
userInfo
.
getAccountId
());
siteId
=
userInfo
.
getSiteId
();
ProgressUtil
.
startLoad
(
mActivity
);
EventBus
.
getDefault
().
register
(
this
);
// mPresenter.getAllData(userId, siteId);
// mPresenter.getAlipayAccount(userId);
}
@Override
public
void
setPresenter
()
{
mBind
.
setPresenter
(
mPresenter
);
}
@Override
public
int
getLayoutId
()
{
return
R
.
layout
.
fragment_home_user
;
}
@Override
protected
void
lazyLoad
()
{
super
.
lazyLoad
();
ProgressUtil
.
startLoad
(
mActivity
);
mPresenter
.
getAllData
(
userId
,
siteId
);
// mPresenter.getAlipayAccount(userId);
}
@Override
public
void
getPersonalInfoSuccess
(
EngineerInfo
info
)
{
if
(
TextUtils
.
isEmpty
(
info
.
getIdentity
()))
{
SPUtils
.
put
(
"USER_IDENTITY"
,
""
);
}
else
{
SPUtils
.
put
(
"USER_IDENTITY"
,
info
.
getIdentity
());
}
mUserName
=
info
.
getRealName
();
mBind
.
tvAge
.
setText
(
info
.
getAge
()
+
mActivity
.
getString
(
R
.
string
.
age
));
if
(
info
.
getGender
()
==
1
)
{
mBind
.
tvSex
.
setText
(
mActivity
.
getString
(
R
.
string
.
man
));
}
else
if
(
info
.
getGender
()
==
0
)
{
mBind
.
tvSex
.
setText
(
mActivity
.
getString
(
R
.
string
.
female
));
}
if
(
TextUtils
.
isEmpty
(
mUserName
))
{
mBind
.
tvName
.
setText
(
mActivity
.
getString
(
R
.
string
.
unknown
));
}
else
{
mBind
.
tvName
.
setText
(
mUserName
);
}
if
(
TextUtils
.
isEmpty
(
info
.
getIdentity
()))
{
mBind
.
tvSex
.
setText
(
mActivity
.
getString
(
R
.
string
.
unknown
));
mBind
.
tvAge
.
setText
(
mActivity
.
getString
(
R
.
string
.
unknown
));
}
if
(
UserManager
.
getInstance
().
getUser
().
getDetectStatus
()
==
1
&&
!
TextUtils
.
isEmpty
((
String
)
SPUtils
.
get
(
"USER_IDENTITY"
,
""
)))
{
mBind
.
ivAudited
.
setImageResource
(
R
.
drawable
.
icon_authentication
);
}
else
{
mBind
.
ivAudited
.
setImageResource
(
R
.
drawable
.
icon_unauthentication
);
}
mUserPhone
=
info
.
getMobile
();
mBind
.
tvPhone
.
setText
(
mUserPhone
);
SPUtils
.
put
(
"USER_PHONE"
,
mUserPhone
);
SPUtils
.
put
(
"USER_NAME"
,
mUserName
);
}
@Override
public
void
getAchievementSuccess
(
TodayAchievement
achievement
)
{
if
(
achievement
.
getAchievement
()
!=
0
)
{
mBind
.
tvLicence
.
setText
(
achievement
.
getAchievement
()
+
""
);
}
}
@Override
public
void
getOrderRecordSuccess
(
OrderRecord
record
)
{
//累计业绩
mBind
.
tvSaleRecord
.
setText
(
record
.
getLicenceInfoNum
()
+
""
);
//工单记录
mBind
.
tvWorkOrders
.
setText
(
record
.
getOrderRecord
()
+
""
);
//个人评分
mBind
.
tvScore
.
setText
(
record
.
getScore
()
+
mActivity
.
getString
(
R
.
string
.
score
));
mScore
=
record
.
getScore
()
+
""
;
drawStars
(
mBind
.
tvStar
,
mScore
,
"5"
);
}
@Override
public
void
showAlipayDialog
()
{
boolean
isShow
=
(
boolean
)
SPUtils
.
get
(
Constants
.
IS_SHOW_ALIPAY_DILAOG
,
true
);
if
(
isShow
)
{
showAlertDialog
();
SPUtils
.
put
(
Constants
.
IS_SHOW_ALIPAY_DILAOG
,
false
);
}
}
@Override
public
void
dumpToOrderRecord
()
{
}
@Override
public
void
dumpToSetting
()
{
// ARouter.getInstance().build(RouterPath.PATH_SETTING).navigation();
startActivity
(
UserInfoActivity
.
class
);
MobclickAgent
.
onEvent
(
mActivity
,
"setting"
);
}
private
void
showAlertDialog
()
{
CustomDialog
dialog
=
new
CustomDialog
(
mActivity
,
R
.
style
.
CustomDialog
,
mActivity
.
getString
(
R
.
string
.
not_set_account
)
,
(
dialog1
,
confirm
)
->
{
if
(
confirm
)
{
Intent
intent
=
new
Intent
(
mActivity
,
WithdrawalsActivity
.
class
);
startActivity
(
intent
);
dialog1
.
dismiss
();
MobclickAgent
.
onEvent
(
mActivity
,
"sure_set_account"
);
}
else
{
MobclickAgent
.
onEvent
(
mActivity
,
"cancle_set_account"
);
}
dialog1
.
dismiss
();
});
dialog
.
setTitle
(
mActivity
.
getString
(
R
.
string
.
notice
))
.
setNegativeButton
(
mActivity
.
getString
(
R
.
string
.
not_set_up
))
.
setPositiveButton
(
mActivity
.
getString
(
R
.
string
.
go_set_up
));
dialog
.
show
();
}
/**
* drawStars.
*
* @param starLinearLayout .
* @param lev .
* @param totalLevel .
*/
private
void
drawStars
(
LinearLayout
starLinearLayout
,
String
lev
,
String
totalLevel
)
{
String
level
=
"0"
;
if
(!
TextUtils
.
isEmpty
(
lev
))
{
level
=
lev
;
}
int
max
=
Integer
.
parseInt
(
totalLevel
);
int
beginNum
=
0
;
int
endNum
=
max
;
boolean
isNedHalf
=
false
;
if
(!
TextUtils
.
isEmpty
(
level
))
{
if
(
Float
.
parseFloat
(
level
)
>
max
)
{
beginNum
=
max
;
endNum
=
max
-
beginNum
;
}
else
{
Float
levelf
=
Float
.
parseFloat
(
level
);
int
leveli
=
Math
.
round
(
levelf
);
if
(
leveli
>
levelf
)
{
beginNum
=
leveli
-
1
;
endNum
=
(
max
-
1
)
-
beginNum
;
isNedHalf
=
true
;
}
else
{
beginNum
=
leveli
;
endNum
=
max
-
beginNum
;
}
}
}
starLinearLayout
.
removeAllViews
();
LinearLayout
.
LayoutParams
layoutParams
=
new
LinearLayout
.
LayoutParams
(
ViewGroup
.
LayoutParams
.
WRAP_CONTENT
,
ViewGroup
.
LayoutParams
.
WRAP_CONTENT
);
layoutParams
.
setMargins
(
3
,
0
,
3
,
0
);
for
(
int
i
=
0
;
i
<
beginNum
;
i
++)
{
ImageView
starImg
=
new
ImageView
(
mActivity
);
Bitmap
bm
=
BitmapFactory
.
decodeResource
(
mActivity
.
getResources
(),
R
.
drawable
.
person_xingxing
);
starImg
.
setImageBitmap
(
bm
);
starLinearLayout
.
addView
(
starImg
,
layoutParams
);
}
if
(
isNedHalf
)
{
ImageView
starImg
=
new
ImageView
(
mActivity
);
Bitmap
bm
=
BitmapFactory
.
decodeResource
(
mActivity
.
getResources
(),
R
.
drawable
.
person_banxing
);
starImg
.
setImageBitmap
(
bm
);
starLinearLayout
.
addView
(
starImg
,
layoutParams
);
}
for
(
int
i
=
0
;
i
<
endNum
;
i
++)
{
ImageView
starImg
=
new
ImageView
(
mActivity
);
Bitmap
bm
=
BitmapFactory
.
decodeResource
(
mActivity
.
getResources
(),
R
.
drawable
.
person_xing
);
starImg
.
setImageBitmap
(
bm
);
starLinearLayout
.
addView
(
starImg
,
layoutParams
);
}
}
@Override
public
void
onResume
()
{
super
.
onResume
();
UserInfo
userInfo
=
UserManager
.
getInstance
().
getUser
();
if
(
userInfo
!=
null
)
{
mPresenter
.
mUrl
.
set
(
userInfo
.
getHeaderImg
());
}
}
@Override
public
void
onHiddenChanged
(
boolean
hidden
)
{
super
.
onHiddenChanged
(
hidden
);
if
(
hidden
)
{
MobclickAgent
.
onPageEnd
(
TAG
);
}
else
{
MobclickAgent
.
onPageStart
(
TAG
);
}
}
@Subscribe
(
threadMode
=
ThreadMode
.
MAIN
)
public
void
certifiCation
(
CertificationEvent
event
)
{
mPresenter
.
getAllData
(
userId
,
siteId
);
}
}
userCenter/src/main/java/com/dayu/usercenter/ui/fragment/UserLicenceFragment.java
0 → 100644
View file @
c03ca250
package
com
.
dayu
.
usercenter
.
ui
.
fragment
;
import
android.os.Bundle
;
import
android.support.v7.widget.LinearLayoutManager
;
import
android.view.View
;
import
android.widget.Button
;
import
android.widget.ImageView
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.chad.library.adapter.base.BaseViewHolder
;
import
com.dayu.base.ui.fragment.BaseFragment
;
import
com.dayu.base.ui.presenter.SImplePresenter
;
import
com.dayu.usercenter.R
;
import
com.dayu.usercenter.databinding.FragmentUserLicenceBinding
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
* Created by mReturn
* on 2020/2/15
**/
public
class
UserLicenceFragment
extends
BaseFragment
<
SImplePresenter
,
FragmentUserLicenceBinding
>
{
private
int
type
;
//1.已获得 2.全部
public
static
UserLicenceFragment
newInstance
(
int
type
)
{
Bundle
args
=
new
Bundle
();
args
.
putInt
(
"type"
,
type
);
UserLicenceFragment
fragment
=
new
UserLicenceFragment
();
fragment
.
setArguments
(
args
);
return
fragment
;
}
@Override
public
int
getLayoutId
()
{
return
R
.
layout
.
fragment_user_licence
;
}
@Override
public
void
setPresenter
()
{
}
@Override
public
void
initView
()
{
Bundle
bundle
=
getArguments
();
type
=
bundle
.
getInt
(
"type"
);
setAdapter
();
}
private
void
setAdapter
()
{
List
<
String
>
testList
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
5
;
i
++)
{
testList
.
add
(
"licence_"
+
type
+
"_"
+
i
);
}
BaseQuickAdapter
<
String
,
BaseViewHolder
>
mAdapter
=
new
BaseQuickAdapter
<
String
,
BaseViewHolder
>(
R
.
layout
.
item_user_licence
,
testList
)
{
@Override
protected
void
convert
(
BaseViewHolder
helper
,
String
item
)
{
helper
.
setText
(
R
.
id
.
tv_title
,
item
);
ImageView
ivArrow
=
helper
.
getView
(
R
.
id
.
iv_arrow
);
Button
btnApply
=
helper
.
getView
(
R
.
id
.
btn_apply
);
ivArrow
.
setVisibility
(
type
==
1
?
View
.
VISIBLE
:
View
.
GONE
);
btnApply
.
setVisibility
(
type
==
2
?
View
.
VISIBLE
:
View
.
GONE
);
}
};
mBind
.
rvLicence
.
setLayoutManager
(
new
LinearLayoutManager
(
mActivity
));
mBind
.
rvLicence
.
setAdapter
(
mAdapter
);
}
}
userCenter/src/main/release/AndroidManifest.xml
View file @
c03ca250
...
...
@@ -67,7 +67,24 @@
<activity
android:name=
".ui.activity.CertificationResultActivity"
android:screenOrientation=
"portrait"
/>
<activity
android:name=
".ui.activity.CommeWebViewActivity"
android:name=
".ui.activity.CommeWebViewActivity"
android:screenOrientation=
"portrait"
/>
<activity
android:name=
".ui.activity2.UserInfoActivity"
android:screenOrientation=
"portrait"
/>
<activity
android:name=
".ui.activity2.BusinessTypeActivity"
android:screenOrientation=
"portrait"
/>
<activity
android:name=
".ui.activity2.UserLicenceActivity"
android:screenOrientation=
"portrait"
/>
<activity
android:name=
".ui.activity2.SaleRecordActivity"
android:screenOrientation=
"portrait"
/>
<activity
android:name=
".ui.activity2.ServiceRecordActivity"
android:screenOrientation=
"portrait"
/>
</application>
...
...
userCenter/src/main/res/layout/activity_business_type.xml
0 → 100644
View file @
c03ca250
<?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_business_type"
/>
<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"
android:padding=
"15dp"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:orientation=
"vertical"
>
<TextView
style=
"@style/sale_item_text"
android:text=
"@string/business_choose_scene"
/>
<android.support.v7.widget.RecyclerView
android:id=
"@+id/rv_scene"
android:layout_marginTop=
"15dp"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:overScrollMode=
"never"
/>
<TextView
style=
"@style/sale_item_text"
android:layout_marginTop=
"15dp"
android:text=
"@string/business_choose_type"
/>
<android.support.v7.widget.RecyclerView
android:id=
"@+id/rv_type"
android:layout_marginTop=
"15dp"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:overScrollMode=
"never"
/>
</LinearLayout>
</android.support.v4.widget.NestedScrollView>
>
</LinearLayout>
</layout>
\ No newline at end of file
userCenter/src/main/res/layout/activity_sale_record.xml
0 → 100644
View file @
c03ca250
<?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.support.v4.widget.NestedScrollView>
</LinearLayout>
</layout>
\ No newline at end of file
userCenter/src/main/res/layout/activity_service_record.xml
0 → 100644
View file @
c03ca250
<?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_service_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: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>
</LinearLayout>
</android.support.v4.widget.NestedScrollView>
</LinearLayout>
</layout>
\ No newline at end of file
userCenter/src/main/res/layout/activity_user_info.xml
0 → 100644
View file @
c03ca250
<?xml version="1.0" encoding="utf-8"?>
<layout
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<data>
<import
type=
"android.view.View"
/>
<variable
name=
"presenter"
type=
"com.dayu.usercenter.presenter.userinfo.UserInfoPresenter"
/>
</data>
<android.support.v4.widget.NestedScrollView
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_marginBottom=
"15dp"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"#FFF5F5F5"
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_info_setting"
/>
<ImageView
android:id=
"@+id/title_back"
style=
"@style/title_image_back"
android:onClick=
"@{()->presenter.dumpBack()}"
/>
<ImageView
style=
"@style/card_line"
android:layout_alignParentBottom=
"true"
/>
</RelativeLayout>
</RelativeLayout>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@color/cl_white"
android:padding=
"@dimen/dp_15"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
>
<TextView
style=
"@style/sale_item_text"
android:text=
"@string/user_register_info"
android:textStyle=
"bold"
/>
<LinearLayout
style=
"@style/sale_linearlayout"
>
<TextView
style=
"@style/sale_item_text"
android:text=
"@string/user_name_str"
/>
<TextView
android:id=
"@+id/tv_name"
style=
"@style/sale_item_text2"
android:text=
"@{presenter.info.realName}"
/>
</LinearLayout>
<LinearLayout
style=
"@style/sale_linearlayout"
>
<TextView
style=
"@style/sale_item_text"
android:text=
"@string/user_register_phone"
/>
<TextView
android:id=
"@+id/tv_register_phone"
style=
"@style/sale_item_text2"
android:text=
"@{presenter.info.mobile}"
/>
</LinearLayout>
<LinearLayout
style=
"@style/sale_linearlayout"
>
<TextView
style=
"@style/sale_item_text"
android:text=
"@string/user_register_time"
/>
<TextView
android:id=
"@+id/tv_register_time"
style=
"@style/sale_item_text2"
android:text=
"@{presenter.info.createTime}"
/>
</LinearLayout>
<LinearLayout
style=
"@style/sale_linearlayout"
>
<TextView
style=
"@style/sale_item_text"
android:text=
"@string/user_id_num"
/>
<TextView
android:id=
"@+id/tv_id_num"
style=
"@style/sale_item_text2"
/>
</LinearLayout>
</LinearLayout>
<com.dayu.widgets.CircleImageView
android:id=
"@+id/cv_header"
imageUrl=
"@{presenter.info.accountUrl}"
android:layout_width=
"80dp"
android:layout_height=
"80dp"
android:layout_alignParentRight=
"true"
android:layout_centerVertical=
"true"
android:src=
"@drawable/user"
/>
</RelativeLayout>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"5dp"
android:background=
"@color/cl_white"
android:padding=
"@dimen/dp_15"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
>
<TextView
style=
"@style/sale_item_text"
android:text=
"@string/user_bank_info"
android:textStyle=
"bold"
/>
<LinearLayout
style=
"@style/sale_linearlayout"
>
<TextView
style=
"@style/sale_item_text"
android:text=
"@string/user_bank_name"
/>
<TextView
style=
"@style/sale_item_text2"
/>
</LinearLayout>
<LinearLayout
style=
"@style/sale_linearlayout"
>
<TextView
style=
"@style/sale_item_text"
android:text=
"@string/user_bank_account"
/>
<TextView
style=
"@style/sale_item_text2"
/>
</LinearLayout>
<LinearLayout
style=
"@style/sale_linearlayout"
>
<TextView
style=
"@style/sale_item_text"
android:text=
"@string/user_bank_account"
/>
<TextView
style=
"@style/sale_item_text2"
/>
</LinearLayout>
</LinearLayout>
<Button
android:layout_width=
"75dp"
android:layout_height=
"35dp"
android:layout_alignParentRight=
"true"
android:layout_centerVertical=
"true"
android:background=
"@color/cl_home_button"
android:text=
"@string/edit_str"
android:textColor=
"@color/white"
/>
</RelativeLayout>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"5dp"
android:background=
"@color/cl_white"
android:padding=
"@dimen/dp_15"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
>
<TextView
style=
"@style/sale_item_text"
android:text=
"@string/user_addr_info"
android:textStyle=
"bold"
/>
<LinearLayout
style=
"@style/sale_linearlayout"
>
<TextView
style=
"@style/sale_item_text"
android:text=
"@string/user_receiver_addr"
/>
<TextView
style=
"@style/sale_item_text2"
/>
</LinearLayout>
<LinearLayout
style=
"@style/sale_linearlayout"
>
<TextView
style=
"@style/sale_item_text"
android:text=
"@string/user_receiver_name"
/>
<TextView
style=
"@style/sale_item_text2"
/>
</LinearLayout>
<LinearLayout
style=
"@style/sale_linearlayout"
>
<TextView
style=
"@style/sale_item_text"
android:text=
"@string/user_register_phone"
/>
<TextView
style=
"@style/sale_item_text2"
/>
</LinearLayout>
</LinearLayout>
<Button
android:layout_width=
"75dp"
android:layout_height=
"35dp"
android:layout_alignParentRight=
"true"
android:layout_centerVertical=
"true"
android:background=
"@color/cl_home_button"
android:text=
"@string/edit_str"
android:textColor=
"@color/white"
/>
</RelativeLayout>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:padding=
"15dp"
android:layout_marginTop=
"5dp"
android:background=
"@color/cl_white"
android:orientation=
"vertical"
>
<TextView
style=
"@style/sale_item_text"
android:text=
"@string/user_info_rule"
android:textStyle=
"bold"
/>
<TextView
style=
"@style/sale_item_text"
android:maxLines=
"15"
android:text=
"@string/user_info_rule1"
/>
<TextView
android:id=
"@+id/tv_rule2"
style=
"@style/sale_item_text"
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:id=
"@+id/rv_star_value"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:overScrollMode=
"never"
/>
<TextView
style=
"@style/sale_item_text"
android:maxLines=
"15"
android:text=
"@string/user_info_rule3"
/>
<TextView
style=
"@style/sale_item_text"
android:text=
"@string/customer_hot_line"
android:layout_gravity=
"center_horizontal"
/>
</LinearLayout>
</LinearLayout>
</android.support.v4.widget.NestedScrollView>
</layout>
\ No newline at end of file
userCenter/src/main/res/layout/activity_user_licence.xml
0 → 100644
View file @
c03ca250
<?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/tv_person_center_licence"
/>
<ImageView
android:id=
"@+id/receiving_back"
style=
"@style/title_image_back"
/>
</RelativeLayout>
<ImageView
style=
"@style/card_line"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@color/cl_white"
android:gravity=
"center"
>
<Button
android:id=
"@+id/btn_goods"
android:layout_width=
"0dp"
android:layout_weight=
"1"
android:layout_height=
"35dp"
android:background=
"@drawable/detail_center_selector"
android:gravity=
"center"
android:text=
"@string/licence_haved"
/>
<Button
android:id=
"@+id/btn_sale"
android:layout_width=
"0dp"
android:layout_height=
"35dp"
android:layout_weight=
"1"
android:background=
"@drawable/detail_end_selector"
android:gravity=
"center"
android:text=
"@string/licence_all"
/>
</LinearLayout>
<FrameLayout
android:id=
"@+id/fl_container"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_weight=
"1"
/>
</LinearLayout>
</layout>
\ No newline at end of file
userCenter/src/main/res/layout/fragment_home_user.xml
0 → 100644
View file @
c03ca250
<?xml version="1.0" encoding="utf-8"?>
<layout
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<data>
<variable
name=
"presenter"
type=
"com.dayu.usercenter.presenter.homeuser.HomeUserPresenter"
/>
</data>
<android.support.v4.widget.NestedScrollView
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@color/cl_white"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:gravity=
"center_horizontal"
android:orientation=
"vertical"
>
<RelativeLayout
android:id=
"@+id/rl_title"
style=
"@style/title"
>
<TextView
style=
"@style/text_title"
android:text=
"@string/personal_center"
/>
<ImageView
android:id=
"@+id/iv_setting"
style=
"@style/title_right_image"
android:onClick=
"@{()->presenter.dumpToSetting()}"
android:src=
"@drawable/person_setting"
/>
</RelativeLayout>
<ImageView
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:scaleType=
"fitXY"
android:src=
"@drawable/person_title_view"
android:visibility=
"gone"
/>
<RelativeLayout
android:id=
"@+id/person_one"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@drawable/personal_center_selector"
android:padding=
"15dp"
>
<com.dayu.widgets.CircleImageView
android:id=
"@+id/iv_header"
imageUrl=
"@{presenter.mUrl}"
android:layout_width=
"86dp"
android:layout_height=
"86dp"
android:layout_marginLeft=
"10dp"
android:src=
"@drawable/user"
/>
<!--android:onClick="@{()->presenter.dumpToPersonalInfo()}"-->
<ImageView
android:layout_width=
"73dp"
android:layout_height=
"20dp"
android:layout_alignLeft=
"@id/iv_header"
android:layout_alignBottom=
"@id/iv_header"
android:layout_marginLeft=
"5dp"
android:src=
"@drawable/head_shape"
android:visibility=
"gone"
/>
<TextView
android:layout_width=
"44dp"
android:layout_height=
"15dp"
android:layout_alignLeft=
"@id/iv_header"
android:layout_alignBottom=
"@id/iv_header"
android:layout_centerHorizontal=
"true"
android:layout_marginLeft=
"20dp"
android:layout_marginBottom=
"3dp"
android:text=
"@string/personal_info"
android:textColor=
"@color/white"
android:textSize=
"11sp"
android:visibility=
"gone"
/>
<TextView
android:id=
"@+id/tv_name"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"30dp"
android:layout_marginTop=
"13.3dp"
android:layout_toRightOf=
"@id/iv_header"
android:text=
"@string/tv_person_center_name"
android:textColor=
"@color/cl_home_title_text_color"
android:textSize=
"14.7sp"
android:textStyle=
"bold"
/>
<ImageView
android:id=
"@+id/iv_audited"
android:layout_width=
"41dp"
android:layout_height=
"14dp"
android:layout_marginLeft=
"2dp"
android:layout_marginTop=
"17dp"
android:layout_toRightOf=
"@id/tv_name"
android:src=
"@drawable/icon_authentication"
android:visibility=
"gone"
/>
<RelativeLayout
android:id=
"@+id/persone_two"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_below=
"@id/tv_name"
android:layout_alignLeft=
"@id/tv_name"
android:layout_marginTop=
"9.3dp"
>
<TextView
android:id=
"@+id/tv_sex"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"@string/tv_person_center_sex_value"
android:textColor=
"@color/cl_home_title_text_color"
android:textSize=
"12sp"
/>
<TextView
android:id=
"@+id/tv_age"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/dp_13"
android:layout_toRightOf=
"@id/tv_sex"
android:text=
"@string/tv_person_center_age_value"
android:textColor=
"@color/cl_home_title_text_color"
android:textSize=
"12sp"
/>
</RelativeLayout>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_below=
"@id/persone_two"
android:layout_alignLeft=
"@id/tv_name"
android:layout_marginTop=
"9.3dp"
android:orientation=
"horizontal"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"@string/str_phone"
android:textColor=
"@color/cl_home_title_text_color"
android:textSize=
"12sp"
/>
<TextView
android:id=
"@+id/tv_phone"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/dp_13"
android:layout_toRightOf=
"@id/tv_age"
android:text=
"@string/tv_person_center_phone"
android:textColor=
"@color/cl_home_title_text_color"
android:textSize=
"12sp"
/>
</LinearLayout>
</RelativeLayout>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"15dp"
android:layout_marginBottom=
"15dp"
android:orientation=
"horizontal"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"@string/user_customer_satisfied"
android:textColor=
"@color/cl_home_title_text_color"
android:textSize=
"12sp"
/>
<TextView
android:id=
"@+id/tv_score"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"10dp"
android:text=
"@string/zero_score"
android:textColor=
"@color/cl_home_title_text_color"
android:textSize=
"12sp"
/>
<LinearLayout
android:id=
"@+id/tv_star"
android:layout_width=
"90dp"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"15dp"
android:orientation=
"horizontal"
/>
</LinearLayout>
<ImageView
android:id=
"@+id/person_line"
android:layout_width=
"293.3dp"
android:layout_height=
"0.6dp"
android:layout_marginTop=
"15dp"
android:background=
"@color/cl_work_raiod"
android:visibility=
"gone"
/>
<LinearLayout
style=
"@style/ll_user_bottom"
>
<LinearLayout
style=
"@style/ll_user_bottom2"
android:onClick=
"@{()->presenter.dumpToSaleRecord()}"
>
<TextView
style=
"@style/tv_user_bottom1"
android:text=
"@string/user_sale_reward"
/>
<TextView
android:id=
"@+id/tv_sale_reward"
style=
"@style/tv_user_bottom2"
android:text=
"0"
android:textColor=
"@color/cl_order_item_date"
/>
</LinearLayout>
<LinearLayout
style=
"@style/ll_user_bottom2"
android:layout_marginLeft=
"10dp"
android:onClick=
"@{()->presenter.dumpToOrderRecord()}"
>
<TextView
style=
"@style/tv_user_bottom1"
android:text=
"@string/user_service_income"
/>
<TextView
android:id=
"@+id/tv_service_income"
style=
"@style/tv_user_bottom2"
android:text=
"0"
android:textColor=
"@color/cl_order_item_date"
/>
</LinearLayout>
</LinearLayout>
<LinearLayout
style=
"@style/ll_user_bottom"
android:layout_marginTop=
"15dp"
>
<LinearLayout
style=
"@style/ll_user_bottom2"
android:onClick=
"@{()->presenter.dumpToSaleRecord()}"
>
<TextView
style=
"@style/tv_user_bottom1"
android:text=
"@string/user_sale_record"
/>
<TextView
android:id=
"@+id/tv_sale_record"
style=
"@style/tv_user_bottom2"
android:text=
"0"
/>
</LinearLayout>
<LinearLayout
style=
"@style/ll_user_bottom2"
android:layout_marginLeft=
"10dp"
android:onClick=
"@{()->presenter.dumpToOrderRecord()}"
>
<TextView
style=
"@style/tv_user_bottom1"
android:text=
"@string/user_word_orders"
/>
<TextView
android:id=
"@+id/tv_work_orders"
style=
"@style/tv_user_bottom2"
android:text=
"0"
/>
</LinearLayout>
</LinearLayout>
<LinearLayout
style=
"@style/ll_user_bottom"
android:layout_marginTop=
"15dp"
android:layout_marginBottom=
"15dp"
>
<LinearLayout
style=
"@style/ll_user_bottom2"
android:onClick=
"@{()->presenter.dumpToBusinessType()}"
>
<TextView
style=
"@style/tv_user_bottom1"
android:text=
"@string/user_business_type"
/>
<TextView
android:id=
"@+id/tv_business_type"
style=
"@style/tv_user_bottom2"
android:text=
"0"
/>
</LinearLayout>
<LinearLayout
style=
"@style/ll_user_bottom2"
android:layout_marginLeft=
"10dp"
android:onClick=
"@{()->presenter.dumpToLicence()}"
>
<TextView
style=
"@style/tv_user_bottom1"
android:text=
"@string/tv_person_center_licence"
/>
<TextView
android:id=
"@+id/tv_licence"
style=
"@style/tv_user_bottom2"
android:text=
"0"
/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</android.support.v4.widget.NestedScrollView>
</layout>
\ No newline at end of file
userCenter/src/main/res/layout/fragment_user_licence.xml
0 → 100644
View file @
c03ca250
<?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"
>
<android.support.v7.widget.RecyclerView
android:id=
"@+id/rv_licence"
android:layout_marginTop=
"15dp"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:overScrollMode=
"never"
/>
</LinearLayout>
</layout>
\ No newline at end of file
userCenter/src/main/res/layout/item_business_type.xml
0 → 100644
View file @
c03ca250
<?xml version="1.0" encoding="utf-8"?>
<CheckBox
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:id=
"@+id/cb_item"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:text=
"scene"
android:button=
"@drawable/cb_feed_back"
android:maxLines=
"1"
android:textSize=
"12sp"
android:layout_marginBottom=
"30dp"
android:paddingLeft=
"5dp"
/>
userCenter/src/main/res/layout/item_rule_star.xml
0 → 100644
View file @
c03ca250
<?xml version="1.0" encoding="utf-8"?>
<TextView
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:id=
"@+id/tv_item"
style=
"@style/sale_item_text"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:gravity=
"center"
/>
userCenter/src/main/res/layout/item_user_licence.xml
0 → 100644
View file @
c03ca250
<?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:layout_marginLeft=
"@dimen/dp_13.3"
android:layout_marginTop=
"5dp"
android:layout_marginRight=
"@dimen/dp_13.3"
android:background=
"@drawable/item_shape"
android:gravity=
"center_vertical"
android:orientation=
"horizontal"
android:padding=
"@dimen/dp_10"
>
<ImageView
android:id=
"@+id/iv_img"
android:layout_width=
"45dp"
android:layout_height=
"45dp"
android:src=
"@drawable/icon_img_default"
/>
<LinearLayout
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/dp_15"
android:layout_weight=
"1"
android:orientation=
"vertical"
>
<TextView
android:id=
"@+id/tv_title"
style=
"@style/sale_item_text"
android:text=
"title"
android:textStyle=
"bold"
/>
<TextView
android:id=
"@+id/tv_company"
style=
"@style/sale_item_text"
android:text=
"company"
android:textStyle=
"bold"
/>
</LinearLayout>
<RelativeLayout
android:layout_width=
"70dp"
android:layout_height=
"wrap_content"
>
<ImageView
android:id=
"@+id/iv_arrow"
android:layout_width=
"15dp"
android:layout_height=
"15dp"
android:layout_alignParentRight=
"true"
android:src=
"@drawable/icon_arrow_right"
/>
<Button
android:id=
"@+id/btn_apply"
android:layout_width=
"60dp"
android:layout_height=
"30dp"
android:layout_alignParentRight=
"true"
android:layout_centerVertical=
"true"
android:background=
"@color/cl_home_button"
android:text=
"@string/licence_apply_str"
android:textColor=
"@color/white"
/>
</RelativeLayout>
</LinearLayout>
userCenter/src/main/res/values/styles.xml
0 → 100644
View file @
c03ca250
<resources>
<style
name=
"ll_user_bottom"
>
<item
name=
"android:layout_width"
>
match_parent
</item>
<item
name=
"android:layout_height"
>
wrap_content
</item>
<item
name=
"android:layout_marginLeft"
>
15dp
</item>
<item
name=
"android:layout_marginRight"
>
15dp
</item>
<item
name=
"android:orientation"
>
horizontal
</item>
</style>
<style
name=
"ll_user_bottom2"
>
<item
name=
"android:layout_width"
>
0dp
</item>
<item
name=
"android:layout_weight"
>
1
</item>
<item
name=
"android:layout_height"
>
100dp
</item>
<item
name=
"android:orientation"
>
vertical
</item>
<item
name=
"android:gravity"
>
center_horizontal
</item>
<item
name=
"android:background"
>
@drawable/personal_center_selector
</item>
</style>
<style
name=
"tv_user_bottom1"
>
<item
name=
"android:layout_width"
>
wrap_content
</item>
<item
name=
"android:layout_height"
>
wrap_content
</item>
<item
name=
"android:layout_marginTop"
>
@dimen/dp_16.7
</item>
<item
name=
"android:textColor"
>
@color/cl_home_title_text_color
</item>
<item
name=
"android:textSize"
>
12sp
</item>
</style>
<style
name=
"tv_user_bottom2"
>
<item
name=
"android:layout_width"
>
wrap_content
</item>
<item
name=
"android:layout_height"
>
wrap_content
</item>
<item
name=
"android:layout_marginTop"
>
@dimen/dp_15
</item>
<item
name=
"android:textColor"
>
@color/cl_home_button
</item>
<item
name=
"android:textSize"
>
30sp
</item>
</style>
</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