<application
android:label="@string/app_name"
- android:theme="@style/Theme.Main">
+ android:theme="@style/Theme.SubSettingsBase">
<receiver android:name="org.lineageos.settings.device.BootCompletedReceiver">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
package org.lineageos.settings.device;
import android.os.Bundle;
-import android.preference.PreferenceActivity;
-public class AdvancedDisplayActivity extends PreferenceActivity {
+import com.android.settingslib.collapsingtoolbar.CollapsingToolbarBaseActivity;
+import com.android.settingslib.collapsingtoolbar.R;
+
+public class AdvancedDisplayActivity extends CollapsingToolbarBaseActivity {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
- getFragmentManager().beginTransaction().replace(android.R.id.content,
+ getFragmentManager().beginTransaction().replace(R.id.content_frame,
new AdvancedDisplayFragment()).commit();
}
}
package org.lineageos.settings.device;
-import android.app.ActionBar;
import android.content.res.Resources;
import android.os.Bundle;
-import android.view.MenuItem;
import androidx.preference.PreferenceFragment;
addPreferencesFromResource(R.xml.screen_preferences);
Resources res = getResources();
- final ActionBar actionBar = getActivity().getActionBar();
- actionBar.setDisplayHomeAsUpEnabled(true);
-
/* mDNIe */
mmDNIeScenario = (mDNIeScenario) findPreference(Constants.KEY_MDNIE_SCENARIO);
mmDNIeScenario.setEnabled(
mmDNIeAccessibility.setEnabled(
FileUtils.isFileWritable(res.getString(R.string.mdnie_accessibility_sysfs_file)));
}
-
- @Override
- public boolean onOptionsItemSelected(MenuItem item) {
- if (item.getItemId() == android.R.id.home) {
- getActivity().onBackPressed();
- return true;
- }
- return false;
- }
}