I want loading site in webview but when using , not showing. I want loading this site web.rubika.ir in webview and send requests. How do I do this? Only this site .
Asked
Active
Viewed 53 times
2 Answers
1
You can use this to load a url in your webView
webView.loadUrl("Your URL Here")
additionally if you want to get notified whether your url is still loading or finished you can have a look at this get notified when webview loaded.
You can show a progress bar while loading url which will help to understand that web view is loading.

WhiteSpidy.
- 1,107
- 1
- 6
- 28
-
I did all that said. But it did not work. I do not know, maybe the site is unique so that it can not be opened with webview. You can do a test and tell me the result. – Md Md Sep 01 '20 at 00:26
0
in layout file (.xml) of this activity, use webview widget
<WebView android:id="@+id/webview" android:layout_width="match_parent" android:layout_height="match_parent"/>
Then in onCreate method of the activity, use webview.
WebView wv; wv = findViewById(R.id.webview); wv.loadUrl("web.rubika.ir");
If you want to enable javascript support
WebSettings webSettings = wv.getSettings(); webSettings.setJavaScriptEnabled(true);
Make sure you have declared Internet permission in manifest.xml
<uses-permission android:name="android.permission.INTERNET" />
then in Application tag of you manifest add this;
<application android:usesCleartextTraffic="true"
6.Done.

dani3264
- 11
- 4
-
Tx @dani3264 .I did all that said. But it did not work. I do not know, maybe the site is unique so that it can not be opened with webview. You can do a test and tell me the result. – Md Md Sep 01 '20 at 00:26