After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 9.2 KiB After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 4.9 KiB |
After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 25 KiB |
@ -0,0 +1,9 @@
@@ -0,0 +1,9 @@
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android" > |
||||
|
||||
<item |
||||
android:id="@+id/action_remove" |
||||
android:icon="@drawable/ic_action_discard" |
||||
android:showAsAction="always" |
||||
android:title="@string/action_removesettings"/> |
||||
|
||||
</menu> |
@ -0,0 +1,29 @@
@@ -0,0 +1,29 @@
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android" > |
||||
|
||||
<item |
||||
android:id="@+id/action_resume" |
||||
android:icon="@drawable/ic_action_resume" |
||||
android:showAsAction="always" |
||||
android:title="@string/action_resume" /> |
||||
<item |
||||
android:id="@+id/action_pause" |
||||
android:icon="@drawable/ic_action_pause" |
||||
android:showAsAction="always" |
||||
android:title="@string/action_pause" /> |
||||
<item |
||||
android:id="@+id/action_remove" |
||||
android:icon="@drawable/ic_action_remove" |
||||
android:showAsAction="always" |
||||
android:title="@string/action_remove"> |
||||
<menu> |
||||
<item android:id="@+id/action_remove_default" android:title="@string/action_remove_default" /> |
||||
<item android:id="@+id/action_remove_withdata" android:title="@string/action_remove_withdata" /> |
||||
</menu> |
||||
</item> |
||||
<item |
||||
android:id="@+id/action_setlabel" |
||||
android:icon="@drawable/ic_action_labels" |
||||
android:showAsAction="ifRoom" |
||||
android:title="@string/action_setlabel" /> |
||||
|
||||
</menu> |
@ -0,0 +1,71 @@
@@ -0,0 +1,71 @@
|
||||
package org.transdroid.core.gui.settings; |
||||
|
||||
import org.androidannotations.annotations.Bean; |
||||
import org.androidannotations.annotations.EActivity; |
||||
import org.transdroid.core.R; |
||||
import org.transdroid.core.app.settings.ApplicationSettings; |
||||
|
||||
import android.content.Intent; |
||||
import android.net.Uri; |
||||
import android.os.Bundle; |
||||
import android.preference.Preference; |
||||
import android.preference.Preference.OnPreferenceClickListener; |
||||
|
||||
import com.actionbarsherlock.app.SherlockPreferenceActivity; |
||||
|
||||
@EActivity |
||||
public class SystemSettingsActivity extends SherlockPreferenceActivity { |
||||
|
||||
protected static final String INSTALLHELP_URI = "http://www.transdroid.org/download/"; |
||||
|
||||
@Bean |
||||
protected ApplicationSettings applicationSettings; |
||||
|
||||
@SuppressWarnings("deprecation") |
||||
@Override |
||||
protected void onCreate(Bundle savedInstanceState) { |
||||
super.onCreate(savedInstanceState); |
||||
|
||||
// Just load the system-related preferences from XML
|
||||
addPreferencesFromResource(R.xml.pref_notifications); |
||||
|
||||
// Handle outgoing links
|
||||
findPreference("system_sendlog").setOnPreferenceClickListener(onSendLogClick); |
||||
findPreference("system_installhelp").setOnPreferenceClickListener(onInstallHelpClick); |
||||
findPreference("system_changelog").setOnPreferenceClickListener(onChangeLogClick); |
||||
findPreference("system_about").setOnPreferenceClickListener(onAboutClick); |
||||
} |
||||
|
||||
private OnPreferenceClickListener onSendLogClick = new OnPreferenceClickListener() { |
||||
@Override |
||||
public boolean onPreferenceClick(Preference preference) { |
||||
// TODO: Implement error log collection and sending
|
||||
return true; |
||||
} |
||||
}; |
||||
|
||||
private OnPreferenceClickListener onInstallHelpClick = new OnPreferenceClickListener() { |
||||
@Override |
||||
public boolean onPreferenceClick(Preference preference) { |
||||
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(INSTALLHELP_URI))); |
||||
return true; |
||||
} |
||||
}; |
||||
|
||||
private OnPreferenceClickListener onChangeLogClick = new OnPreferenceClickListener() { |
||||
@Override |
||||
public boolean onPreferenceClick(Preference preference) { |
||||
// TODO: Implement about change log screen
|
||||
return true; |
||||
} |
||||
}; |
||||
|
||||
private OnPreferenceClickListener onAboutClick = new OnPreferenceClickListener() { |
||||
@Override |
||||
public boolean onPreferenceClick(Preference preference) { |
||||
// TODO: Implement about screen with app version, developer name and used open source libraries
|
||||
return true; |
||||
} |
||||
}; |
||||
|
||||
} |