Only ONE VIEW landscape mode

Swift AppDelegate.swift internal var shouldRotate = false func application(_ application: UIApplication, supportedInterfaceOrientationsFor window: UIWindow?) -> UIInterfaceOrientationMask { return shouldRotate ? .allButUpsideDown : .portrait } Your landscape view controller let appDelegate = UIApplication.shared.delegate as! AppDelegate appDelegate.shouldRotate = true // or false to disable rotation Objective-C AppDelegate.h @property (assign, nonatomic) BOOL shouldRotate; AppDelegate.m – (UIInterfaceOrientationMask)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow … Read more

Getting android.content.res.Resources$NotFoundException: exception even when the resource is present in android

For my condition the cause was taking int parameter for TextView. Let me show an example int i = 5; myTextView.setText(i); gets the error info above. This can be fixed by converting int to String like this myTextView.setText(String.valueOf(i)); As you write int, it expects a resource not the text that you are writing. So be … Read more

Supported orientations has no common orientation with the application, and shouldAutorotate is returning YES’

In IOS6 you have supported interface orientations in three places: The .plist (or Target Summary Screen) Your UIApplicationDelegate The UIViewController that is being displayed If you are getting this error it is most likely because the view you are loading in your UIPopover only supports portrait mode. This can be caused by Game Center, iAd, … Read more

Force an Android activity to always use landscape mode

Looking at the AndroidManifest.xml (link), on line 9: <activity android:screenOrientation=”landscape” android:configChanges=”orientation|keyboardHidden” android:name=”VncCanvasActivity”> This line specifies the screenOrientation as landscape, but author goes further in overriding any screen orientation changes with configChanges=”orientation|keyboardHidden”. This points to a overridden function in VncCanvasActivity.java. If you look at VncCanvasActivity, on line 109 is the overrided function: @Override public void onConfigurationChanged(Configuration … Read more