Android WebView will not scroll (Loading an embedded Google Calendar)

I am working on an app for my company. One of the buttons loads a webview of a google calendar. This works pretty well and all of my other webviews scroll appropriately. However when loading this calendar it resizes to the screen size and will not scroll. I tried setting the webview in a linear layout and making the height of the webview 4096px. This extends the calendar beyond the bottom of the screen, however it will not scroll. I am learning android as I go, I have some programming experience back when I was young and all command line.

<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="4096px"> <WebView android:id="@+id/webview" android:layout_width="fill_parent" android:layout_height="1020px"></WebView> </LinearLayout>

The code is

WebView calendar = (WebView) findViewById(R.id.webview); calendar.setBackgroundColor(0); calendar.setScrollBarStyle(3); calendar.getSettings().setJavaScriptEnabled(true); Toast.makeText(getApplicationContext(), "Loading Events Calendar", Toast.LENGTH_SHORT).show(); calendar.loadUrl("http://www.google.com/calendar/embed?src=blahblah%40blah.com&mode=Agenda");

Javascript is enabled for for the webview. Any help would be greatly appreciated.

--------------Solutions-------------

The solution I found to this is to host the calendar on my website. With an embedded width and height defined by the webpage I was able to control the action of the calendar in the webview.

This does not let the calendar, in javascript, resize itself to the screen size, but instead forces a certain perspective. If you make the width of the calendar smaller than the screen size it will fill the width of the screen size. For example if I embed the calendar at a width of 300 it will resize to 480 on my droid. However if you embed the calendar with a width of say 600, it will not resize down.

Hope this helps someone else.

Category:android Time:2010-09-06 Views:0

Related post

  • Any Way to Further Customize Embedded Google Calendar? 2010-05-01

    I'd like to embed a few Google Calendars for my client's web site. The "Google Embeddable Calendar Helper" provides very few customization options. Updating the hex code for the background color in the generated source only works if you pick one of t

  • I need help parsing a PHP array for an embedded Google Calendar 2009-12-02

    I'm not sure I'm headed on the right path but what I want to do is have an embedded Google Calendar with multiple calendars encoded in the iframe source. Example: <iframe src="https://www.google.com/calendar/embed?src=cjvssf4vj98hoa4os5hr26fmcg%40

  • Android webview don't scroll in 2.3 but it work in 3.0 and 4.0 2013-05-27

    I have a problem with a webview. Its load an url similar to this: <html> <head><meta name="viewport" content="width=device-width"/></head> <body> <div id="header"></div> <div id="scrollable-content">

  • How to determine when Android WebView is completely done loading? 2011-04-07

    I want to know how to determine when a WebView is completely done loading. Let me define completely. All redirects have happened The page is visibly displayed, nothing has yet to load Bad answers to this question: WebViewClient.onPageFinished() - thi

  • Android WebView does not scroll into Viewport on form input 2011-10-26

    We having a mobile website with some input forms. When I test it with the default mobile browser on an Samsung Galaxy S II everything works fine. We have build an "app" with just a WebView calling this page. So the behaviour should be the same. But w

  • Android WebView first page not loading on start after destroy 2012-02-08

    I have a WebView and while it loads the page which takes some seconds I want to show something other than a white screen, so I'm loading static data before loading the first page webview.loadDataWithBaseURL("/", wait_html, "text/html", "UTF-8", "");

  • android webview improve html file loading 2012-03-26

    My app has 5 tabs and starts with tab 1 selected. Another tabs contains a webview that loads an html file and takes some seconds to display it. Is there any method to improve webview html file loading? For eg tab 3, webview does not start loading unt

  • Android WebView stopped unexpectly after loading an url 2010-09-16

    i have a big problem and i did not find a solution for my problem. I try to load an url and i use this tutorial: http://developer.android.com/reference/android/webkit/WebView.html My Code: public class HomeView extends Activity { WebView mWebView; pu

  • Android webview script tag not loading source file 2011-05-11

    I'm trying to load a javascript file from a script tag in Webview, but it won't load it! here's the source for the HTML Script tag: <script type="text/javascript" src="file:///android_asset/game/tetris.js"></script> And the java file: Web

  • Android WebView.loadDataWithBaseURL first page load is a mess. How to fix it? 2011-05-19

    I use WebView.loadDataWithBaseURL for loading my help page from internal resources of my application. I have help.html and a few images located in the assets directory. The page loads and shows with images, but the text around image is a mess. It did

  • Android WebView: How to scroll to the end of document? 2011-11-17

    I want to stop scrolling when it reaches the document end. I tried the following code: if (_webView.getScrollY() + _webView.getHeight() > _webView.getContentHeight()) _webView.scrollTo(0, _webView.getContentHeight() - _webView.getHeight()); Howeve

  • How can I create an embedded Google Calendar widget that is logged in as a specified user? 2012-04-10

    I want to use Google Calendar's embed capabilities on a site but I want it to be viewed as if logged in by a specific user (we are using Google Apps for Business). I already know that a proxy service of some sort will have to be created but I'm not s

  • Recurring events in Google Calendar API on Android 2011-07-12

    I have started to use the Google Calendar Api and now I'm ok with the authetication, get the calendar list, rename the calendars, and add event with specified time and title to a selected calendar. I have started to use the model from the calendar-v2

  • Play Youtube HTML5 embedded Video in Android WebView 2011-06-12

    I am having a problem running a HTML5 Youtube embedded in a WebView. I want to play a Youtube video on my application. I decided to use WebView instead of VideoView, because I want to make my system more flexible to play video from web. Although Ther

  • Android webview scrolling doesn't work 2011-07-12

    I'm trying to scroll down to the bottom of the page in a webview, I'm using the webview example google provided in their tutorials. I'm using this line of code to try to scroll but it isn't working. mWebView.pageDown(true); Any suggestions on how to

  • Android/WebView doesn't load javascript gallery images when navigated to 2011-10-05

    I have a website/web app built with jquery mobile that I am trying to package into a webview for android; I am able to load up the pages locally by putting the whole site into the assets folder and loading the url like so: mWebView.loadUrl("file:///a

  • Android webview cannot render youtube video embedded via iframe 2012-01-27

    This is about loading youtube videos using latest embedded format (iframe) inside a webview. Example of the iframe embed format <iframe width="637" height="358" src="http://www.youtube.com/embed/olC42gO-Ln4?fs=1&amp;feature=oembed" frameborder

  • How to prevent a scrollview from scrolling to a webview after data is loaded? 2012-03-23

    So I have a fascinating problem. Despite the fact that I'm not manually or programmatically scrolling my view, my WebView is being automatically scrolled to after the data inside it loads. I've got a fragment in a viewpager. When I first load the pag

  • Android WebView not loading a JavaScript file, but Android Browser loads it fine 2010-06-03

    I'm writing an application which connects to a back office site. The backoffice site contains a whole slew of JavaScript functions, at least 100 times the average site. Unfortunately it does not load them, and causes much of the functionality to not

Copyright (C) pcaskme.com, All Rights Reserved.

processed in 0.370 (s). 13 q(s)