Back to project page banshee-remote.
The source code is released under:
GNU General Public License
If you think the Android project banshee-remote listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package de.viktorreiser.bansheeremote.activity; /*from www . j av a2 s. com*/ import android.app.AlertDialog; import android.os.Bundle; import android.preference.Preference; import android.preference.PreferenceActivity; import android.view.ContextMenu; import android.view.ContextMenu.ContextMenuInfo; import android.view.View; import android.widget.AdapterView; import de.viktorreiser.bansheeremote.R; /** * Just a couple of global settings. * * @author Viktor Reiser <<a href="mailto:viktorreiser@gmx.de">viktorreiser@gmx.de</a>> */ public class SettingsActivity extends PreferenceActivity { // PRIVATE ==================================================================================== private Preference mWifiPoll; private Preference mMobilePoll; // OVERRIDDEN ================================================================================= @Override protected void onCreate(Bundle bundle) { super.onCreate(bundle); addPreferencesFromResource(R.xml.settings); registerForContextMenu(getListView()); mWifiPoll = findPreference("wifipollinterval"); mMobilePoll = findPreference("mobilepollinterval"); } @Override public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) { Object listItem = getListView().getAdapter().getItem( ((AdapterView.AdapterContextMenuInfo) menuInfo).position); if (listItem == mWifiPoll || listItem == mMobilePoll) { new AlertDialog.Builder(this) .setTitle(R.string.poll_info) .setMessage(R.string.poll_info_message) .setPositiveButton(android.R.string.ok, null) .show(); } } }