android-webview

Error while trying to load a URL in webview - android

醉酒当歌 提交于 2020-02-06 15:07:08
问题 The URL, I'm trying to load in a webview in one of my activities shows blank because of an SSL error. I have tried working with the network security configuration XML folder, but I'm not sure I understand what I'm doing. Any help would be greatly appreciated. While debugging, when I load Google.com as the URL in the webview, the page loads fine. Then, when I try to search for the particular site, it's there, but when I click on it I get an SSL error in Android Studio's run log. public class

Is it possible to prevent a webView from refreshing/reloading when we go to another activity and come back to the same activity?

十年热恋 提交于 2020-02-06 08:09:16
问题 Activity A = webView which contains smartchatbot(used for answering simple questions) url. My question is very simple. All i want to achieve is when i go into Activity A and use the smartchatbot. Once i ask few questions to the smartchatbot, and the smartchatbot gives me a link to go to other page/activity. Once i view the page and return back to Activity A which contains the smartchatbot, i want all the previous questions i asked to the smartchatbot to be there. Not only that, even if i

How to make tabs with webview to load from a web address?

懵懂的女人 提交于 2020-02-02 06:05:12
问题 I want to build an application in Android Studio. I have inside tabs: | tab one | tab two | tab three | ...and each tab should load a webview page. For example: tab one should load www.google.com, and tab two should load www.youtube.com, ... How can I build this? 回答1: Here It Is activity_main.xml <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/activity_main" android:layout_width="match_parent" android:layout_height="match_parent" /> MainActivity.java

How to make tabs with webview to load from a web address?

随声附和 提交于 2020-02-02 06:00:19
问题 I want to build an application in Android Studio. I have inside tabs: | tab one | tab two | tab three | ...and each tab should load a webview page. For example: tab one should load www.google.com, and tab two should load www.youtube.com, ... How can I build this? 回答1: Here It Is activity_main.xml <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/activity_main" android:layout_width="match_parent" android:layout_height="match_parent" /> MainActivity.java

Android WebView URL intercept , i want to load only one website and it's pages , and nothing else

你。 提交于 2020-01-30 12:01:02
问题 I have a problem , i'm trying to create an app for my website and i'm using android webview to do that, but since there's external links (ads, backlinks.. etc) in my website , when the user clicks these links , the webview opens the links and my app acts like a browser , i know that's what webview is but i want it to open only links of my website i ovverided the shouldOverrideUrlLoading method and i intercepted the urls and i returned true if the urls are diffrent than my website prefix , but

Android WebView URL intercept , i want to load only one website and it's pages , and nothing else

时光总嘲笑我的痴心妄想 提交于 2020-01-30 11:59:07
问题 I have a problem , i'm trying to create an app for my website and i'm using android webview to do that, but since there's external links (ads, backlinks.. etc) in my website , when the user clicks these links , the webview opens the links and my app acts like a browser , i know that's what webview is but i want it to open only links of my website i ovverided the shouldOverrideUrlLoading method and i intercepted the urls and i returned true if the urls are diffrent than my website prefix , but

Getting “Link text” of the link displayed in WebView

送分小仙女□ 提交于 2020-01-25 09:53:07
问题 I have Android WebView which displays some links as: <a href="http://link1.html">Link1Text</a> <a href="http://link2.html">Link2Text</a> Now I would like to retrieve Link1Text and Link2Text when I long press these links. I have contextMenu implemented in the code and I could successfully get the link urls (http://link1.html, http://link2.html) using HitTestResult getExtra() method but how ccan I get those link texts ? FYI, I require those link texts for implementing "Copy link text" option in

Text Input on android phone is not in view when the keyboard for webview comes up?

百般思念 提交于 2020-01-24 14:19:21
问题 I have a webview on an android phone that is a registration form and it contains some fields such as first name, last name, user name, password, etc... When focus on the first name input field for example, the keyboard pops up, but the input goes out of view, it still has focus though. Is there a way to keep it in view or is this a bug? 回答1: This seems to be a problem common to Android applications. The application does not scroll the view such that the input field under focus is visible when

Text Input on android phone is not in view when the keyboard for webview comes up?

放肆的年华 提交于 2020-01-24 14:19:09
问题 I have a webview on an android phone that is a registration form and it contains some fields such as first name, last name, user name, password, etc... When focus on the first name input field for example, the keyboard pops up, but the input goes out of view, it still has focus though. Is there a way to keep it in view or is this a bug? 回答1: This seems to be a problem common to Android applications. The application does not scroll the view such that the input field under focus is visible when

findViewById returns null for WebView

谁说胖子不能爱 提交于 2020-01-24 07:23:07
问题 I'm trying to build an android app, which just consists of a webview. I took the example from android dev site and modified it. But as simple as it looks, every call to findViewById results in a null pointer. The .java file: public class MainActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); WebView webView = (WebView) findViewById(R.id.webview); // returns null pointer webView.loadUrl("file:///android_asset/index