How do I place an image on top of my existing layout through code?

by idev » Wed, 29 Apr 2009 15:35:01 GMT


Sponsored Links
 Hi

I have a layout in which I am displaying a webview. I want to add
images on top of the webview at specific places through code.

Can some one please tell me how to do that?

The translucent background example in API Demos makes the view cover
the whole screen. I want to place only a small image and at a specific
location (origin not 0,0)

Thanks a lot.
--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Html.fromHtml in 1.5 strips out line Separator's

This looks like a bug to me.  Under SDK 1.5 this code:

        String lineSeparator = System.getProperty
( "line.separator" );
        String testString = "first line"+lineSeparator+"second line";
        Log.i("helloworld15","testString.indexOf(lineSeparator))
"+testString.indexOf(lineSeparator));
        Spanned spanned = Html.fromHtml(testString);
        Log.i("helloworld15","spanned.toString().indexOf
(lineSeparator)) "+spanned.toString().indexOf(lineSeparator));

ouputs:

06-02 21:57:46.255: INFO/helloworld15(1210): testString.indexOf
(lineSeparator)) 10
06-02 21:57:46.284: INFO/helloworld15(1210): spanned.toString().indexOf
(lineSeparator)) -1


Under SDK 1.1 it output:

06-02 21:58:38.176: INFO/helloworld15(471): testString.indexOf
(lineSeparator)) 10
06-02 21:58:38.715: INFO/helloworld15(471): spanned.toString().indexOf
(lineSeparator)) 10

So it appears that as of SDK 1.5 Html.fromHtml is stripping out
lineSeparators.

This is also true for the method:

fromHtml(String source, Html.ImageGetter imageGetter, Html.TagHandler
tagHandler)

for reference here is the Android Html class:
http://developer.android.com/reference/android/text/Html.html
--~--~---------~--~----~------------~-------~--~----~

2. Key down events on answer and end call not working anymore in cupcake

On the 1.1 platform, we were successfully getting callbacks for the
overridden method nKeyDown(int keyCode, KeyEvent event)of an
Activity
particularly in an In-Call situation. And we were able to handle the
eyCode == KeyEvent.KEYCODE_CALLcase when the call is accepted or
eyCode == KeyEvent.KEYCODE_ENDCALLcase when the call is rejected
with a key press.

On the 1.5 platform we are finding that there is no call back made
through the overridden method nKeyDown(int keyCode, KeyEvent event)of an
Activity in the same In-Call situation for either of KEYCODE_CALL or
KEYCODE_ENDCALL.

Has anyone else run into this?

Google,
Is this a bug in 1.5 or is it an intentional fix or de-support of
something Google considers as "should never have worked"?
Is there any alternative way of handling onKeyDown specifically on the
1.5 platform?

Thanks
Jay
--~--~---------~--~----~------------~-------~--~----~

3. THE NEED FOR HIPAA COMPLAINT MEDICAL BILLING SO...THE NEED FOR HIPAA COMPLAINT MEDICAL BILLING SO...THE NEED FOR HIPAA COMPLAINT MEDICAL BILLING SO...

4. Whole lotta garbage collecting going on.... How do I find out what is being collected?

5. What is the android equvilant of scale(-1, 1), I want to flip an image

6. How to us Cursor::registerContentObserver() and Cursor::registerDataSetObserver()?

7. how to get telephony logs in windows environment?