Hi Gulfam,
In your application no need to catch events for Landscape to
portarite mode
In your application
under res section create 2 folders
1) layout-land
2) layout-port
and place your layout.h_splash in layout-land
and place layout.v_splash in layout-port folders
( delete the folder named layout)
rename both "layout.v_splash", "layout.h_splash" to
"layout_splash"
and use only one statement
setContentView(R. layout_splash)
In this application automatically assigns the layout's ( when you
switch your phone to landscape to portrite vice versa)
On Feb 16, 12:15 pm, Gulfam <[email protected]> wrote:
> Hi all,
>
> I have two splash screens for my android app one for horizontal
> and second for vertical
> and also have two xml layout file like h_splash.xml and second is
> v_splash.
>
> and i want to show these file like this in my code
>
> if(horizontal or event which for horizontal )
> {
> setContentView(R.layout.h_splash)}
>
> else
> {
> setContentView(R.layout.v_splash)
>
> }
>
> issue is this how i can get horizontal and vertical event in my code?
> On the base of that event i want to show my splash.
> i have used also getOrientation()or like this method in my code but
> it give same value on both horizontal and vertical.
> any one can help ragarding this.
>
> Thanks and Regards,
> Gulfam Hassan
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---