Android Open Source - CS160-Speech-Tutor Settings






From Project

Back to project page CS160-Speech-Tutor.

License

The source code is released under:

GNU General Public License

If you think the Android project CS160-Speech-Tutor listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.example.speechtutor;
/*ww  w  .  j  av a  2s  . c  o m*/
import android.content.Intent;
import android.os.Bundle;
import android.preference.PreferenceActivity;
import android.view.Menu;
import android.view.View;

public class Settings extends PreferenceActivity {

  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_settings);
    addPreferencesFromResource(R.xml.settings);
  }

  @Override
  public boolean onCreateOptionsMenu(Menu menu) {
    // Inflate the menu; this adds items to the action bar if it is present.
    getMenuInflater().inflate(R.menu.settings, menu);
    return true;
  }
  public void navigate(View view) {
    Class classToStart = null;
    switch(view.getId()) {
    case R.id.nav_playback: 
      classToStart = Playback.class;
      break;
    case R.id.nav_record:
      classToStart = Record.class;
      break;
    case R.id.nav_statistics:
      classToStart = Statistics.class;
      break;
    case R.id.nav_settings:
      classToStart = Settings.class;
      break;
    }
    Intent intent = new Intent(this, classToStart);
    intent.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
    startActivity(intent);
  }

}




Java Source Code List

com.example.speechtutor.ExpandableListAdapter.java
com.example.speechtutor.Playback.java
com.example.speechtutor.Record.java
com.example.speechtutor.RecordingData.java
com.example.speechtutor.Settings.java
com.example.speechtutor.SpeechRecognizerRecorderSetup.java
com.example.speechtutor.SpeechRecognizerRecorder.java
com.example.speechtutor.Statistics.java