How to remove the WebView top/left 8-pixel inner margin?

by elDoudou » Fri, 10 Apr 2009 21:01:27 GMT


Sponsored Links
 Hello.

After some search, even in the WebView and related classes source
code, I could not find where the built-in 8-pixel inner margin of a
WebView is set. I would like to display a WebView with no inner
margin: is it feasible, please? Or am I missing something and there is
no top and left inner margin inside a WebView?

Thank you for your help and support. Regards,
douard
--~--~---------~--~----~------------~-------~--~----~



How to remove the WebView top/left 8-pixel inner margin?

by elDoudou » Mon, 13 Apr 2009 18:13:08 GMT


 Anyone on this? Do I need to reformulate my question? I know it sounds
cosmetics, but since I need to display a HTML banner, the need for
accuracy is really needed? Android Googlers, your help is very
welcome ;) Regards, douard
--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


How to remove the WebView top/left 8-pixel inner margin?

by elDoudou » Tue, 14 Apr 2009 02:37:31 GMT


 That was my fear, i.e. that the left and top margin be hard-coded deep
down on the C inaccessible layer ;( Thank you for taking the time. By
"accuracy", I mean that I want to control the width of the total
WebView widget, so that it takes exactly 320 pixels and that the
loaded HTML inside the WebView contains a 320-wide pixels image that
should perfectly fit the Android device width of 320 pixels... This
does not seem to be possible because of this built-on margin, except
in a margin can be set negative...
--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. How To Recreate WindowManager$BadTokenException ?

I'm getting a few reports in the Market of my users experiencing a
WindowManager$BadTokenException from an AlertBuilder.Builder.show()
call. (Full stack trace and relevant code below.) I've read what can
cause this to happen but no matter what I try, I can't cause the
exception to be thrown on any of my emulators or my Nexus One.

I've tried hitting the Back and Home buttons just as the dialog is
about to be displayed, changing the phone's orientation, and launching
multiple other apps in an attempt to get my app paused/resumed.

Anyone have any ideas on other actions I can take to try and cause the
exception?

Thanks,
Dave

Stack Trace:

android.view.WindowManager$BadTokenException: Unable to add window --
token android.os.BinderProxy@46042700 is not valid; is your activity
running?
at android.view.ViewRoot.setView(ViewRoot.java:509)
at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:177)
at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:91)
at android.view.Window$LocalWindowManager.addView(Window.java:424)
at android.app.Dialog.show(Dialog.java:241)
at android.app.AlertDialog$Builder.show(AlertDialog.java:802)
at com.hoyski.androidsquares.Squares.showGameOverDialog(Squares.java:
556)
at com.hoyski.androidsquares.Squares.computerMoveOnce(Squares.java:
475)
at com.hoyski.androidsquares.Squares.run(Squares.java:666)
at android.os.Handler.handleCallback(Handler.java:587)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:144)
at android.app.ActivityThread.main(ActivityThread.java:4937)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:868)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
at dalvik.system.NativeStart.main(Native Method)


Relevant Code:

private void showGameOverDialog() {

        AlertDialog.Builder gameOverBldr = new AlertDialog.Builder(this);
        gameOverBldr.setPositiveButton("OK",
                new DialogInterface.OnClickListener() {
                @Override
                public void onClick(DialogInterface dialog, int which) {
                        dialog.cancel();
                }
        });

        String title = "Game Over";
        String msg = "... logic to build message snipped...";

        gameOverBldr.setTitle(title);
        gameOverBldr.setMessage(msg);

        gameOverBldr.show();
}

-- 

2. CVE-2009-1185 and CVE-2010-EASY patches

Hello,

     I am looking for patches for CVE-2009-1185 and CVE-2010-EASY for
Android.  I believe the patches are included in Android 2.2.2 and
later.  Please let me know where I can get the patches and it would be
good to for the pointer for the patches for 2.2 to 2.2.2.  By the way,
I also cannot find a release note for 2.2.2.

Thank you.
-Pandit

-- 
.

3. Spinner like drop-down on button

4. Android boot process deadlock

5. Problem with Mezzofanti ( Android-phone application) :

6. Update : Lelang Moto Q : Bersih2 laci

7. get Notification on specified time.