| | |
| | | package net.jacekk.bridge.android; |
| | | |
| | | import android.app.Activity; |
| | | import android.content.Intent; |
| | | import android.os.Bundle; |
| | | import android.text.Editable; |
| | | import android.text.TextWatcher; |
| | | import android.view.Menu; |
| | | import android.view.MenuItem; |
| | | import android.widget.CompoundButton; |
| | | import android.widget.EditText; |
| | | import android.widget.SeekBar; |
| | |
| | | InitializeApp(); |
| | | } |
| | | |
| | | public boolean onCreateOptionsMenu(Menu menu) { |
| | | getMenuInflater().inflate(R.menu.main, menu); |
| | | return super.onCreateOptionsMenu(menu); |
| | | } |
| | | |
| | | public boolean onOptionsItemSelected(MenuItem item) { |
| | | switch (item.getItemId()) { |
| | | case R.id.main_action_about: |
| | | Intent about = new Intent(getApplicationContext(), AboutActivity.class); |
| | | startActivity(about); |
| | | return true; |
| | | case R.id.main_action_reset: |
| | | resetInputs(); |
| | | return true; |
| | | } |
| | | |
| | | return super.onOptionsItemSelected(item); |
| | | } |
| | | |
| | | private void resetInputs() { |
| | | BidSlider.setProgress(0); |
| | | MinorSuitsToggle.setChecked(true); |
| | |
| | | ResultsText.setText(getString(R.string.enter_data)); |
| | | } |
| | | |
| | | private void InitializeApp() { |
| | | protected void InitializeApp() { |
| | | bridgeCompute = new BridgeCompute(); |
| | | |
| | | BidSlider = (SeekBar) findViewById(R.id.BidSlider); |