|
|
@@ -8,7 +8,6 @@ import android.webkit.WebResourceRequest; |
|
|
|
import android.webkit.WebSettings; |
|
|
|
import android.webkit.WebView; |
|
|
|
import android.webkit.WebViewClient; |
|
|
|
import android.widget.EditText; |
|
|
|
|
|
|
|
import androidx.annotation.Nullable; |
|
|
|
import androidx.appcompat.app.AlertDialog; |
|
|
@@ -27,6 +26,10 @@ public class FullscreenActivity extends AppCompatActivity { |
|
|
|
|
|
|
|
private BaseWebChromeClient chromeClient; |
|
|
|
|
|
|
|
private String[] urls = new String[]{ |
|
|
|
"http://116.255.135.38:86/authenticRight/login", "http://116.255.135.38:89/homestead/login " |
|
|
|
}; |
|
|
|
|
|
|
|
@SuppressLint("SetJavaScriptEnabled") |
|
|
|
@Override |
|
|
|
protected void onCreate(Bundle savedInstanceState) { |
|
|
@@ -45,15 +48,15 @@ public class FullscreenActivity extends AppCompatActivity { |
|
|
|
return false; |
|
|
|
} |
|
|
|
}); |
|
|
|
EditText textView = new EditText(this); |
|
|
|
|
|
|
|
AlertDialog alertDialog = new AlertDialog.Builder(this) |
|
|
|
.setView(textView) |
|
|
|
.setTitle("修改地址") |
|
|
|
.setPositiveButton("确定", (dialogInterface, i) -> mWebView.loadUrl("http://" + textView.getText().toString())) |
|
|
|
.setSingleChoiceItems(new String[]{"抽样调查", "两清三化"}, 0, (dialog, which) -> { |
|
|
|
mWebView.loadUrl(urls[which]); |
|
|
|
dialog.dismiss(); |
|
|
|
}) |
|
|
|
.create(); |
|
|
|
|
|
|
|
mWebView.loadUrl("http://116.255.135.38:89/homestead/login"); |
|
|
|
mWebView.loadUrl("http://116.255.135.38:86/authenticRight/login"); |
|
|
|
chromeClient = new BaseWebChromeClient(this); |
|
|
|
mWebView.setWebChromeClient(chromeClient); |
|
|
|
|
|
|
|