Skip to content

Commit 64ba407

Browse files
committed
Slightly refactored webview java code
1 parent 8f9d17e commit 64ba407

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

pythonforandroid/bootstraps/webview/build/src/org/kivy/android/PythonActivity.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,6 @@ public void onClick(DialogInterface dialog,int id) {
138138
mWebView.getSettings().setJavaScriptEnabled(true);
139139
mWebView.getSettings().setDomStorageEnabled(true);
140140
mWebView.loadUrl("file:///" + mActivity.getFilesDir().getAbsolutePath() + "/_load.html");
141-
// mWebView.loadUrl("http://localhost:5000/");
142141

143142
mWebView.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
144143
mWebView.setWebViewClient(new WebViewClient() {
@@ -179,7 +178,7 @@ public boolean shouldOverrideUrlLoading(WebView view, String url) {
179178
PythonActivity.mPythonThread = pythonThread;
180179
pythonThread.start();
181180

182-
final Thread wvThread = new Thread(new TestMain(), "WvThread");
181+
final Thread wvThread = new Thread(new WebViewLoaderMain(), "WvThread");
183182
wvThread.start();
184183

185184
}
@@ -386,7 +385,7 @@ public void run() {
386385
}
387386
}
388387

389-
class TestMain implements Runnable {
388+
class WebViewLoaderMain implements Runnable {
390389
@Override
391390
public void run() {
392391
WebViewLoader.testConnection();

0 commit comments

Comments
 (0)