<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://www.newlc.com" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>NewLC - How to detect the orientation of device? - Comments</title>
 <link>http://www.newlc.com/en/topic-17349</link>
 <description>Comments for &quot;How to detect the orientation of device?&quot;</description>
 <language>en</language>
<item>
 <title>Re: How to detect the orientation of device?</title>
 <link>http://www.newlc.com/en/topic-17349#comment-36890</link>
 <description>&lt;div class=&quot;smf-content&quot;&gt;hi, try this&lt;br /&gt;&lt;br /&gt;CWsScreenDevice&amp;amp; iScreen = *(iCoeEnv-&amp;gt;ScreenDevice());&lt;br /&gt;&lt;br /&gt;TSize res = iScreen.SizeInPixels();&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //&amp;quot;res&amp;quot; now cintent the actual resolution.....&lt;br /&gt;&lt;br /&gt;TSize visuale1(176,208);&lt;br /&gt;&amp;nbsp; &amp;nbsp; TSize visuale2(208,176);&lt;br /&gt;&amp;nbsp; &amp;nbsp; TSize visuale3(240,320);&lt;br /&gt;&amp;nbsp; &amp;nbsp; TSize visuale4(320,240);&lt;br /&gt;&amp;nbsp; &amp;nbsp; TSize visuale5(352,416);&lt;br /&gt;&amp;nbsp; &amp;nbsp; TSize visuale6(416,352);&lt;br /&gt;if (res == visuale1)&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// add code...............&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;:&lt;br /&gt;: ecc;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;</description>
 <pubDate>Thu, 08 Mar 2007 18:13:05 +0100</pubDate>
 <dc:creator>stenII</dc:creator>
 <guid isPermaLink="false">comment 36890 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: How to detect the orientation of device?</title>
 <link>http://www.newlc.com/en/topic-17349#comment-36889</link>
 <description>&lt;div class=&quot;smf-content&quot;&gt;Hi,&lt;br /&gt;I had a similar problem. To get over it I did the following..&lt;br /&gt;&lt;br /&gt;HandleResourceChangeL(TInt aType)&lt;br /&gt;{&lt;br /&gt; CAknAppUi::HandleResourceChangeL( aType );&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; if ( aType==KEikDynamicLayoutVariantSwitch )&lt;br /&gt;&amp;nbsp; &amp;nbsp; {...}&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;However I could not reliablytell the current orientation so I used the function&lt;br /&gt;TSize size; AknLayoutUtils::LayoutMetricsSize(AknLayoutUtils::EScreen, size);&lt;br /&gt;&lt;br /&gt;In general on most devices that I know of the width in portrait is always less than landscape and the height is always greater than landscape. In this fashion you can determine the layout.&lt;br /&gt;Brian&lt;/div&gt;</description>
 <pubDate>Wed, 17 Jan 2007 14:05:45 +0100</pubDate>
 <dc:creator>brian.egan</dc:creator>
 <guid isPermaLink="false">comment 36889 at http://www.newlc.com</guid>
</item>
<item>
 <title>How to detect the orientation of device?</title>
 <link>http://www.newlc.com/en/topic-17349</link>
 <description>&lt;div class=&quot;smf-content&quot;&gt;&lt;/div&gt;&lt;p&gt;&lt;a href=&quot;http://www.newlc.com/en/topic-17349&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <comments>http://www.newlc.com/en/topic-17349#comments</comments>
 <category domain="http://www.newlc.com/en/forums/user-interface">User Interface</category>
 <pubDate>Tue, 16 Jan 2007 14:54:37 +0100</pubDate>
 <dc:creator>dipakbaviskar2003</dc:creator>
 <guid isPermaLink="false">16887 at http://www.newlc.com</guid>
</item>
</channel>
</rss>
