Try setting the flag before calling setContentView(). You should also not
have to do it this way. The best way to enable hardware acceleration is to
set android:hardwareAccelerated="true" on the <application/> tag of your
manifest. You should not do it manually one very activity and/or window
unless you have very good reasons to do so.

On Sat, Nov 26, 2011 at 11:23 AM, New Developer <[email protected]> wrote:

>  my mistake
> I'm meaning the Activity that the intent  calls/starts
>
> public class display extends Activity {
>     @Override
>     public void onCreate(Bundle savedInstanceState) {
>         super.onCreate(savedInstanceState);
>         fName = CURRENT_IMAGE;
>         setContentView(R.layout.image_viewer);
>
>
> getWindow().setFlags(WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED ,
> WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED);
>
>         parent = (FrameLayout) findViewById(R.id.image);
>         parent.setLayerType(View.LAYER_TYPE_HARDWARE, null);
> Log.e("display", "parent      is  " + parent.isHardwareAccelerated());
>         video  = (VideoView) findViewById(R.id.video);
> Log.e("display", "1) video    is  " + video.isHardwareAccelerated());
>
> both parent and video  return  FALSE ,  How do I get them too return true ?
> I'm under the impression getWindow  and  setLayerType   would do it
>
> Thanks in advance
>
>
>
>
> On 11/26/2011 01:57 PM, New Developer wrote:
>
> Using Intent
>
>     Intent intent = new Intent();
>     intent.setClass(getApplicationContext(),  display.class);
>     startActivity(intent);
>
> The activity is hardware accelerated.  When I call this intent
> the layout is   NOT   hardware accelerated
> How can I create  an intent  that  is Also hardware accelerated ?
>
> Thanks in advance
>
>
>
> --
> 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
>
>
>  --
> 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
>



-- 
Romain Guy
Android framework engineer
[email protected]

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