21

I tried this. Could not find configChanges in manifest file. Anyways, how to disable rotation of screen(to landscape mode)?

    <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.joericharduz.akita"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk
        android:minSdkVersion="8"
        android:targetSdkVersion="17" />

    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:name="com.joericharduz.akita.MainActivity"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>

</manifest>
Community
  • 1
  • 1
Joe Rakhimov
  • 4,713
  • 9
  • 51
  • 109

2 Answers2

55

Just as kalyanpvs has said, the configChanges are under activity:

<application
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name" 
    android:theme="@style/AppTheme">
    <activity
        android:name="com.neundorfer.microraphandheld.v1.ParentActivity"
        android:label="@string/app_name" 
        android:screenOrientation="portrait">
TronicZomB
  • 8,667
  • 7
  • 35
  • 50
10

Just add android:screenOrientation="portrait" to your Manifest. Easiest way to do it (inside your Activity tags).

whitfin
  • 4,539
  • 6
  • 39
  • 67