It's something to do with hardware acceleration, changing 
AndroidManifest.xml (see below) to disable it just for the Sensors Activity 
fixes the drawing

        <activity android:name=".os.Sensors" android:label="OS/Sensors" 
 android:hardwareAccelerated="false">

It looks like the hardware accelerated canvas is anti-aliasing the the 
drawing of the 3 dials as they are drawn directly onto the Canvas. The 
dials are drawn based on a 1-unit by 1-unit rectangle and the canvas is 
scaled (before the drawing) by approx 1/3 the screen width (in portrait 
orientation)

     canvas.scale(148, 148)

on my device.



On Friday, June 1, 2012 11:01:20 PM UTC+1, RichardC wrote:
>
> Can replicate what your seeing on 4.0.3.
>
> In code to draw the 3 graphs and sensors:
>   first the 3 line graphs are drawn onto a bitmap which is then drawn onto 
> the canvas
>   then the canvas is then scaled and the 3 dials are drawn directly onto 
> the canvas
>
> If I modify the code to draw the 3 dials onto the bitmap (the same as the 
> 3 line graphs) it all looks fine.
>
> I am continuing to look at this...
>   
>   
>
> On Friday, June 1, 2012 7:26:19 PM UTC+1, greg wrote:
>>
>> Anyone else getting blurred circles in the ApiDemos/OS/Sensors 
>> application? The three circles are supposed to display the current 
>> orientation but appear as blurry clouds in the ApiDemos application built 
>> with SDK level 15 (OS 4.0.4). 
>>
>> I've asked the same question, with screenshots, at 
>> http://stackoverflow.com/questions/10853807/sdk-level-15-apidemos-os-sensors-blurred-image-on-nexus-s-but-not-on-emulator
>>
>> Thanks in advance for checking,
>> Greg
>>
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to