Thanks
I would tend to agree, sadly I already have the android:hardwareAccelerated="true" set in manifest <application android:icon="@drawable/logo" android:hardwareAccelerated="true" android:label="@string/app_name" android:debuggable="true" android:theme="@android:style/Theme.NoTitleBar">

I also have it on both Activities
<activity android:name="MainActivity" android:hardwareAccelerated="true" android:screenOrientation="landscape" android:configChanges="orientation" /> <activity android:name="display" android:hardwareAccelerated="true" android:screenOrientation="landscape" android:configChanges="orientation" />

this I think is what gives the screen  isHardwareAccelerated  as  true

11-26 15:25:54.730: E/main(16712): screen is true <-- from MainActivity just before startActivity is called 11-26 15:25:55.140: E/display(16712): parent is false <-- from display.class showing the parent is now false
11-26 15:25:55.140: E/display(16712): video       is  false

This was after I moved the getWindow before the setContentView() as suggested

        setContentView(R.layout.image_viewer);

        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", "video       is  " + video.isHardwareAccelerated());



Anything else I can try ?

Thanks again
On 11/26/2011 03:02 PM, Romain Guy wrote:
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] <mailto:[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]
    <mailto:[email protected]>
    To unsubscribe from this group, send email to
    [email protected]
    <mailto:[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]
    <mailto:[email protected]>
    To unsubscribe from this group, send email to
    [email protected]
    <mailto:android-developers%[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] <mailto:[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

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