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

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

Force “portrait” orientation mode

Don’t apply the orientation to the application element, instead you should apply the attribute to the activity element, and you must also set configChanges as noted below. Example: <activity android:screenOrientation=”portrait” android:configChanges=”orientation|keyboardHidden”> </activity> This is applied in the manifest file AndroidManifest.xml.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)