Showing
7 changed files
with
32 additions
and
21 deletions
... | ... | @@ -57,12 +57,12 @@ |
57 | 57 | <meta-data |
58 | 58 | android:name="ScopedStorage" |
59 | 59 | android:value="true" /> |
60 | - <meta-data | |
61 | - android:name="com.rokid.uxr.application.mode" | |
62 | - android:value="3d" /> | |
63 | - <meta-data | |
64 | - android:name="com.rokid.uxr.sdk.version" | |
65 | - android:value="10900" /> | |
60 | +<!-- <meta-data--> | |
61 | +<!-- android:name="com.rokid.uxr.application.mode"--> | |
62 | +<!-- android:value="3d" />--> | |
63 | +<!-- <meta-data--> | |
64 | +<!-- android:name="com.rokid.uxr.sdk.version"--> | |
65 | +<!-- android:value="10900" />--> | |
66 | 66 | |
67 | 67 | <!-- 适配 Android 7.0 文件意图 --> |
68 | 68 | <provider | ... | ... |
... | ... | @@ -113,7 +113,7 @@ public final class BrowserActivity extends AppActivity |
113 | 113 | mControlBack = findViewById(R.id.control_back); |
114 | 114 | mControlChange = findViewById(R.id.control_change); |
115 | 115 | mControlMode = findViewById(R.id.control_mode); |
116 | - if (mControlBack == null){ | |
116 | + if (mControlBack == null) { | |
117 | 117 | return; |
118 | 118 | } |
119 | 119 | mControlBack.setVisibility(View.VISIBLE); |
... | ... | @@ -165,7 +165,15 @@ public final class BrowserActivity extends AppActivity |
165 | 165 | |
166 | 166 | @Override |
167 | 167 | public boolean onKeyDown(int keyCode, KeyEvent event) { |
168 | + if (presentation == null) { | |
169 | + return super.onKeyDown(keyCode, event); | |
170 | + } | |
171 | + | |
168 | 172 | mX5WebView = presentation.getmX5WebView(); |
173 | + if (mX5WebView == null) { | |
174 | + return super.onKeyDown(keyCode, event); | |
175 | + } | |
176 | + | |
169 | 177 | if (keyCode == KeyEvent.KEYCODE_BACK && mX5WebView.canGoBack()) { |
170 | 178 | // 后退网页并且拦截该事件 |
171 | 179 | mX5WebView.goBack(); | ... | ... |
... | ... | @@ -93,17 +93,17 @@ public final class SplashActivity extends AppActivity { |
93 | 93 | @Override |
94 | 94 | public void onSucceed(HttpData<HostApi.Bean> result) { |
95 | 95 | if (result.getData() != null) { |
96 | -// if (AppConfig.isDebug()) { | |
97 | -// AppConfig.setHostUrl("http://192.168.1.23:8100/"); | |
98 | -// AppConfig.setWebHostUrl("http://192.168.1.26:8086/"); | |
99 | -// } else { | |
100 | -// AppConfig.setHostUrl(result.getData().getApi()); | |
101 | -// AppConfig.setWebHostUrl(result.getData().getH5Url()); | |
102 | -// } | |
96 | + if (AppConfig.isDebug()) { | |
97 | + AppConfig.setHostUrl("https://api.veln.cn/"); | |
98 | + AppConfig.setWebHostUrl("https://h5.veln.cn/"); | |
99 | + } else { | |
100 | + AppConfig.setHostUrl(result.getData().getApi()); | |
101 | + AppConfig.setWebHostUrl(result.getData().getH5Url()); | |
102 | + } | |
103 | 103 | // AppConfig.setHostUrl(result.getData().getApi()); |
104 | 104 | // AppConfig.setWebHostUrl(result.getData().getH5Url()); |
105 | - AppConfig.setHostUrl("https://api.veln.cn/"); | |
106 | - AppConfig.setWebHostUrl("https://h5.veln.cn/"); | |
105 | +// AppConfig.setHostUrl("https://api.veln.cn/"); | |
106 | +// AppConfig.setWebHostUrl("https://h5.veln.cn/"); | |
107 | 107 | // Tool.updateVersion(getContext()); |
108 | 108 | initConfig(); |
109 | 109 | } |
... | ... | @@ -169,14 +169,14 @@ public final class SplashActivity extends AppActivity { |
169 | 169 | UserManager.getInstance().getUserInfo(); |
170 | 170 | // 刷新用户信息 |
171 | 171 | String grade = UserManager.getInstance().getUserBean().getGrade(); |
172 | - if ( TextUtils.isEmpty(grade)) { | |
172 | + if (TextUtils.isEmpty(grade)) { | |
173 | 173 | SwitchInfoActivity.start(this); |
174 | 174 | // 销毁除了首页之外的 Activity |
175 | 175 | ActivityManager.getInstance().finishAllActivities(SwitchInfoActivity.class); |
176 | 176 | finish(); |
177 | 177 | presentation.dismiss(); |
178 | 178 | } else { |
179 | - BrowserActivity.start(getContext(),"https://preview.inibiru.com/creator/custom/index.html?id=12242"); | |
179 | + BrowserActivity.start(getContext(), "https://preview.inibiru.com/creator/custom/index.html?id=12250"); | |
180 | 180 | ActivityManager.getInstance().finishAllActivities(BrowserActivity.class); |
181 | 181 | finish(); |
182 | 182 | presentation.dismiss(); | ... | ... |
... | ... | @@ -170,7 +170,7 @@ public class SwitchInfoActivity extends AppActivity implements RadioAdapter.OnR |
170 | 170 | @Override |
171 | 171 | public void onSucceed(HttpData result) { |
172 | 172 | UserManager.getInstance().getUserInfo(); |
173 | - BrowserActivity.start(getContext(), "https://preview.inibiru.com/creator/custom/index.html?id=12242"); | |
173 | + BrowserActivity.start(getContext(), "https://preview.inibiru.com/creator/custom/index.html?id=12250"); | |
174 | 174 | presentation.dismiss(); |
175 | 175 | finish(); |
176 | 176 | } | ... | ... |
... | ... | @@ -115,7 +115,7 @@ public class SwitchInfoPresentation extends AppPresentation implements RadioAdap |
115 | 115 | @Override |
116 | 116 | public void onSucceed(HttpData result) { |
117 | 117 | UserManager.getInstance().getUserInfo(); |
118 | - BrowserActivity.start(getContext(), "https://preview.inibiru.com/creator/custom/index.html?id=12242"); | |
118 | + BrowserActivity.start(getContext(), "https://preview.inibiru.com/creator/custom/index.html?id=12250"); | |
119 | 119 | ActivityManager.getInstance().finishAllActivities(BrowserActivity.class); |
120 | 120 | getOwnerActivity().finish(); |
121 | 121 | dismiss(); | ... | ... |
... | ... | @@ -14,6 +14,7 @@ |
14 | 14 | android:layout_width="wrap_content" |
15 | 15 | android:layout_height="wrap_content" |
16 | 16 | android:layout_alignParentLeft="true" |
17 | + android:background="@color/white" | |
17 | 18 | android:text="后退" |
18 | 19 | android:textSize="@dimen/sp_16" |
19 | 20 | android:visibility="gone" |
... | ... | @@ -29,6 +30,7 @@ |
29 | 30 | android:layout_marginLeft="@dimen/dp_15" |
30 | 31 | android:text="版本切换" |
31 | 32 | android:visibility="gone" |
33 | + android:background="@color/white" | |
32 | 34 | android:textColor="@color/black" |
33 | 35 | android:textSize="@dimen/sp_16" /> |
34 | 36 | |
... | ... | @@ -37,6 +39,7 @@ |
37 | 39 | android:layout_width="wrap_content" |
38 | 40 | android:layout_height="wrap_content" |
39 | 41 | android:layout_alignParentRight="true" |
42 | + android:background="@color/white" | |
40 | 43 | android:text="操作切换" |
41 | 44 | android:visibility="gone" |
42 | 45 | android:layout_marginRight="@dimen/dp_15" | ... | ... |