Pong: Switch to material expressive design for GameBar and DeviceExtras preferences
Signed-off-by: Ghosuto <clash.raja10@gmail.com>
This commit is contained in:
@@ -46,14 +46,14 @@
|
||||
<activity
|
||||
android:name="org.neoteric.device.DeviceExtras"
|
||||
android:exported="true"
|
||||
android:theme="@style/Theme.SubSettingsBase"/>
|
||||
android:theme="@style/Theme.SubSettingsBase.Expressive"/>
|
||||
|
||||
<!-- DeviceExtras -->
|
||||
<activity
|
||||
android:name="org.neoteric.device.DeviceExtras.DeviceExtrasActivity"
|
||||
android:exported="true"
|
||||
android:label="@string/device_title"
|
||||
android:theme="@style/Theme.SubSettingsBase">
|
||||
android:theme="@style/Theme.SubSettingsBase.Expressive">
|
||||
<intent-filter>
|
||||
<action android:name="com.android.settings.action.EXTRA_SETTINGS" />
|
||||
</intent-filter>
|
||||
|
||||
@@ -25,7 +25,6 @@ import android.content.SharedPreferences;
|
||||
import android.os.Bundle;
|
||||
import android.view.MenuItem;
|
||||
import androidx.preference.Preference;
|
||||
import androidx.preference.PreferenceFragment;
|
||||
import androidx.preference.PreferenceManager;
|
||||
import androidx.preference.SwitchPreferenceCompat;
|
||||
import androidx.preference.TwoStatePreference;
|
||||
@@ -33,7 +32,9 @@ import androidx.preference.TwoStatePreference;
|
||||
import org.neoteric.device.DeviceExtras.FileUtils;
|
||||
import org.neoteric.device.DeviceExtras.R;
|
||||
|
||||
public class DeviceExtras extends PreferenceFragment {
|
||||
import com.android.settingslib.widget.SettingsBasePreferenceFragment;
|
||||
|
||||
public class DeviceExtras extends SettingsBasePreferenceFragment {
|
||||
public static final String KEY_OTG_SWITCH = "otg";
|
||||
|
||||
private static TwoStatePreference mOTGModeSwitch;
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
*/
|
||||
package org.neoteric.device.DeviceExtras;
|
||||
|
||||
import android.app.Fragment;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import android.os.Bundle;
|
||||
import androidx.preference.PreferenceFragment;
|
||||
import androidx.preference.PreferenceManager;
|
||||
@@ -32,10 +32,10 @@ public class DeviceExtrasActivity extends CollapsingToolbarBaseActivity {
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
Fragment fragment = getFragmentManager().findFragmentById(com.android.settingslib.collapsingtoolbar.R.id.content_frame);
|
||||
Fragment fragment = getSupportFragmentManager().findFragmentById(com.android.settingslib.collapsingtoolbar.R.id.content_frame);
|
||||
if (fragment == null) {
|
||||
mDeviceExtrasFragment = new DeviceExtras();
|
||||
getFragmentManager().beginTransaction()
|
||||
getSupportFragmentManager().beginTransaction()
|
||||
.add(com.android.settingslib.collapsingtoolbar.R.id.content_frame, mDeviceExtrasFragment)
|
||||
.commit();
|
||||
} else {
|
||||
|
||||
@@ -41,13 +41,13 @@
|
||||
android:persistent="true"
|
||||
android:defaultToDeviceProtectedStorage="true"
|
||||
android:directBootAware="true"
|
||||
android:theme="@style/Theme.SubSettingsBase">
|
||||
android:theme="@style/Theme.SubSettingsBase.Expressive">
|
||||
|
||||
<!-- GameBar Overlay -->
|
||||
<activity
|
||||
android:name=".gamebar.GameBarSettingsActivity"
|
||||
android:label="@string/game_bar_title"
|
||||
android:theme="@style/Theme.SubSettingsBase"
|
||||
android:theme="@style/Theme.SubSettingsBase.Expressive"
|
||||
android:exported="true">
|
||||
<intent-filter>
|
||||
<action android:name="com.android.settings.action.IA_SETTINGS" />
|
||||
|
||||
@@ -24,16 +24,16 @@ import android.widget.Toast;
|
||||
|
||||
import androidx.preference.ListPreference;
|
||||
import androidx.preference.Preference;
|
||||
import androidx.preference.PreferenceFragmentCompat;
|
||||
import androidx.preference.SeekBarPreference;
|
||||
import androidx.preference.SwitchPreference;
|
||||
import androidx.preference.SwitchPreferenceCompat;
|
||||
|
||||
import com.android.settingslib.widget.MainSwitchPreference;
|
||||
import com.android.settingslib.widget.SettingsBasePreferenceFragment;
|
||||
|
||||
import org.lineageos.settings.R;
|
||||
|
||||
public class GameBarFragment extends PreferenceFragmentCompat {
|
||||
public class GameBarFragment extends SettingsBasePreferenceFragment {
|
||||
|
||||
private GameBar mGameBar;
|
||||
private MainSwitchPreference mMasterSwitch;
|
||||
|
||||
Reference in New Issue
Block a user