Skip to content

Commit eb7d7c1

Browse files
author
sherry
committed
update android dialog theme
1 parent 3b4c5fa commit eb7d7c1

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

android/src/main/java/cn/jiguang/plugins/verification/JVerificationModule.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ public void dismissLoginAuthActivity(){
133133

134134
@ReactMethod
135135
public void setCustomUIWithConfig(final ReadableMap readableMap, final ReadableArray readableArray){
136+
builder = null;
136137
convertToConfig(readableMap);
137138
reactContext.runOnUiQueueThread(new Runnable() {
138139
@Override
@@ -184,7 +185,7 @@ public void onResult(int code, String msg) {
184185
@ReactMethod
185186
public void setTimeWithConfig(int time){
186187
JVerificationInterface.setSmsIntervalTime(time);
187-
}
188+
}
188189

189190
private void sendEvent(String eventName, WritableMap params) {
190191
try {

example/App.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,12 @@ const androidDialogConfig = {
161161
navColor:0xff000000,
162162
loginBtnText:" 极光认证测试 ",
163163
privacyCheckEnable:false,
164-
privacyColor:[0xff00f000,0xff000000]
164+
privacyColor:[0xff00f000,0xff000000],
165+
loginBtnWidth:40,
166+
privacyOne: ['隐私条款一', 'https://www.jiguang.cn/about'], //隐私条款一(显示名称和url,请严格按照格式)
167+
privacyColor: [-16777216, -65536], //隐私条款颜色 (显示名称和url的颜色,请严格按照格式)
168+
privacyText: ['登录即同意', '和', '、', '并使用本机号码登录'], //隐私条款名称外的文字
169+
privacyTextSize: 12,
165170
}
166171
//ios授权页弹窗模式
167172
const iosDialogConfig = {
@@ -234,9 +239,7 @@ export default class App extends React.Component {
234239
<Button title='自定义弹窗授权页'
235240
onPress={() => {
236241
if(Platform.OS == 'android'){
237-
// const params = Object.assign(androidDialogConfig,customConfigParams);
238-
console.log('androidDialogConfig>>>>',JSON.stringify(androidDialogConfig),'>>>>>')
239-
JVerification.addLoginCustomConfig(androidDialogConfig, []);
242+
JVerification.addLoginCustomConfig(androidDialogConfig, undefined);
240243
} else {
241244
JVerification.addLoginCustomConfig(iosDialogConfig, []);
242245
}

0 commit comments

Comments
 (0)