How does a RemoteView get drawn

by » Wed, 29 Apr 2009 01:07:53 GMT

Sponsored Links

" * A class that describes a view hierarchy that can be displayed in
another process."

But unlike View class, RemoteView does not have a 'draw(Canvas
canvas)' method.
Can you please tell me which method of RemoteView causing its layout
to be drawn on screen?

Thank you.


How does a RemoteView get drawn

by Romain Guy » Wed, 29 Apr 2009 01:11:55 GMT

 RemoteViews are still drawn like regular views (they are in fact
regular views.) You just cannot create custom RemoteViews or override
their draw/layout methods.

On Mon, Apr 27, 2009 at 10:33 PM,

Romain Guy
Android framework engineer

Note: please don't send private questions to me, as I don't have time
to provide private support.  All such questions should be posted on
public forums, where I and others can see and answer them


Sponsored Links

Other Threads

1. applying style to textview


I am trying to apply common style to different textview that can be
either defined in a layout xml file or programmatically and that does
not seem to work for some attributes:
My style in styles.xml is:

    <style name="ListName">
        <item name="android:colorForeground">#f0f</item>
        <item name="android:padding">4sp</item>
        <item name="android:textSize">30sp</item>
        <item name="android:textColor">#CCC</item>
        <item name="android:gravity">left</item>
        <item name="android:typeface">serif</item>
        <item name="android:textStyle">bold</item>
        <item name="android:colorBackground">#999</item>

In my layout xml i have <TextView style="@style/ListName" ...></
and in my activity java class i have:

    TextView nametv = new TextView(this,null,;

However some parameters does not seem to work very well:
- textStyle to bolditalic does not seems to be recognized
- textColor/colorForeground/colorBackground does not work at all

I have been through the documentation, but could not find precise
reference documentation for that attributes, nor sample for the color

Thanks for any help.

2. getting Current Application Context


Is there a way to get current executing context in normal Java class.

Scenario is - Browser plugin can't get context of browser/webkit, but
JNI can be used to access Java classes. So I can do find class but
most of APIs need Context to execute which I can't figure out how to

I feel "this", "getApplicationContext", "object.this" won't work
( again no context).

in addition application_context provided in  "NPError NP_Initialize
(NPNetscapeFuncs* browserFuncs, NPPluginFuncs* pluginFuncs, void
*java_env, void *application_context)" is not as
android.content.Context.  As application_context is jobject of type
Plugin. in pluginpackageAndroid.cpp :


m_pluginObject = (plugin.Java class) jobject.

All this definitely makes adding scriptable plugin to access Java
Classes, impossible if Java Class needs Context.

Please help if you think of something,


3. activity animation

4. Lock_layer timed out

5. JmDNS/zeroconf/Bonjour with Android SDK 2.0

6. touchscreen: getPressure and getSize should change as finger drags, yes?

7. Can't play any video on android 2.0 (AOSP)