Dianne, You mentioned checking the android.os.BUILD and setting the orientation to reverse landscape only if it meet or exceeds api level 9. I assume I would do this in onCreate. If I do do this, there are no animations to a new Activity (the slide in), only animations when ending the new activity. How can I correct this?
FYI, I'm testing on a Nexus One with 2.3.6 Thanks S On Wed, Sep 28, 2011 at 12:10 PM, Stefan Alder <[email protected]> wrote: > I found this thread, which seems related, but the result is a blank > screen. Does anyone know if this should still work? and will it apply > to all children views? > > http://groups.google.com/group/android-developers/browse_thread/thread/b4edcc487c1f28d7 > > private static class FlipLayout extends FrameLayout { > private Matrix mForward = new Matrix(); > private Matrix mReverse = new Matrix(); > private float[] mTemp = new float[2]; > > > public FlipLayout(Context context) { > super(context); > mForward.postRotate(180); > mForward.invert(mReverse); > } > > @Override > protected void dispatchDraw(Canvas canvas) { > canvas.save(); > canvas.setMatrix(mForward); > super.dispatchDraw(canvas); > canvas.restore(); > } > > //@Override > public boolean dispatchTouchEvent(MotionEvent event) { > final float[] temp = mTemp; > temp[0] = event.getX(); > temp[1] = event.getY(); > > mReverse.mapPoints(temp); > > event.setLocation(temp[0], temp[1]); > return super.dispatchTouchEvent(event); > } > } > > > On Wed, Sep 28, 2011 at 2:05 AM, Stefan Alder <[email protected]> wrote: >> Still looking for a solution to this. Do I need to set the >> screenOrientation to 'landscape' in the manifest and then rotate all >> layouts by 180 degrees? What's the best way to do this? >> Thanks >> >> >> On Tue, Sep 27, 2011 at 3:54 PM, Stefan Alder <[email protected]> wrote: >>> Dianne, >>> Thanks for the response. My question is how can I achieve the same >>> effect when running prior to API level 9. >>> >>> On Tue, Sep 27, 2011 at 3:49 PM, Dianne Hackborn <[email protected]> >>> wrote: >>>> You'll need to check the API level at android.os.Build, and only set your >>>> activity to this value when running on API 9 or later. >>>> >>>> On Tue, Sep 27, 2011 at 3:45 PM, Stefan Alder <[email protected]> wrote: >>>>> >>>>> I trying to ensure that my app and all of its activities are locked to >>>>> landscape right (reverse landscape) (where the device button and mic >>>>> located to the left of the screen). I see you can set the >>>>> screnOrientation in the manifest to 'reverseLandscape', but this only >>>>> works for API level 9. >>>>> >>>>> What is the best way to achieve this down to API level 6 or 7 such >>>>> that it will work on all Android devices (portrait and landscape >>>>> default)? >>>>> >>>>> If you can point me to any example where this is done, I'd really >>>>> appreciate it. >>>>> Thanks >>>>> >>>>> -- >>>>> 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 >>>> >>>> >>>> >>>> -- >>>> Dianne Hackborn >>>> Android framework engineer >>>> [email protected] >>>> >>>> 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 [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

