Showing
7 changed files
with
32 additions
and
21 deletions
| @@ -12,7 +12,7 @@ | @@ -12,7 +12,7 @@ | ||
| 12 | "filters": [], | 12 | "filters": [], |
| 13 | "versionCode": 205, | 13 | "versionCode": 205, |
| 14 | "versionName": "2.0.5", | 14 | "versionName": "2.0.5", |
| 15 | - "outputFile": "StudyMachine_v2.0.5_release_0908.apk" | 15 | + "outputFile": "StudyMachine_v2.0.5_release_0913.apk" |
| 16 | } | 16 | } |
| 17 | ] | 17 | ] |
| 18 | } | 18 | } |
| @@ -57,12 +57,12 @@ | @@ -57,12 +57,12 @@ | ||
| 57 | <meta-data | 57 | <meta-data |
| 58 | android:name="ScopedStorage" | 58 | android:name="ScopedStorage" |
| 59 | android:value="true" /> | 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 | <!-- 适配 Android 7.0 文件意图 --> | 67 | <!-- 适配 Android 7.0 文件意图 --> |
| 68 | <provider | 68 | <provider |
| @@ -113,7 +113,7 @@ public final class BrowserActivity extends AppActivity | @@ -113,7 +113,7 @@ public final class BrowserActivity extends AppActivity | ||
| 113 | mControlBack = findViewById(R.id.control_back); | 113 | mControlBack = findViewById(R.id.control_back); |
| 114 | mControlChange = findViewById(R.id.control_change); | 114 | mControlChange = findViewById(R.id.control_change); |
| 115 | mControlMode = findViewById(R.id.control_mode); | 115 | mControlMode = findViewById(R.id.control_mode); |
| 116 | - if (mControlBack == null){ | 116 | + if (mControlBack == null) { |
| 117 | return; | 117 | return; |
| 118 | } | 118 | } |
| 119 | mControlBack.setVisibility(View.VISIBLE); | 119 | mControlBack.setVisibility(View.VISIBLE); |
| @@ -165,7 +165,15 @@ public final class BrowserActivity extends AppActivity | @@ -165,7 +165,15 @@ public final class BrowserActivity extends AppActivity | ||
| 165 | 165 | ||
| 166 | @Override | 166 | @Override |
| 167 | public boolean onKeyDown(int keyCode, KeyEvent event) { | 167 | public boolean onKeyDown(int keyCode, KeyEvent event) { |
| 168 | + if (presentation == null) { | ||
| 169 | + return super.onKeyDown(keyCode, event); | ||
| 170 | + } | ||
| 171 | + | ||
| 168 | mX5WebView = presentation.getmX5WebView(); | 172 | mX5WebView = presentation.getmX5WebView(); |
| 173 | + if (mX5WebView == null) { | ||
| 174 | + return super.onKeyDown(keyCode, event); | ||
| 175 | + } | ||
| 176 | + | ||
| 169 | if (keyCode == KeyEvent.KEYCODE_BACK && mX5WebView.canGoBack()) { | 177 | if (keyCode == KeyEvent.KEYCODE_BACK && mX5WebView.canGoBack()) { |
| 170 | // 后退网页并且拦截该事件 | 178 | // 后退网页并且拦截该事件 |
| 171 | mX5WebView.goBack(); | 179 | mX5WebView.goBack(); |
| @@ -93,17 +93,17 @@ public final class SplashActivity extends AppActivity { | @@ -93,17 +93,17 @@ public final class SplashActivity extends AppActivity { | ||
| 93 | @Override | 93 | @Override |
| 94 | public void onSucceed(HttpData<HostApi.Bean> result) { | 94 | public void onSucceed(HttpData<HostApi.Bean> result) { |
| 95 | if (result.getData() != null) { | 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 | // AppConfig.setHostUrl(result.getData().getApi()); | 103 | // AppConfig.setHostUrl(result.getData().getApi()); |
| 104 | // AppConfig.setWebHostUrl(result.getData().getH5Url()); | 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 | // Tool.updateVersion(getContext()); | 107 | // Tool.updateVersion(getContext()); |
| 108 | initConfig(); | 108 | initConfig(); |
| 109 | } | 109 | } |
| @@ -169,14 +169,14 @@ public final class SplashActivity extends AppActivity { | @@ -169,14 +169,14 @@ public final class SplashActivity extends AppActivity { | ||
| 169 | UserManager.getInstance().getUserInfo(); | 169 | UserManager.getInstance().getUserInfo(); |
| 170 | // 刷新用户信息 | 170 | // 刷新用户信息 |
| 171 | String grade = UserManager.getInstance().getUserBean().getGrade(); | 171 | String grade = UserManager.getInstance().getUserBean().getGrade(); |
| 172 | - if ( TextUtils.isEmpty(grade)) { | 172 | + if (TextUtils.isEmpty(grade)) { |
| 173 | SwitchInfoActivity.start(this); | 173 | SwitchInfoActivity.start(this); |
| 174 | // 销毁除了首页之外的 Activity | 174 | // 销毁除了首页之外的 Activity |
| 175 | ActivityManager.getInstance().finishAllActivities(SwitchInfoActivity.class); | 175 | ActivityManager.getInstance().finishAllActivities(SwitchInfoActivity.class); |
| 176 | finish(); | 176 | finish(); |
| 177 | presentation.dismiss(); | 177 | presentation.dismiss(); |
| 178 | } else { | 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 | ActivityManager.getInstance().finishAllActivities(BrowserActivity.class); | 180 | ActivityManager.getInstance().finishAllActivities(BrowserActivity.class); |
| 181 | finish(); | 181 | finish(); |
| 182 | presentation.dismiss(); | 182 | presentation.dismiss(); |
| @@ -170,7 +170,7 @@ public class SwitchInfoActivity extends AppActivity implements RadioAdapter.OnR | @@ -170,7 +170,7 @@ public class SwitchInfoActivity extends AppActivity implements RadioAdapter.OnR | ||
| 170 | @Override | 170 | @Override |
| 171 | public void onSucceed(HttpData result) { | 171 | public void onSucceed(HttpData result) { |
| 172 | UserManager.getInstance().getUserInfo(); | 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 | presentation.dismiss(); | 174 | presentation.dismiss(); |
| 175 | finish(); | 175 | finish(); |
| 176 | } | 176 | } |
| @@ -115,7 +115,7 @@ public class SwitchInfoPresentation extends AppPresentation implements RadioAdap | @@ -115,7 +115,7 @@ public class SwitchInfoPresentation extends AppPresentation implements RadioAdap | ||
| 115 | @Override | 115 | @Override |
| 116 | public void onSucceed(HttpData result) { | 116 | public void onSucceed(HttpData result) { |
| 117 | UserManager.getInstance().getUserInfo(); | 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 | ActivityManager.getInstance().finishAllActivities(BrowserActivity.class); | 119 | ActivityManager.getInstance().finishAllActivities(BrowserActivity.class); |
| 120 | getOwnerActivity().finish(); | 120 | getOwnerActivity().finish(); |
| 121 | dismiss(); | 121 | dismiss(); |
| @@ -14,6 +14,7 @@ | @@ -14,6 +14,7 @@ | ||
| 14 | android:layout_width="wrap_content" | 14 | android:layout_width="wrap_content" |
| 15 | android:layout_height="wrap_content" | 15 | android:layout_height="wrap_content" |
| 16 | android:layout_alignParentLeft="true" | 16 | android:layout_alignParentLeft="true" |
| 17 | + android:background="@color/white" | ||
| 17 | android:text="后退" | 18 | android:text="后退" |
| 18 | android:textSize="@dimen/sp_16" | 19 | android:textSize="@dimen/sp_16" |
| 19 | android:visibility="gone" | 20 | android:visibility="gone" |
| @@ -29,6 +30,7 @@ | @@ -29,6 +30,7 @@ | ||
| 29 | android:layout_marginLeft="@dimen/dp_15" | 30 | android:layout_marginLeft="@dimen/dp_15" |
| 30 | android:text="版本切换" | 31 | android:text="版本切换" |
| 31 | android:visibility="gone" | 32 | android:visibility="gone" |
| 33 | + android:background="@color/white" | ||
| 32 | android:textColor="@color/black" | 34 | android:textColor="@color/black" |
| 33 | android:textSize="@dimen/sp_16" /> | 35 | android:textSize="@dimen/sp_16" /> |
| 34 | 36 | ||
| @@ -37,6 +39,7 @@ | @@ -37,6 +39,7 @@ | ||
| 37 | android:layout_width="wrap_content" | 39 | android:layout_width="wrap_content" |
| 38 | android:layout_height="wrap_content" | 40 | android:layout_height="wrap_content" |
| 39 | android:layout_alignParentRight="true" | 41 | android:layout_alignParentRight="true" |
| 42 | + android:background="@color/white" | ||
| 40 | android:text="操作切换" | 43 | android:text="操作切换" |
| 41 | android:visibility="gone" | 44 | android:visibility="gone" |
| 42 | android:layout_marginRight="@dimen/dp_15" | 45 | android:layout_marginRight="@dimen/dp_15" |