Back to project page wristband-android.
The source code is released under:
The Artistic License 2.0 Copyright (c) 2014 Allan Pichardo Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed...
If you think the Android project wristband-android 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.nimo.wristband; //w w w . j a va 2s . co m import android.app.Activity; import android.content.Intent; import android.net.Uri; import android.os.Bundle; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.Toast; import com.nimo.wristband.db.ShowData; public class SettingsActivity extends Activity{ private Button wipeButton; private Button feedbackButton; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.settings); wipeButton = (Button)findViewById(R.id.wipeButton); feedbackButton = (Button)findViewById(R.id.feedbackButton); getActionBar().setTitle("Settings"); getActionBar().setDisplayHomeAsUpEnabled(true); wipeButton.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { wipeData(); } }); feedbackButton.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { sendFeedback(); } }); } private void sendFeedback(){ startActivity(new Intent(Intent.ACTION_SENDTO, Uri.parse("mailto:imaginarymercenary@gmail.com"))); } private void wipeData(){ ShowData showData = new ShowData(this); showData.wipeAll(); Toast.makeText(this, "All data has been wiped.", Toast.LENGTH_SHORT).show(); } }