Created
November 21, 2015 23:48
-
-
Save sylwke3100/9a0a5e39da593d8e2fa9 to your computer and use it in GitHub Desktop.
Opis
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"> | |
<PreferenceCategory | |
android:title="@string/notificationsGroupLabel"> | |
<CheckBoxPreference | |
android:title="@string/NotificationLabel" | |
android:defaultValue="true" | |
android:key="showNotificationWorkout"/> | |
<CheckBoxPreference | |
android:title="@string/vibraNotifylabel" | |
android:defaultValue="false" | |
android:key="vibrateNotification"/> | |
</PreferenceCategory> | |
<PreferenceCategory | |
android:title="@string/otherSettingsLabel"> | |
<CheckBoxPreference | |
android:title="@string/settingShowWorkoutInfoLabel" | |
android:defaultValue="false" | |
android:key="showWorkoutInfo"/> | |
<CheckBoxPreference | |
android:title="@string/exitAlertLabel" | |
android:defaultValue="true" | |
android:key="exitAlert"/> | |
<ListPreference | |
android:dialogTitle="@string/settingDistanceBetweenPointLabel" | |
android:key="distance" | |
android:title="@string/settingDistanceBetweenPointLabel" | |
android:entries="@array/viewDistanceSetting" | |
android:entryValues="@array/distanceArray" | |
android:defaultValue="@string/viewDistanceSettingDefault"/> | |
<ListPreference | |
android:dialogTitle="@string/settingGPSSpeedScan" | |
android:key="time" | |
android:title="@string/settingGPSSpeedScan" | |
android:entries="@array/viewTimeSetting" | |
android:entryValues="@array/timeArray" | |
android:defaultValue="@string/viewTimeSettingDefault"/> | |
</PreferenceCategory> | |
</PreferenceScreen> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.sylwke3100.freetrackgps; | |
import android.os.Bundle; | |
import android.preference.PreferenceFragment; | |
public class PreferencesFragment extends PreferenceFragment { | |
@Override | |
public void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
addPreferencesFromResource(R.xml.activity_preferences); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.sylwke3100.freetrackgps; | |
import android.app.Activity; | |
import android.content.SharedPreferences; | |
import android.os.Bundle; | |
import android.preference.PreferenceActivity; | |
import android.view.View; | |
import android.widget.*; | |
public class SettingsActivity extends Activity { | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
getFragmentManager().beginTransaction() | |
.replace(android.R.id.content, new PreferencesFragment()) | |
.commit(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment