This is my manifest.xml code:
<activity
android:name="com.example.SearchActivity"
android:noHistory="true"
android:configChanges="keyboardHidden|orientation|screenSize"
android:screenOrientation="portrait" >
</activity>
And i have added the follwoing code in my activity :
@Override
public void onConfigurationChanged(Configuration newConfig) {
// ignore orientation/keyboard change
super.onConfigurationChanged(newConfig);
}
Though i have done this two things my device is changing its oreientaion whenever it's go from portrait to landscape and vice versa. I want to lock it only to portrait view. But it is not doing that. What things should i change here.