Tuesday, August 26, 2014

Oracle MAF - Disabling Landscape mode

Recently I had a requirement for disabling landscape orientation.
Frank and Chris suggested me below and it worked for me:

iOS
--------
For iOS on the deployment profile. 
Select Application --> Application Properties --> Deployment --> select iOS profile and and click on edit. Select device orientations. And there you will find option for enabling/disabling portrait/landscape modes for iPhone and iPad.


Android
------------
For Android there is an ER with Oracle.
Your workaround for the moment is to locate the AndroidManifestr.template.xml file in the <jdevhome>/jdeveloper/jdev/extensions/oracle.maf/Android directory and add the following two attributes for all activity tag:
android:screenOrientation="portrait" android:configChanges="orientation"

 example:
    <activity android:screenOrientation="portrait" android:configChanges="orientation" android:name="oracle.adfmf.phonegap.AdfSpringboardPhoneGapActivity" android:theme="@android:style/Theme.NoTitleBar" android:windowSoftInputMode="adjustResize"></activity>

Hope it helps.


Regards,
Deepak

7 comments:

  1. This didn't work for me...

    ReplyDelete
  2. Correcting the post before. This didn't work for me because I've not set a new deployment profile. Now it's working!!

    ReplyDelete
  3. Cám ơn bạn, bài viết hay quá
    Xem thông tin Căn hộ The CBD Quận 2 tại website Bán căn hộ The CBD | Ban can ho The CBD

    ReplyDelete
  4. Cám ơn bạn bài viết hay quá
    Hiện nay chúng tôi sắp mở bán dự án Căn hộ cao cấp Bông Sao Chánh Hưng Quận 8. Chính nơi đây sẽ mang đến cho bạn những tiện ích mà không nơi nào mang lại được. Hơn nữa dự án này lại đi cùng với gói 30.000 tỷ, đi đôi vs thủ tục vay đơn giản. Để biết thêm chi tiết xin liên hệ 0932.699.603 (Mr.Phúc) hoặc vào Xem thông tin Căn hộ Bông Sao quận 8 tại website Bán căn hộ Bông Sao quận 8 | Ban can ho Bong Sao quan 8

    ReplyDelete
  5. I am sure you have a great fan following out there. wordpress templates

    ReplyDelete
  6. there is one page which should be locked for portrait mode and should not be tilted thought device was oriented to landscape.how to restrict this for one single page?

    ReplyDelete