Re: [android-developers] Re: HoneyComb isHardwareAccelerated() always returns false

2011-12-27 Thread Atul Raut
Hi Dianee,

isHardwareAccelerated

This always returns false, as per code Canvas.java
How it make decision to return false or true depending on hardware ?

Thanks,

--
Atul Raut
http://rautatul.weebly.com/
http://atulraut.wordpress.com/ http://rautatul.wordpress.com/
atulrau...@gmail.com hack...@android.com

hack...@android.com


On Wed, Apr 6, 2011 at 12:34 PM, Dianne Hackborn hack...@android.comwrote:

 Hm, the background bitmap is shown basically based on whether
 View.isHardwareAccelerated() returns true.  The only time they can be
 different is when the view hierarchy is running in a process which has
 turned off hardware acceleration, which basically only happens as a special
 case in the system process so not something your application code will ever
 see.

 BouncingBalls is not a good example, because that one actually turns off
 hardware acceleration (look at the activity declaration in the manifest).

 Oh and you need to make sure you don't call this until *after* a view is
 attached to its window.  That is, after View.onAttachedToWindow().  Prior
 to that it doesn't have a surface any context for what it will be running
 in, so it can't return anything useful.  In other words if you are just
 calling this from Activity.onCreate(), that is too soon to actually get a
 good value.

 On Tue, Apr 5, 2011 at 1:31 AM, Shai levys...@gmail.com wrote:

 Same results with ApiDemos!

 I created a new sample project (ApiDemos) using ADT with API level 11
 as the target and I tried the following:
 I DO get the patterned blue background in the main screen (seems like
 hardware acceleration is working).

 In ApiDemos.Java:
 - In the OnCreate I added a log print for
 getListView().isHardwareAccelerated() and was False

 - In BouncingBalls.Java near the end of the onCreate I added a log
 print :

MyAnimationView v =new MyAnimationView(this);
container.addView(v);
Log.e(Test, Result: + v.isHardwareAccelerated());

 It was also false

 - In BouncingBalls.Java at MyAnimationView.onDraw(Canvas canvas)
 Log.e(Test, Canvas is: + canvas.isHardwareAccelerated());

 It was also false


 Can someone clear this out for me ?
 Is hardware acceleration off ?
 Is this a bug in the isHardwareAccelerated() function or am I doing
 something wrong ?

 Best Regards,
 Shai Levy

 On Apr 4, 9:58 pm, Dianne Hackborn hack...@android.com wrote:
  API demos is hardware accelerated.  Try putting the call in one of the
  simple samples there and see what it does.
 
  Fwiw, if you are using the default dark theme, if your window is
 hardware
  accelerated than you will get the patterned blue background.  If it is
  drawing in software you will get the solid black background.
 
 
 
 
 
 
 
 
 
  On Mon, Apr 4, 2011 at 10:53 AM, Shai levys...@gmail.com wrote:
   Hi,
 
   I am trying to turn on hardware acceleration for my HoneyComb
 application
   but I never seem to get a 'true' result from this function.
 
   I tried all the methods in the Android Developers blog post about the
   subject (
  http://android-developers.blogspot.com/2011/03/android-30-hardware-ac.
 ..
   ).
 
   I am working on a completely blank project (ADT generated project), I
 added
   the  tag  android:hardwareAccelerated=true  to both the application
 and
   activity and even called
   getWindow().setFlags(
   WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED,
   WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED);
 
   before calling setContentView()
 
   My view only has the TextView that was automatically generated from
 the ADT
   new project wizard.
 
   Yet, no matter what I do, when I call isHardwareAccelerated() on the
   textview or the root view or any canvas I try to obtain - the function
   isHardwareAccelerated() of the view/canvas always returns false.
 
   I am testing on a Motorola Xoom device with Android 3.0.1
 
   What am I missing here ?
 
   Best Regards,
   Shai
 
--
   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
 
  --
  Dianne Hackborn
  Android framework engineer
  hack...@android.com
 
  Note: please don't send private questions to me, as I don't have time to
  provide private support, and so won't reply to such e-mails.  All such
  questions should be posted on public forums, where I and others can see
 and
  answer them.

 --
 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 

[android-developers] Re: HoneyComb isHardwareAccelerated() always returns false

2011-04-06 Thread Shai
I'm really sorry for popping this again so quick without any new info,
I really need more info on this.

Shai Levy

On Apr 5, 11:31 am, Shai levys...@gmail.com wrote:
 Same results with ApiDemos!

 I created a new sample project (ApiDemos) using ADT with API level 11
 as the target and I tried the following:
 I DO get the patterned blue background in the main screen (seems like
 hardware acceleration is working).

 In ApiDemos.Java:
 - In the OnCreate I added a log print for
 getListView().isHardwareAccelerated() and was False

 - In BouncingBalls.Java near the end of the onCreate I added a log
 print :

         MyAnimationView v =new MyAnimationView(this);
         container.addView(v);
         Log.e(Test, Result: + v.isHardwareAccelerated());

 It was also false

 - In BouncingBalls.Java at MyAnimationView.onDraw(Canvas canvas)
 Log.e(Test, Canvas is: + canvas.isHardwareAccelerated());

 It was also false

 Can someone clear this out for me ?
 Is hardware acceleration off ?
 Is this a bug in the isHardwareAccelerated() function or am I doing
 something wrong ?

 Best Regards,
 Shai Levy

 On Apr 4, 9:58 pm, Dianne Hackborn hack...@android.com wrote:







  API demos is hardware accelerated.  Try putting the call in one of the
  simple samples there and see what it does.

  Fwiw, if you are using the default dark theme, if your window is hardware
  accelerated than you will get the patterned blue background.  If it is
  drawing in software you will get the solid black background.

  On Mon, Apr 4, 2011 at 10:53 AM, Shai levys...@gmail.com wrote:
   Hi,

   I am trying to turn on hardware acceleration for my HoneyComb application
   but I never seem to get a 'true' result from this function.

   I tried all the methods in the Android Developers blog post about the
   subject (
  http://android-developers.blogspot.com/2011/03/android-30-hardware-ac...
   ).

   I am working on a completely blank project (ADT generated project), I 
   added
   the  tag  android:hardwareAccelerated=true  to both the application and
   activity and even called
           getWindow().setFlags(
                   WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED,
                   WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED);

   before calling setContentView()

   My view only has the TextView that was automatically generated from the 
   ADT
   new project wizard.

   Yet, no matter what I do, when I call isHardwareAccelerated() on the
   textview or the root view or any canvas I try to obtain - the function
   isHardwareAccelerated() of the view/canvas always returns false.

   I am testing on a Motorola Xoom device with Android 3.0.1

   What am I missing here ?

   Best Regards,
   Shai

    --
   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

  --
  Dianne Hackborn
  Android framework engineer
  hack...@android.com

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

-- 
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


[android-developers] Re: HoneyComb isHardwareAccelerated() always returns false

2011-04-06 Thread Zsolt Vasvari
Are you using the emulator or a real Xoom?

I'd assume the emulator wouldn't support hardware acceleration.

On Apr 6, 2:03 pm, Shai levys...@gmail.com wrote:
 I'm really sorry for popping this again so quick without any new info,
 I really need more info on this.

 Shai Levy

 On Apr 5, 11:31 am, Shai levys...@gmail.com wrote:



  Same results with ApiDemos!

  I created a new sample project (ApiDemos) using ADT with API level 11
  as the target and I tried the following:
  I DO get the patterned blue background in the main screen (seems like
  hardware acceleration is working).

  In ApiDemos.Java:
  - In the OnCreate I added a log print for
  getListView().isHardwareAccelerated() and was False

  - In BouncingBalls.Java near the end of the onCreate I added a log
  print :

          MyAnimationView v =new MyAnimationView(this);
          container.addView(v);
          Log.e(Test, Result: + v.isHardwareAccelerated());

  It was also false

  - In BouncingBalls.Java at MyAnimationView.onDraw(Canvas canvas)
  Log.e(Test, Canvas is: + canvas.isHardwareAccelerated());

  It was also false

  Can someone clear this out for me ?
  Is hardware acceleration off ?
  Is this a bug in the isHardwareAccelerated() function or am I doing
  something wrong ?

  Best Regards,
  Shai Levy

  On Apr 4, 9:58 pm, Dianne Hackborn hack...@android.com wrote:

   API demos is hardware accelerated.  Try putting the call in one of the
   simple samples there and see what it does.

   Fwiw, if you are using the default dark theme, if your window is hardware
   accelerated than you will get the patterned blue background.  If it is
   drawing in software you will get the solid black background.

   On Mon, Apr 4, 2011 at 10:53 AM, Shai levys...@gmail.com wrote:
Hi,

I am trying to turn on hardware acceleration for my HoneyComb 
application
but I never seem to get a 'true' result from this function.

I tried all the methods in the Android Developers blog post about the
subject (
   http://android-developers.blogspot.com/2011/03/android-30-hardware-ac...
).

I am working on a completely blank project (ADT generated project), I 
added
the  tag  android:hardwareAccelerated=true  to both the application 
and
activity and even called
        getWindow().setFlags(
                WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED,
                WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED);

before calling setContentView()

My view only has the TextView that was automatically generated from the 
ADT
new project wizard.

Yet, no matter what I do, when I call isHardwareAccelerated() on the
textview or the root view or any canvas I try to obtain - the function
isHardwareAccelerated() of the view/canvas always returns false.

I am testing on a Motorola Xoom device with Android 3.0.1

What am I missing here ?

Best Regards,
Shai

 --
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

   --
   Dianne Hackborn
   Android framework engineer
   hack...@android.com

   Note: please don't send private questions to me, as I don't have time to
   provide private support, and so won't reply to such e-mails.  All such
   questions should be posted on public forums, where I and others can see 
   and
   answer them.- Hide quoted text -

 - Show quoted text -

-- 
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


[android-developers] Re: HoneyComb isHardwareAccelerated() always returns false

2011-04-06 Thread Zsolt Vasvari
Sorry, I just read your first post that you are, in fact, using the
Xoom.  Then I have no idea.

On Apr 6, 2:03 pm, Shai levys...@gmail.com wrote:
 I'm really sorry for popping this again so quick without any new info,
 I really need more info on this.

 Shai Levy

 On Apr 5, 11:31 am, Shai levys...@gmail.com wrote:



  Same results with ApiDemos!

  I created a new sample project (ApiDemos) using ADT with API level 11
  as the target and I tried the following:
  I DO get the patterned blue background in the main screen (seems like
  hardware acceleration is working).

  In ApiDemos.Java:
  - In the OnCreate I added a log print for
  getListView().isHardwareAccelerated() and was False

  - In BouncingBalls.Java near the end of the onCreate I added a log
  print :

          MyAnimationView v =new MyAnimationView(this);
          container.addView(v);
          Log.e(Test, Result: + v.isHardwareAccelerated());

  It was also false

  - In BouncingBalls.Java at MyAnimationView.onDraw(Canvas canvas)
  Log.e(Test, Canvas is: + canvas.isHardwareAccelerated());

  It was also false

  Can someone clear this out for me ?
  Is hardware acceleration off ?
  Is this a bug in the isHardwareAccelerated() function or am I doing
  something wrong ?

  Best Regards,
  Shai Levy

  On Apr 4, 9:58 pm, Dianne Hackborn hack...@android.com wrote:

   API demos is hardware accelerated.  Try putting the call in one of the
   simple samples there and see what it does.

   Fwiw, if you are using the default dark theme, if your window is hardware
   accelerated than you will get the patterned blue background.  If it is
   drawing in software you will get the solid black background.

   On Mon, Apr 4, 2011 at 10:53 AM, Shai levys...@gmail.com wrote:
Hi,

I am trying to turn on hardware acceleration for my HoneyComb 
application
but I never seem to get a 'true' result from this function.

I tried all the methods in the Android Developers blog post about the
subject (
   http://android-developers.blogspot.com/2011/03/android-30-hardware-ac...
).

I am working on a completely blank project (ADT generated project), I 
added
the  tag  android:hardwareAccelerated=true  to both the application 
and
activity and even called
        getWindow().setFlags(
                WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED,
                WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED);

before calling setContentView()

My view only has the TextView that was automatically generated from the 
ADT
new project wizard.

Yet, no matter what I do, when I call isHardwareAccelerated() on the
textview or the root view or any canvas I try to obtain - the function
isHardwareAccelerated() of the view/canvas always returns false.

I am testing on a Motorola Xoom device with Android 3.0.1

What am I missing here ?

Best Regards,
Shai

 --
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

   --
   Dianne Hackborn
   Android framework engineer
   hack...@android.com

   Note: please don't send private questions to me, as I don't have time to
   provide private support, and so won't reply to such e-mails.  All such
   questions should be posted on public forums, where I and others can see 
   and
   answer them.- Hide quoted text -

 - Show quoted text -

-- 
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


[android-developers] Re: HoneyComb isHardwareAccelerated() always returns false

2011-04-06 Thread Shai
Yes, I have on my desk 2 Xoom devices near me that are currently
useless until I figure this out
(I wish Google had some kind of official support)


On Apr 6, 9:39 am, Zsolt Vasvari zvasv...@gmail.com wrote:
 Sorry, I just read your first post that you are, in fact, using the
 Xoom.  Then I have no idea.

 On Apr 6, 2:03 pm, Shai levys...@gmail.com wrote:







  I'm really sorry for popping this again so quick without any new info,
  I really need more info on this.

  Shai Levy

  On Apr 5, 11:31 am, Shai levys...@gmail.com wrote:

   Same results with ApiDemos!

   I created a new sample project (ApiDemos) using ADT with API level 11
   as the target and I tried the following:
   I DO get the patterned blue background in the main screen (seems like
   hardware acceleration is working).

   In ApiDemos.Java:
   - In the OnCreate I added a log print for
   getListView().isHardwareAccelerated() and was False

   - In BouncingBalls.Java near the end of the onCreate I added a log
   print :

           MyAnimationView v =new MyAnimationView(this);
           container.addView(v);
           Log.e(Test, Result: + v.isHardwareAccelerated());

   It was also false

   - In BouncingBalls.Java at MyAnimationView.onDraw(Canvas canvas)
   Log.e(Test, Canvas is: + canvas.isHardwareAccelerated());

   It was also false

   Can someone clear this out for me ?
   Is hardware acceleration off ?
   Is this a bug in the isHardwareAccelerated() function or am I doing
   something wrong ?

   Best Regards,
   Shai Levy

   On Apr 4, 9:58 pm, Dianne Hackborn hack...@android.com wrote:

API demos is hardware accelerated.  Try putting the call in one of the
simple samples there and see what it does.

Fwiw, if you are using the default dark theme, if your window is 
hardware
accelerated than you will get the patterned blue background.  If it is
drawing in software you will get the solid black background.

On Mon, Apr 4, 2011 at 10:53 AM, Shai levys...@gmail.com wrote:
 Hi,

 I am trying to turn on hardware acceleration for my HoneyComb 
 application
 but I never seem to get a 'true' result from this function.

 I tried all the methods in the Android Developers blog post about the
 subject (
http://android-developers.blogspot.com/2011/03/android-30-hardware-ac...
 ).

 I am working on a completely blank project (ADT generated project), I 
 added
 the  tag  android:hardwareAccelerated=true  to both the application 
 and
 activity and even called
         getWindow().setFlags(
                 WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED,
                 WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED);

 before calling setContentView()

 My view only has the TextView that was automatically generated from 
 the ADT
 new project wizard.

 Yet, no matter what I do, when I call isHardwareAccelerated() on the
 textview or the root view or any canvas I try to obtain - the function
 isHardwareAccelerated() of the view/canvas always returns false.

 I am testing on a Motorola Xoom device with Android 3.0.1

 What am I missing here ?

 Best Regards,
 Shai

  --
 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

--
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see 
and
answer them.- Hide quoted text -

  - Show quoted text -

-- 
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


[android-developers] Re: HoneyComb isHardwareAccelerated() always returns false

2011-04-06 Thread Zsolt Vasvari
If you think there is a bug, open one on http://b.android.com (but
check if it hasn't been reported yet.)  Put Xoom, Honeycomb and 3.0 in
the title.  You will NOT get a response, but you will get a pair of
eyes to look at it in all likelihood.

On Apr 6, 2:52 pm, Shai levys...@gmail.com wrote:
 Yes, I have on my desk 2 Xoom devices near me that are currently
 useless until I figure this out
 (I wish Google had some kind of official support)

 On Apr 6, 9:39 am, Zsolt Vasvari zvasv...@gmail.com wrote:



  Sorry, I just read your first post that you are, in fact, using the
  Xoom.  Then I have no idea.

  On Apr 6, 2:03 pm, Shai levys...@gmail.com wrote:

   I'm really sorry for popping this again so quick without any new info,
   I really need more info on this.

   Shai Levy

   On Apr 5, 11:31 am, Shai levys...@gmail.com wrote:

Same results with ApiDemos!

I created a new sample project (ApiDemos) using ADT with API level 11
as the target and I tried the following:
I DO get the patterned blue background in the main screen (seems like
hardware acceleration is working).

In ApiDemos.Java:
- In the OnCreate I added a log print for
getListView().isHardwareAccelerated() and was False

- In BouncingBalls.Java near the end of the onCreate I added a log
print :

        MyAnimationView v =new MyAnimationView(this);
        container.addView(v);
        Log.e(Test, Result: + v.isHardwareAccelerated());

It was also false

- In BouncingBalls.Java at MyAnimationView.onDraw(Canvas canvas)
Log.e(Test, Canvas is: + canvas.isHardwareAccelerated());

It was also false

Can someone clear this out for me ?
Is hardware acceleration off ?
Is this a bug in the isHardwareAccelerated() function or am I doing
something wrong ?

Best Regards,
Shai Levy

On Apr 4, 9:58 pm, Dianne Hackborn hack...@android.com wrote:

 API demos is hardware accelerated.  Try putting the call in one of the
 simple samples there and see what it does.

 Fwiw, if you are using the default dark theme, if your window is 
 hardware
 accelerated than you will get the patterned blue background.  If it is
 drawing in software you will get the solid black background.

 On Mon, Apr 4, 2011 at 10:53 AM, Shai levys...@gmail.com wrote:
  Hi,

  I am trying to turn on hardware acceleration for my HoneyComb 
  application
  but I never seem to get a 'true' result from this function.

  I tried all the methods in the Android Developers blog post about 
  the
  subject (
 http://android-developers.blogspot.com/2011/03/android-30-hardware-ac...
  ).

  I am working on a completely blank project (ADT generated project), 
  I added
  the  tag  android:hardwareAccelerated=true  to both the 
  application and
  activity and even called
          getWindow().setFlags(
                  
  WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED,
                  
  WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED);

  before calling setContentView()

  My view only has the TextView that was automatically generated from 
  the ADT
  new project wizard.

  Yet, no matter what I do, when I call isHardwareAccelerated() on the
  textview or the root view or any canvas I try to obtain - the 
  function
  isHardwareAccelerated() of the view/canvas always returns false.

  I am testing on a Motorola Xoom device with Android 3.0.1

  What am I missing here ?

  Best Regards,
  Shai

   --
  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

 --
 Dianne Hackborn
 Android framework engineer
 hack...@android.com

 Note: please don't send private questions to me, as I don't have time 
 to
 provide private support, and so won't reply to such e-mails.  All such
 questions should be posted on public forums, where I and others can 
 see and
 answer them.- Hide quoted text -

   - Show quoted text -- Hide quoted text -

 - Show quoted text -

-- 
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


Re: [android-developers] Re: HoneyComb isHardwareAccelerated() always returns false

2011-04-06 Thread Dianne Hackborn
Hm, the background bitmap is shown basically based on whether
View.isHardwareAccelerated() returns true.  The only time they can be
different is when the view hierarchy is running in a process which has
turned off hardware acceleration, which basically only happens as a special
case in the system process so not something your application code will ever
see.

BouncingBalls is not a good example, because that one actually turns off
hardware acceleration (look at the activity declaration in the manifest).

Oh and you need to make sure you don't call this until *after* a view is
attached to its window.  That is, after View.onAttachedToWindow().  Prior to
that it doesn't have a surface any context for what it will be running in,
so it can't return anything useful.  In other words if you are just calling
this from Activity.onCreate(), that is too soon to actually get a good
value.

On Tue, Apr 5, 2011 at 1:31 AM, Shai levys...@gmail.com wrote:

 Same results with ApiDemos!

 I created a new sample project (ApiDemos) using ADT with API level 11
 as the target and I tried the following:
 I DO get the patterned blue background in the main screen (seems like
 hardware acceleration is working).

 In ApiDemos.Java:
 - In the OnCreate I added a log print for
 getListView().isHardwareAccelerated() and was False

 - In BouncingBalls.Java near the end of the onCreate I added a log
 print :

MyAnimationView v =new MyAnimationView(this);
container.addView(v);
Log.e(Test, Result: + v.isHardwareAccelerated());

 It was also false

 - In BouncingBalls.Java at MyAnimationView.onDraw(Canvas canvas)
 Log.e(Test, Canvas is: + canvas.isHardwareAccelerated());

 It was also false


 Can someone clear this out for me ?
 Is hardware acceleration off ?
 Is this a bug in the isHardwareAccelerated() function or am I doing
 something wrong ?

 Best Regards,
 Shai Levy

 On Apr 4, 9:58 pm, Dianne Hackborn hack...@android.com wrote:
  API demos is hardware accelerated.  Try putting the call in one of the
  simple samples there and see what it does.
 
  Fwiw, if you are using the default dark theme, if your window is hardware
  accelerated than you will get the patterned blue background.  If it is
  drawing in software you will get the solid black background.
 
 
 
 
 
 
 
 
 
  On Mon, Apr 4, 2011 at 10:53 AM, Shai levys...@gmail.com wrote:
   Hi,
 
   I am trying to turn on hardware acceleration for my HoneyComb
 application
   but I never seem to get a 'true' result from this function.
 
   I tried all the methods in the Android Developers blog post about the
   subject (
  http://android-developers.blogspot.com/2011/03/android-30-hardware-ac.
 ..
   ).
 
   I am working on a completely blank project (ADT generated project), I
 added
   the  tag  android:hardwareAccelerated=true  to both the application
 and
   activity and even called
   getWindow().setFlags(
   WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED,
   WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED);
 
   before calling setContentView()
 
   My view only has the TextView that was automatically generated from the
 ADT
   new project wizard.
 
   Yet, no matter what I do, when I call isHardwareAccelerated() on the
   textview or the root view or any canvas I try to obtain - the function
   isHardwareAccelerated() of the view/canvas always returns false.
 
   I am testing on a Motorola Xoom device with Android 3.0.1
 
   What am I missing here ?
 
   Best Regards,
   Shai
 
--
   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
 
  --
  Dianne Hackborn
  Android framework engineer
  hack...@android.com
 
  Note: please don't send private questions to me, as I don't have time to
  provide private support, and so won't reply to such e-mails.  All such
  questions should be posted on public forums, where I and others can see
 and
  answer them.

 --
 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




-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

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

-- 
You received this message because you are subscribed to the Google

[android-developers] Re: HoneyComb isHardwareAccelerated() always returns false

2011-04-05 Thread Shai
Same results with ApiDemos!

I created a new sample project (ApiDemos) using ADT with API level 11
as the target and I tried the following:
I DO get the patterned blue background in the main screen (seems like
hardware acceleration is working).

In ApiDemos.Java:
- In the OnCreate I added a log print for
getListView().isHardwareAccelerated() and was False

- In BouncingBalls.Java near the end of the onCreate I added a log
print :

MyAnimationView v =new MyAnimationView(this);
container.addView(v);
Log.e(Test, Result: + v.isHardwareAccelerated());

It was also false

- In BouncingBalls.Java at MyAnimationView.onDraw(Canvas canvas)
Log.e(Test, Canvas is: + canvas.isHardwareAccelerated());

It was also false


Can someone clear this out for me ?
Is hardware acceleration off ?
Is this a bug in the isHardwareAccelerated() function or am I doing
something wrong ?

Best Regards,
Shai Levy

On Apr 4, 9:58 pm, Dianne Hackborn hack...@android.com wrote:
 API demos is hardware accelerated.  Try putting the call in one of the
 simple samples there and see what it does.

 Fwiw, if you are using the default dark theme, if your window is hardware
 accelerated than you will get the patterned blue background.  If it is
 drawing in software you will get the solid black background.









 On Mon, Apr 4, 2011 at 10:53 AM, Shai levys...@gmail.com wrote:
  Hi,

  I am trying to turn on hardware acceleration for my HoneyComb application
  but I never seem to get a 'true' result from this function.

  I tried all the methods in the Android Developers blog post about the
  subject (
 http://android-developers.blogspot.com/2011/03/android-30-hardware-ac...
  ).

  I am working on a completely blank project (ADT generated project), I added
  the  tag  android:hardwareAccelerated=true  to both the application and
  activity and even called
          getWindow().setFlags(
                  WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED,
                  WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED);

  before calling setContentView()

  My view only has the TextView that was automatically generated from the ADT
  new project wizard.

  Yet, no matter what I do, when I call isHardwareAccelerated() on the
  textview or the root view or any canvas I try to obtain - the function
  isHardwareAccelerated() of the view/canvas always returns false.

  I am testing on a Motorola Xoom device with Android 3.0.1

  What am I missing here ?

  Best Regards,
  Shai

   --
  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

 --
 Dianne Hackborn
 Android framework engineer
 hack...@android.com

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

-- 
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