fixed not working reload button
This commit is contained in:
parent
897ce2e9f1
commit
5e0efc501b
@ -1,5 +1,7 @@
|
||||
package com.cradle.iitc_mobile;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import com.cradle.iitc_mobile.R;
|
||||
|
||||
import android.net.Uri;
|
||||
@ -105,12 +107,18 @@ public class IITC_Mobile extends Activity {
|
||||
return true;
|
||||
}
|
||||
|
||||
@SuppressWarnings("static-access")
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
// Handle item selection
|
||||
switch (item.getItemId()) {
|
||||
case R.id.reload_button:
|
||||
iitc_view.reload();
|
||||
try {
|
||||
iitc_view.getWebViewClient().loadIITC_JS(this);
|
||||
} catch (IOException e1) {
|
||||
e1.printStackTrace();
|
||||
}
|
||||
return true;
|
||||
// print version number
|
||||
case R.id.version_num:
|
||||
|
@ -55,4 +55,8 @@ public class IITC_WebView extends WebView {
|
||||
}
|
||||
//----------------------------------------------------------------
|
||||
|
||||
public IITC_WebViewClient getWebViewClient() {
|
||||
return this.webclient;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ public class IITC_WebViewClient extends WebViewClient {
|
||||
}
|
||||
}
|
||||
|
||||
private static void loadIITC_JS(Context c) throws java.io.IOException {
|
||||
public static void loadIITC_JS(Context c) throws java.io.IOException {
|
||||
InputStream input;
|
||||
input = c.getAssets().open("iitc.js");
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user