Adding a view between contents inside a Webview - android

I am working on a newsreader app in which we have a Webview to display news details. Can I add an Admob layout between the contents inside this webview?
Basically, it should look like this,
-Webview
-Paragaraph1
-Admob layout
-Paragraph2
-Webview
There should be only one webview and the Admob layout should be inside the webview, placed between content.
I tried with splitting the html content and loading them in multiple webviews inside a Recyclerview. But its affecting the performance a lot.
Any help regarding this would be appreciated.

I think it isn't possible and also it isn't a good practice as you are adding your ads on someone else's data.
And if it is your data you can always change the HTML page

Related

Add content in to the Webview?

Is any way to add the Html contents in to the webview through the Main Xml file.
I have a one problem.I'm new in the android field,I load the contents from the assets file and normally the webview contents visible but when i going to swipe the page ,that contents not visible only containing black page ,after swipe next page visible...
so ,anyone give me the tips how to solve this problem.
advance in Thanks...
Check this.....
https://developers.google.com/chrome/mobile/docs/webview/gettingstarted
how to show the html contents to the webview using android
I think this link can help you: Displaying Android asset files in a WebView?
However, you should give us more information. If you want to view an external URL, you will need to add permisions on the Android Manifest. If that is not your case and your content is local, maybe the problem is inside your Webpage.

Is it possible to show a fixed view of a website in webView

I am planning to add a webView of my website with some tables and feeds on it. Because I have been having such trouble parsing it I wondered is it possible load the part of the website with the table in a fixed view, disabling scroll and any options other than back to the list view.
Any idea's??
Thanks in Advance

handle multiple webview instance in android

I want to load two html pages into two different webviews in android.The first html only going to display. The second html should act as background. The script used in second html page need to run, but it won't display to the user. Let me know this is possible in android..
Thanks
Yes dude it is possible
Add a WebView and set it visibility to View.GONE
Like
WebView webView2=new WebView(this);
webView2.setVisibility(View.GONE);
then
webView2.loadUrl("javascript:MyJSFunction(..)

Android Webview: HTML Content is Overlapping

Html content is overlapping when large content is loading in the web view. Is there a solution
for this problem?
reportView.setBackgroundColor(0);
reportView.getSettings().setBuiltInZoomControls(true);
reportView.setInitialScale(100);
reportView.getSettings().setUseWideViewPort(true);
reportView.clearView();
Try to use:
webSettings.setLayoutAlgorithm(LayoutAlgorithm.TEXT_AUTOSIZING);
in webview settings.
Fixed Html content is overlapping issue, when large content is loading in the web view.
webSettings.setLayoutAlgorithm(LayoutAlgorithm.TEXT_AUTOSIZING);
In addition to the above line, trying to reset webview instances every time
.

Android - Creating own buttons in webview, retrieving certain contents from website into webview

I'm currently doing a application (project) on android. I would like to know how to create my own buttons in webview, or creating a tab bar in webview. Also, I would want to retrieve certain contents from a website (or rather, from livejournal, to be specifc), like, I do not want the buttons that are in livejournal itself, I just want certain contents, maybe like some live journal posts. Is there any way I could do this?
Thank you so much in advance!
Instead of putting tabs in the WebView you should put the WebView in Tabs. As for pulling information from LiveJournal there are two possibilites. They either have a public api that you can access to get the data you want and use that to populate your app or they don't. If they don't your only recourse would be to pull in the raw html and try to parse it. At that point you might was well just use the webpage as is.

Categories

Resources