Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lib_base
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sikang
lib_base
Commits
af9426bd
Commit
af9426bd
authored
Sep 18, 2019
by
sikang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
4.8v2
parent
e0ed45c1
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
49 additions
and
39 deletions
+49
-39
src/main/java/com/common/activity/ReviewHookActivity.java
+37
-38
src/main/java/tech/starwin/LibConfig.java
+1
-0
src/main/java/tech/starwin/mvp/presenter/UserPresenter.java
+8
-0
src/main/java/tech/starwin/mvp/ui/adapter/ReviewProductAdapter.java
+3
-1
src/main/res/values-en/strings.xml
+0
-0
No files found.
src/main/java/com/common/activity/ReviewHookActivity.java
View file @
af9426bd
...
...
@@ -115,41 +115,41 @@ public class ReviewHookActivity extends BaseActivity {
startLogin
();
});
Dialog
ysDialog
=
DialogFactory
.
createCustomDialog
(
this
,
R
.
layout
.
dialog_collect_tip
,
(
dialog
,
viewHolder
)
->
{
CheckBox
checkBox
=
viewHolder
.
getCheckBox
(
R
.
id
.
dialog_collect_checkbox
);
checkBox
.
setOnCheckedChangeListener
((
buttonView
,
isChecked
)
->
{
if
(
isChecked
)
{
viewHolder
.
getButton
(
R
.
id
.
dialog_collect_sure_btn
).
setTextColor
(
getResources
().
getColor
(
R
.
color
.
color_blue
));
}
else
{
viewHolder
.
getButton
(
R
.
id
.
dialog_collect_sure_btn
).
setTextColor
(
getResources
().
getColor
(
R
.
color
.
qmui_config_color_gray_5
));
}
});
UIHelper
.
bindClickListener
((
ViewGroup
)
viewHolder
.
getItemView
(),
new
OnNoShakeClickListener
()
{
@Override
public
void
onEventClick
(
View
v
)
{
if
(
v
.
getId
()
==
R
.
id
.
dialog_collect_agree_tv
)
{
checkBox
.
setChecked
(!
checkBox
.
isChecked
());
}
else
if
(
v
.
getId
()
==
R
.
id
.
dialog_collect_cancel_btn
)
{
finish
();
}
else
if
(
v
.
getId
()
==
R
.
id
.
dialog_collect_sure_btn
)
{
if
(!
checkBox
.
isChecked
())
{
DialogFactory
.
showMessageDialog
(
ReviewHookActivity
.
this
,
getString
(
R
.
string
.
check_the_checkbox
));
return
;
}
dialog
.
dismiss
();
}
}
},
R
.
id
.
dialog_collect_agree_tv
,
R
.
id
.
dialog_collect_cancel_btn
,
R
.
id
.
dialog_collect_sure_btn
);
});
ysDialog
.
setCancelable
(
false
);
ysDialog
.
show
();
//
Dialog ysDialog = DialogFactory.createCustomDialog(this, R.layout.dialog_collect_tip,
//
(dialog, viewHolder) -> {
//
CheckBox checkBox = viewHolder.getCheckBox(R.id.dialog_collect_checkbox);
//
checkBox.setOnCheckedChangeListener((buttonView, isChecked) -> {
//
if (isChecked) {
//
viewHolder.getButton(R.id.dialog_collect_sure_btn).setTextColor(getResources().getColor(R.color.color_blue));
//
} else {
//
viewHolder.getButton(R.id.dialog_collect_sure_btn).setTextColor(getResources().getColor(R.color.qmui_config_color_gray_5));
//
}
//
});
//
//
UIHelper.bindClickListener((ViewGroup) viewHolder.getItemView(),
//
new OnNoShakeClickListener() {
//
@Override
//
public void onEventClick(View v) {
//
if (v.getId() == R.id.dialog_collect_agree_tv) {
//
checkBox.setChecked(!checkBox.isChecked());
//
} else if (v.getId() == R.id.dialog_collect_cancel_btn) {
//
finish();
//
} else if (v.getId() == R.id.dialog_collect_sure_btn) {
//
if (!checkBox.isChecked()) {
//
DialogFactory.showMessageDialog(ReviewHookActivity.this, getString(R.string.check_the_checkbox));
//
return;
//
}
//
dialog.dismiss();
//
}
//
}
//
},
//
R.id.dialog_collect_agree_tv,
//
R.id.dialog_collect_cancel_btn,
//
R.id.dialog_collect_sure_btn);
//
});
//
//
ysDialog.setCancelable(false);
//
ysDialog.show();
}
...
...
@@ -227,9 +227,8 @@ public class ReviewHookActivity extends BaseActivity {
}
else
if
(
i
==
R
.
id
.
activity_review_helpCenter_btn
)
{
HelpCenterActivity
.
start
(
ReviewHookActivity
.
this
);
return
;
}
else
if
(
i
==
R
.
id
.
activity_review_aboutUs_btn
)
{
AboutUsActivity
.
start
(
ReviewHookActivity
.
this
);
return
;
}
else
if
(
i
==
R
.
id
.
activity_review_hotline_btn
){
DialogFactory
.
showMessageDialog
(
ReviewHookActivity
.
this
,
LibConfig
.
HOTLINE
);
}
//需要登录才能使用的功能
if
(
LoginManager
.
get
().
getTokenInfo
()
==
null
)
{
...
...
src/main/java/tech/starwin/LibConfig.java
View file @
af9426bd
...
...
@@ -72,6 +72,7 @@ public class LibConfig {
public
static
boolean
IS_COLLECT_MODE
;
public
static
String
TEST_TOKEN
;
public
static
String
LANGUAGE
=
"in"
;
public
static
String
HOOK_SYMBOL
=
"Rp"
;
public
static
int
HARVESTER_PORT
;
//
public
static
int
LOADING_ICON
;
//loading图标
public
static
int
LOADING_BACKGROUND
;
//loading旋转背景
...
...
src/main/java/tech/starwin/mvp/presenter/UserPresenter.java
View file @
af9426bd
...
...
@@ -663,6 +663,14 @@ public class UserPresenter extends BasePresenter<UserApi> {
/**
* 获取SD权限后再调用一次display
* */
public
void
refreshDiaplay
(
String
action
)
{
handleRequest
(
action
,
apiService
.
display
());
}
/**
* 获取联系人信息
*/
public
void
getContactInfo
(
String
action
)
{
...
...
src/main/java/tech/starwin/mvp/ui/adapter/ReviewProductAdapter.java
View file @
af9426bd
...
...
@@ -7,6 +7,7 @@ import com.common.bean.ProductBean;
import
java.util.List
;
import
tech.starwin.LibConfig
;
import
tech.starwin.R
;
import
tech.starwin.base.BaseRecyclerAdapter
;
import
tech.starwin.base.RecyclerViewHolder
;
...
...
@@ -30,11 +31,12 @@ public class ReviewProductAdapter extends BaseRecyclerAdapter<ProductBean> {
holder
.
getTextView
(
R
.
id
.
item_review_product_productName_tv
).
setText
(
item
.
getName
()
+
getContext
().
getString
(
R
.
string
.
text_interest_day
));
//额度
String
amount
;
if
(
item
.
getMaxAmount
()
-
item
.
getMinAmount
()
<
1
)
{
if
(
item
.
getMaxAmount
()
-
item
.
getMinAmount
()
<
1
)
{
amount
=
StringFormat
.
moneyFormat
(
getContext
(),
item
.
getMinAmount
());
}
else
{
amount
=
StringFormat
.
moneyFormat
(
getContext
(),
item
.
getMinAmount
())
+
" | "
+
StringFormat
.
moneyFormat
(
getContext
(),
item
.
getMaxAmount
());
}
amount
=
amount
.
replace
(
getContext
().
getString
(
R
.
string
.
moneySymbol
),
LibConfig
.
HOOK_SYMBOL
);
holder
.
getTextView
(
R
.
id
.
item_review_product_amount_tv
).
setText
(
amount
);
//还款期限
String
period
;
...
...
src/main/res/values-en/strings.xml
View file @
af9426bd
This diff is collapsed.
Click to expand it.
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