You might try to use the follow code from the Java class:
switch (this.getResources().getConfiguration().orientation)
{
case Configuration.ORIENTATION_PORTRAIT:
// Do something here
break;
case Configuration.ORIENTATION_LANDSCAPE:
// Do something here
break;
case Configuration.ORIENTATION_
you should have instead placed the layout files in layout and layout-
land.
I assume that you must be updating the layout in just onCreate and
onConfigurationChanged method. But, you should also check for the
configuration and update it in onResume.
Its better to use the folders if there isnt any
I never find this issue. maybe you could supply more code.
On Oct 7, 8:50 pm, Simon wrote:
> Hi,
>
> I have an activity that I have two layouts defined for: one for
> landscape and one for portrait. So in my layout folder I have
> activity.xml and activity_landscape.xml. When I am switching aro
3 matches
Mail list logo