I've got an issue with the android app im developping. When i open the settings menu, if i press the return button once, the main activity show up but it's shadowed (see the screenshot). Then i have to press the return button once again to unfreeze the main view and menu...
AndrdoidManifest.xml
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="lauzon.eric.dataloger"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="7" />
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<application android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme">
<activity android:name=".MainActivity" android:label="@string/title_activity_main" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".BrowseActivity"
android:label="@string/title_activity_browse"
/>
<activity android:name="SettingsActivity" />
</application>
How i start the settings view
startActivity(new Intent(this, SettingsActivity.class));
SettingsActivity.java
import android.os.Bundle;
import android.preference.PreferenceActivity;
public class SettingsActivity extends PreferenceActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
addPreferencesFromResource(R.xml.settings);
}
@Override
public void onBackPressed() {
finish();
return;
}
}