Back to project page AndroidPokerPlayer.
The source code is released under:
MIT License
If you think the Android project AndroidPokerPlayer 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 com.hyphenated.pokerplayerclient.activity; /* w w w . ja va2s . c o m*/ import android.os.Bundle; import android.app.Activity; import android.view.Menu; import android.widget.CheckBox; import android.widget.CompoundButton; import com.hyphenated.pokerplayerclient.R; import com.hyphenated.pokerplayerclient.manager.PreferencesManager; public class SettingsActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_settings); CheckBox vibrateCheckbox = (CheckBox) findViewById(R.id.vibrate_checkbox); vibrateCheckbox.setChecked(PreferencesManager.isVibrateEnabled(this)); vibrateCheckbox.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { @Override public void onCheckedChanged(CompoundButton compoundButton, boolean isChecked) { PreferencesManager.setVibrateEnabled(isChecked, SettingsActivity.this); } }); } }