WebView/Browser Viewport Size

by Miguel Paraz » Fri, 06 Mar 2009 23:56:19 GMT


Sponsored Links
 Hi,
Don't you think it would be useful for the WebView or the browser to
set the viewport size? This is to show the entire html content on a
single page, and disable scrolling.

This could be done as a setting on the WebView object, or through
Javascript or meta tags in the browser app (as it is in the iPhone).

--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. problem in implementing Http 4 classes for sdk1.0

Hey all,
             Can u tell what mehod can be used as a replacement for
getMethod.getResponseBodyAsStream() in line
parser.parse(getMethod.getResponseBodyAsStream(), myContentHandler);
I am not getting parsed file in proper format.
Here is my code:

package com.parsing;

import org.apache.*;
import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;
import java.io.*;
import org.apache.http.HttpResponse;
import org.apache.http.client.*;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.client.methods.HttpGet;
import java.util.ArrayList;
import org.apache.http.HttpEntity;
public class connectionHandler{

    private HttpClient client=null;
    private HttpResponse response ;

    private HttpGet getMethod=null;
    private int statusCode;
    private String contents=null;
    private MyContentHandler myContentHandler = null;
    private SAXParser parser=null;
    HttpEntity entity=null;

    public static String str_err;


    public void getRequest(String reqName,String url){

    try {

      client = new DefaultHttpClient();
      myContentHandler = new MyContentHandler();
      //client.setTimeout(8000);

      getMethod = new HttpGet(url);

     response = client.execute(getMethod);
     System.out.println(response.getStatusLine());
         Http getMethod.getParams();

     entity = response.getEntity();

     if (entity != null)
     {
            InputStream instream = entity.getContent();

            parser = SAXParserFactory.newInstance().newSAXParser();
             parser.parse(instream, myContentHandler);


      }

     else
     {System.out.println("error");}

     }
       catch(Exception e)
       {
           System.out.print(e.getMessage());
       }
    }

    }

//  parser.parse(instream, myContentHandler); line is giving error at
runtime.

--~--~---------~--~----~------------~-------~--~----~

2. Base Adapter View and OnClick Lister

I have extended a BaseAdapter for a listView.

The List View is on the lines of ListAdapter Collapsed ,but instead of the
dialogue box i have a seek bar(which gets enabled and disabled)On the
trigger of the expansion.There is an imagebutton widget which changes to
play/pause.


On the onClicklistern of the imageButtons(I change the image),I observe that
the getView of the Adapter gets called again??(Whats the reason for this)

Also in the list what i am observing is that  only the first row of the
list, i see that the play button changes to pause.(i am using the Image
Button).The rest of the rows donot change to the play/pause of the image
button though the media player changes from play to pause and vice versa.  i
am surprised because there no where in my code there is hardcoding,the
action are based on the positions.But only the first row is behaving the way
i want,what could be the pssible reason..

--~--~---------~--~----~------------~-------~--~----~

3. Disable the screen lock?

4. Using Amazons Content Delivery Network for APK distribution

5. What are the capabilities of a Web View?

6. error in opening file in fileexplorer application

7. How to debug(How to set breakpoint) Android source codes in Eclipse