|
@@ -217,6 +217,37 @@ public class MainActivity extends AppCompatActivity implements RAWebView.WebView
|
|
|
|
|
|
|
|
} else if (value.equals("true")) {
|
|
} else if (value.equals("true")) {
|
|
|
|
|
|
|
|
|
|
+ runOnUiThread(new Runnable() {
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public void run() {
|
|
|
|
|
+ if (isShowingEmpty()) {
|
|
|
|
|
+ hidEmpty();
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ } else {
|
|
|
|
|
+
|
|
|
|
|
+ runOnUiThread(new Runnable() {
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public void run() {
|
|
|
|
|
+ new AlertDialog.Builder(mCtx)
|
|
|
|
|
+ .setTitle("Warning")
|
|
|
|
|
+ .setMessage("are you sure to exit?")
|
|
|
|
|
+ .setPositiveButton("Yes", new DialogInterface.OnClickListener() {
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public void onClick(DialogInterface dialog, int which) {
|
|
|
|
|
+ finish();
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ .setNegativeButton("No", new DialogInterface.OnClickListener() {
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public void onClick(DialogInterface dialog, int which) {
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ .show();
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
@@ -241,6 +272,10 @@ public class MainActivity extends AppCompatActivity implements RAWebView.WebView
|
|
|
mReloadBtn.setVisibility(View.GONE);
|
|
mReloadBtn.setVisibility(View.GONE);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ private boolean isShowingEmpty() {
|
|
|
|
|
+ return mEmptyContainer.getVisibility() == View.VISIBLE;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
@Override
|
|
@Override
|
|
|
protected void onRestoreInstanceState(Bundle savedInstanceState) {
|
|
protected void onRestoreInstanceState(Bundle savedInstanceState) {
|
|
|
super.onRestoreInstanceState(savedInstanceState);
|
|
super.onRestoreInstanceState(savedInstanceState);
|
|
@@ -388,7 +423,7 @@ public class MainActivity extends AppCompatActivity implements RAWebView.WebView
|
|
|
String js = mJSInterface.returnToWebPage(json, value);
|
|
String js = mJSInterface.returnToWebPage(json, value);
|
|
|
if (js != null) {
|
|
if (js != null) {
|
|
|
|
|
|
|
|
- saveExcuteJS(js);
|
|
|
|
|
|
|
+// saveExcuteJS(js);
|
|
|
|
|
|
|
|
evaluateJavaScript(js);
|
|
evaluateJavaScript(js);
|
|
|
}
|
|
}
|