I want to develop html5 application in android.I am taking WebView and loading url (path to html5 which i place in android assets folder)but iam getting scrolling effect.How should i avoid it, where should i place images and css file
For removing horizontal scroll effect just add it
mWebView.getSettings().setLayoutAlgorithm(LayoutAlgorithm.SINGLE_COLUMN);
Related
I am loading an image from external url directly in a WebView. So now i want to center that image. I can't edit the file to add css or js. Is it possible and when it is, how?
Here i have issue with swipe event conflict with html5 page image gallery and webview swipe event in android.
I create an EBookReader app to read .epub files for android. My app have feature of swiping page. I have one .epub file with images, videos and image gallery, image gallery have 5 images on html page and at a time see 1 image, to see another image html page have scrollable image gallery, html page uses iScroll.js and panelnav.js for image gallery.
My ePub file has 10 html pages and my reader page support swipe scroll on page.
I implemented for navigation page using Custom Horizontal Scroller. i display html5 pages on webview and scroll one after another webview on Horizontal scroller pager. my web page swipe perfectly but when html5 page have image gallery with swipe feature, images are swipe but my webview is also swipe. i want to stop my webview swipe when my html page have image gallery with swipe in android.
Please Help.
Thanks in Advance.
Before posting this question I have searched a lot on this, however couldn't find any work around problem.
I have a screen with webview, I have configured webview with following settings:
1.WebPage can't scroll vertically or horizontally ,
2.Removed Zoom-In & Zoom-Out on webview
The HTML file which is displayed in webview has long text & using CSS3 content is devided into multiple columns that only accommodate screen size, displaying only that split content or say partial content from HTML page (not whole HTML page). Now I have to get that split content from webView from Java (Android) & objective-C (iOS) side without screen touch or long press, from CSS3 & JS I am not able to get it.
Is it possible to get visual text / content from webview ?
If anybody have faced such problem or knows any solution please reply it.
I am facing this problem for both Android & iOS app.
Thanks In Advance !
You could loop through the DOM with jquery, and merge the results, appending them to a hidden field.
http://api.jquery.com/each/
Then you could get that field from objective c, like this:
NSString *myFields = [self.webView stringByEvaluatingJavaScriptFromString: #"document.form1.myFields.value"];
For Android, you could try this:
Android - simple user input form web-view to back-end java with jQuery Mobile
I have an Android WebView loaded with a html file(actually stored in some folder under sdcard) that is having one/two/three image(s). Is it possible to drag-drop any one of those images?
If its possible, below are my doubts
When i drag an image from (x1,y1) place and drop it in another (x2,y2)place, How can i change the original source file code as the image place is changed ?
When i open the same html file in next time (using default html viewer or my app), i should see the image in (x2, y2) place. Isn't it possible ?
I tried this drag ImageView inside a WebView. But it is just adding an imageview to webview. (So, when i run the same app next time, i don't see the image in the place where i dropped it in first run.) But i need to drag an image presented in source html file. So After every drag-drop, Do i need to render the webview content and create a new html file to see the image in dropped location?
Is it possible to read the android-webview content? (like we read the web page content in java).
Can anyone clear my doubts and suggest me a better way if iam going/thinking wrong?
I don't think it possible (without using some not trivial tricks) to implement the drag and drop as you wish. for the other point's you raised - if the file is on your sd - why not just parse the html file and get the pictures positions and source link and use it to implement the drag and drop on your own? after all- the html file is an xml file which contains attributes which defines positions/links/images/text
I want to download and load images into Webview as they are downloaded (embedding direct image url's into the HTML is not an option)
When I call the webView.loadData(myData.. the full page is refreshed and the user's app is repositioned to 0,0 - is there a way where I can append to the HTML with the new image as and when it is downloaded? I am looking for a way to override the functionality of resetting the position of the webView on a call to loadData
Thanks
Can you handle the problem in JS side by trigering an event to document when the app has downloaded images ?
Like :
myWebView.loadUrl("javascript:imagesLoaded()");