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
28f4adf3
Commit
28f4adf3
authored
Sep 17, 2019
by
sikang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
button enable
parent
4006c07c
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
50 additions
and
8 deletions
+50
-8
src/main/java/com/common/activity/AgreementPolicyActivity.java
+22
-1
src/main/java/com/common/activity/ReviewHookActivity.java
+16
-4
src/main/res/layout/activity_policy.xml
+2
-1
src/main/res/layout/dialog_collect_tip.xml
+2
-1
src/main/res/layout/dialog_policy.xml
+2
-1
src/main/res/values-en/strings.xml
+1
-0
src/main/res/values-vi/strings.xml
+2
-0
src/main/res/values-zh/strings.xml
+1
-0
src/main/res/values/strings.xml
+2
-0
No files found.
src/main/java/com/common/activity/AgreementPolicyActivity.java
View file @
28f4adf3
...
@@ -13,7 +13,9 @@ import android.view.ViewGroup;
...
@@ -13,7 +13,9 @@ import android.view.ViewGroup;
import
android.webkit.WebSettings
;
import
android.webkit.WebSettings
;
import
android.webkit.WebStorage
;
import
android.webkit.WebStorage
;
import
android.webkit.WebView
;
import
android.webkit.WebView
;
import
android.widget.Button
;
import
android.widget.CheckBox
;
import
android.widget.CheckBox
;
import
android.widget.CompoundButton
;
import
android.widget.TextView
;
import
android.widget.TextView
;
...
@@ -63,6 +65,15 @@ public class AgreementPolicyActivity extends BaseActivity {
...
@@ -63,6 +65,15 @@ public class AgreementPolicyActivity extends BaseActivity {
if
(
type
==
Type
.
AGREEMENT_KSP
)
{
if
(
type
==
Type
.
AGREEMENT_KSP
)
{
viewHolder
.
getTextView
(
R
.
id
.
dialog_policy_ksp_tv
).
setVisibility
(
View
.
VISIBLE
);
viewHolder
.
getTextView
(
R
.
id
.
dialog_policy_ksp_tv
).
setVisibility
(
View
.
VISIBLE
);
}
}
viewHolder
.
getCheckBox
(
R
.
id
.
dialog_policy_checkbox
).
setOnCheckedChangeListener
((
buttonView
,
isChecked
)
->
{
if
(
isChecked
){
viewHolder
.
getButton
(
R
.
id
.
dialog_policy_sure_btn
).
setTextColor
(
context
.
getResources
().
getColor
(
R
.
color
.
color_blue
));
}
else
{
viewHolder
.
getButton
(
R
.
id
.
dialog_policy_sure_btn
).
setTextColor
(
context
.
getResources
().
getColor
(
R
.
color
.
qmui_config_color_gray_5
));
}
});
UIHelper
.
bindClickListener
((
ViewGroup
)
viewHolder
.
getItemView
(),
UIHelper
.
bindClickListener
((
ViewGroup
)
viewHolder
.
getItemView
(),
new
OnNoShakeClickListener
()
{
new
OnNoShakeClickListener
()
{
@Override
@Override
...
@@ -80,7 +91,8 @@ public class AgreementPolicyActivity extends BaseActivity {
...
@@ -80,7 +91,8 @@ public class AgreementPolicyActivity extends BaseActivity {
}
}
WebActivity
.
start
(
context
,
context
.
getString
(
R
.
string
.
koperasi_form
),
kspUrl
);
WebActivity
.
start
(
context
,
context
.
getString
(
R
.
string
.
koperasi_form
),
kspUrl
);
}
else
if
(
v
.
getId
()
==
R
.
id
.
dialog_policy_agree_tv
)
{
}
else
if
(
v
.
getId
()
==
R
.
id
.
dialog_policy_agree_tv
)
{
viewHolder
.
getCheckBox
(
R
.
id
.
dialog_policy_checkbox
).
setChecked
(
true
);
CheckBox
checkBox
=
viewHolder
.
getCheckBox
(
R
.
id
.
dialog_policy_checkbox
);
checkBox
.
setChecked
(!
checkBox
.
isChecked
());
}
else
if
(
v
.
getId
()
==
R
.
id
.
dialog_policy_cancel_btn
)
{
}
else
if
(
v
.
getId
()
==
R
.
id
.
dialog_policy_cancel_btn
)
{
context
.
finish
();
context
.
finish
();
}
else
if
(
v
.
getId
()
==
R
.
id
.
dialog_policy_sure_btn
)
{
}
else
if
(
v
.
getId
()
==
R
.
id
.
dialog_policy_sure_btn
)
{
...
@@ -143,6 +155,15 @@ public class AgreementPolicyActivity extends BaseActivity {
...
@@ -143,6 +155,15 @@ public class AgreementPolicyActivity extends BaseActivity {
EventBus
.
getDefault
().
register
(
this
);
EventBus
.
getDefault
().
register
(
this
);
mCheckBox
=
findViewById
(
R
.
id
.
activity_policy_checkbox
);
mCheckBox
=
findViewById
(
R
.
id
.
activity_policy_checkbox
);
Button
button
=
findViewById
(
R
.
id
.
activity_policy_ok_btn
);
mCheckBox
.
setOnCheckedChangeListener
((
buttonView
,
isChecked
)
->
{
if
(
isChecked
){
button
.
setBackgroundResource
(
R
.
drawable
.
shape_mainsolid_round
);
}
else
{
button
.
setBackgroundColor
(
getResources
().
getColor
(
R
.
color
.
qmui_config_color_gray_5
));
}
});
webView
=
findViewById
(
R
.
id
.
activity_policy_webview
);
webView
=
findViewById
(
R
.
id
.
activity_policy_webview
);
WebSettings
settings
=
webView
.
getSettings
();
WebSettings
settings
=
webView
.
getSettings
();
settings
.
setJavaScriptEnabled
(
true
);
settings
.
setJavaScriptEnabled
(
true
);
...
...
src/main/java/com/common/activity/ReviewHookActivity.java
View file @
28f4adf3
...
@@ -8,6 +8,7 @@ import android.support.v7.widget.RecyclerView;
...
@@ -8,6 +8,7 @@ import android.support.v7.widget.RecyclerView;
import
android.view.Gravity
;
import
android.view.Gravity
;
import
android.view.View
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
android.view.ViewGroup
;
import
android.widget.CheckBox
;
import
android.widget.ImageButton
;
import
android.widget.ImageButton
;
import
android.widget.LinearLayout
;
import
android.widget.LinearLayout
;
import
android.widget.RelativeLayout
;
import
android.widget.RelativeLayout
;
...
@@ -115,16 +116,26 @@ public class ReviewHookActivity extends BaseActivity {
...
@@ -115,16 +116,26 @@ public class ReviewHookActivity extends BaseActivity {
});
});
Dialog
ysDialog
=
DialogFactory
.
createCustomDialog
(
this
,
R
.
layout
.
dialog_collect_tip
,
Dialog
ysDialog
=
DialogFactory
.
createCustomDialog
(
this
,
R
.
layout
.
dialog_collect_tip
,
(
dialog
,
viewHolder
)
->
UIHelper
.
bindClickListener
((
ViewGroup
)
viewHolder
.
getItemView
(),
(
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
()
{
new
OnNoShakeClickListener
()
{
@Override
@Override
public
void
onEventClick
(
View
v
)
{
public
void
onEventClick
(
View
v
)
{
if
(
v
.
getId
()
==
R
.
id
.
dialog_collect_agree_tv
)
{
if
(
v
.
getId
()
==
R
.
id
.
dialog_collect_agree_tv
)
{
viewHolder
.
getCheckBox
(
R
.
id
.
dialog_collect_checkbox
).
setChecked
(
true
);
checkBox
.
setChecked
(!
checkBox
.
isChecked
()
);
}
else
if
(
v
.
getId
()
==
R
.
id
.
dialog_collect_cancel_btn
)
{
}
else
if
(
v
.
getId
()
==
R
.
id
.
dialog_collect_cancel_btn
)
{
finish
();
finish
();
}
else
if
(
v
.
getId
()
==
R
.
id
.
dialog_collect_sure_btn
)
{
}
else
if
(
v
.
getId
()
==
R
.
id
.
dialog_collect_sure_btn
)
{
if
(!
viewHolder
.
getCheckBox
(
R
.
id
.
dialog_collect_checkbox
)
.
isChecked
())
{
if
(!
checkBox
.
isChecked
())
{
DialogFactory
.
showMessageDialog
(
ReviewHookActivity
.
this
,
getString
(
R
.
string
.
check_the_checkbox
));
DialogFactory
.
showMessageDialog
(
ReviewHookActivity
.
this
,
getString
(
R
.
string
.
check_the_checkbox
));
return
;
return
;
}
}
...
@@ -134,7 +145,8 @@ public class ReviewHookActivity extends BaseActivity {
...
@@ -134,7 +145,8 @@ public class ReviewHookActivity extends BaseActivity {
},
},
R
.
id
.
dialog_collect_agree_tv
,
R
.
id
.
dialog_collect_agree_tv
,
R
.
id
.
dialog_collect_cancel_btn
,
R
.
id
.
dialog_collect_cancel_btn
,
R
.
id
.
dialog_collect_sure_btn
));
R
.
id
.
dialog_collect_sure_btn
);
});
ysDialog
.
setCancelable
(
false
);
ysDialog
.
setCancelable
(
false
);
ysDialog
.
show
();
ysDialog
.
show
();
...
...
src/main/res/layout/activity_policy.xml
View file @
28f4adf3
...
@@ -49,7 +49,8 @@
...
@@ -49,7 +49,8 @@
<Button
<Button
android:id=
"@+id/activity_policy_ok_btn"
android:id=
"@+id/activity_policy_ok_btn"
style=
"@style/main_color_roundBtn"
android:textColor=
"@color/white"
android:background=
"@color/qmui_config_color_gray_5"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_margin=
"16dp"
android:layout_margin=
"16dp"
...
...
src/main/res/layout/dialog_collect_tip.xml
View file @
28f4adf3
...
@@ -74,7 +74,7 @@
...
@@ -74,7 +74,7 @@
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:background=
"@color/white"
android:background=
"@color/white"
android:text=
"@string/text_sure"
android:text=
"@string/text_sure"
android:textColor=
"@color/
color_blue
"
/>
android:textColor=
"@color/
qmui_config_color_gray_5
"
/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
src/main/res/layout/dialog_policy.xml
View file @
28f4adf3
...
@@ -93,7 +93,7 @@
...
@@ -93,7 +93,7 @@
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:background=
"@color/white"
android:background=
"@color/white"
android:text=
"@string/text_sure"
android:text=
"@string/text_sure"
android:textColor=
"@color/
color_blue
"
/>
android:textColor=
"@color/
qmui_config_color_gray_5
"
/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
src/main/res/values-en/strings.xml
View file @
28f4adf3
...
@@ -46,6 +46,7 @@
...
@@ -46,6 +46,7 @@
<string
name=
"text_title_myloan"
>
Khoản vay của tôi
</string>
<string
name=
"text_title_myloan"
>
Khoản vay của tôi
</string>
<string
name=
"text_i_agree"
>
Tôi đồng ý %s
</string>
<string
name=
"enum_job_waiter"
>
Dịch vụ khách hàng
</string>
<string
name=
"enum_job_waiter"
>
Dịch vụ khách hàng
</string>
...
...
src/main/res/values-vi/strings.xml
View file @
28f4adf3
...
@@ -36,6 +36,8 @@
...
@@ -36,6 +36,8 @@
<string
name=
"text_low_level"
>
Bạn không được xếp hạng đủ để áp dụng cho sản phẩm này
</string>
<string
name=
"text_low_level"
>
Bạn không được xếp hạng đủ để áp dụng cho sản phẩm này
</string>
<string
name=
"text_login_failed"
>
đăng nhập thất bại
</string>
<string
name=
"text_login_failed"
>
đăng nhập thất bại
</string>
<string
name=
"text_i_agree"
>
Tôi đồng ý %s
</string>
<string
name=
"certify_not_pass"
>
Bạn phải hoàn thành các mục xác thực sau
</string>
<string
name=
"certify_not_pass"
>
Bạn phải hoàn thành các mục xác thực sau
</string>
<string
name=
"text_loan_amount_statement"
>
Vui lòng chọn số tiền cho vay
</string>
<string
name=
"text_loan_amount_statement"
>
Vui lòng chọn số tiền cho vay
</string>
...
...
src/main/res/values-zh/strings.xml
View file @
28f4adf3
...
@@ -904,6 +904,7 @@
...
@@ -904,6 +904,7 @@
<string
name=
"text_about_us"
>
Powered By StarWin.Tech
</string>
<string
name=
"text_about_us"
>
Powered By StarWin.Tech
</string>
<string
name=
"i_agree_this_policy"
>
我同意上述协议
</string>
<string
name=
"i_agree_this_policy"
>
我同意上述协议
</string>
<string
name=
"i_agree_ksp_policy"
>
我同意 %s 并签署 %s
</string>
<string
name=
"i_agree_ksp_policy"
>
我同意 %s 并签署 %s
</string>
<string
name=
"text_i_agree"
>
我同意 %s
</string>
<string
name=
"read_policy_fully"
>
*请完整阅读本政策
</string>
<string
name=
"read_policy_fully"
>
*请完整阅读本政策
</string>
<string
name=
"check_the_checkbox"
>
请勾选复选框以同意政策
</string>
<string
name=
"check_the_checkbox"
>
请勾选复选框以同意政策
</string>
<string
name=
"text_field_identity_info"
>
身份信息
</string>
<string
name=
"text_field_identity_info"
>
身份信息
</string>
...
...
src/main/res/values/strings.xml
View file @
28f4adf3
...
@@ -977,6 +977,8 @@
...
@@ -977,6 +977,8 @@
<string
name=
"i_agree_this_policy"
>
Saya menyetujui perjanjian di atas
</string>
<string
name=
"i_agree_this_policy"
>
Saya menyetujui perjanjian di atas
</string>
<string
name=
"i_agree_ksp_policy"
>
Saya setuju dengan %s Dan menandatangani %s
</string>
<string
name=
"i_agree_ksp_policy"
>
Saya setuju dengan %s Dan menandatangani %s
</string>
<string
name=
"text_i_agree"
>
Saya menyetujui %s
</string>
<string
name=
"read_policy_fully"
>
*Mohon baca sepenuhnya Kebijakan ini
</string>
<string
name=
"read_policy_fully"
>
*Mohon baca sepenuhnya Kebijakan ini
</string>
<string
name=
"check_the_checkbox"
>
Setujui Kebijakan tersebut dengan mencentang kotak centang
</string>
<string
name=
"check_the_checkbox"
>
Setujui Kebijakan tersebut dengan mencentang kotak centang
</string>
<string
name=
"text_field_identity_info"
>
Informasi Identitas
</string>
<string
name=
"text_field_identity_info"
>
Informasi Identitas
</string>
...
...
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