Which is why we will all be eagerly watching the bug that Mark filed in 
anticipation :)

Cheers,
Dave Smith
@devunwired

On Wednesday, August 29, 2012 3:24:50 AM UTC-6, Romain Guy (Google) wrote:
>
> Note that using software layers comes at a performance and memory cost.
>
>
> On Tue, Aug 28, 2012 at 4:45 PM, Dave Smith <dasmi...@gmail.com<javascript:>
> > wrote:
>
>> Thesalan -
>>
>> Calling setLayerType() on just the View will work, but you have to do it 
>> on the correct view.  In this case, the issue that doesn't work with 
>> hardware acceleration is the parent ViewGroup clipping its children, so the 
>> PagerContainer in the example is the view that you need to call it on, not 
>> the ViewPager itself.  If you modify PagerContainer.java in the gist like 
>> so:
>>
>>     private void init() {
>>         setClipChildren(false);
>>         setLayerType(View.LAYER_TYPE_SOFTWARE, null);
>>     }
>>
>> You should be able to enable hardware acceleration in your manifest and 
>> the pager code will still work as expected.  I will update the gist example 
>> when I have a spare moment with some discussion, and I have starred the 
>> issue Mark created (you should do the same).
>>
>> Cheers,
>> Dave Smith
>> @devunwired
>>
>
> -- 
> Romain Guy
> Android framework engineer
> roma...@android.com <javascript:>
>
>  

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

Reply via email to