Gadgetbridge/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/SettingsActivity.java

47 lines
1.8 KiB
Java
Raw Normal View History

2015-01-07 14:00:18 +01:00
package nodomain.freeyourgadget.gadgetbridge;
import android.content.Intent;
import android.media.audiofx.BassBoost;
2015-01-07 14:00:18 +01:00
import android.os.Bundle;
import android.preference.ListPreference;
import android.preference.Preference;
import android.preference.PreferenceActivity;
import android.preference.PreferenceManager;
import android.support.v4.app.NavUtils;
import android.support.v4.content.LocalBroadcastManager;
import android.view.MenuItem;
2015-01-07 14:00:18 +01:00
import nodomain.freeyourgadget.gadgetbridge.activities.AbstractSettingsActivity;
import nodomain.freeyourgadget.gadgetbridge.miband.MiBandPreferencesActivity;
public class SettingsActivity extends AbstractSettingsActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
addPreferencesFromResource(R.xml.preferences);
}
2015-01-07 14:00:18 +01:00
@Override
protected void onPostCreate(Bundle savedInstanceState) {
super.onPostCreate(savedInstanceState);
Preference pref = (Preference) findPreference("notifications_generic");
pref.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
public boolean onPreferenceClick(Preference preference) {
Intent enableIntent = new Intent("android.settings.ACTION_NOTIFICATION_LISTENER_SETTINGS");
startActivity(enableIntent);
return true;
}
});
pref = (Preference) findPreference("pref_key_miband");
pref.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
public boolean onPreferenceClick(Preference preference) {
Intent enableIntent = new Intent(SettingsActivity.this, MiBandPreferencesActivity.class);
startActivity(enableIntent);
return true;
}
});
2015-01-07 14:00:18 +01:00
}
}