Fixing volume control - making the main activities control the text-to-speech volume.

This commit is contained in:
Rodrigo Damazio
2010-08-31 18:55:12 -03:00
parent b811df8cda
commit b200b66612
4 changed files with 16 additions and 0 deletions
@@ -35,6 +35,7 @@ import android.location.Location;
import android.os.Bundle;
import android.os.Handler;
import android.os.HandlerThread;
import android.speech.tts.TextToSpeech;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
@@ -237,6 +238,9 @@ public class ChartActivity extends Activity implements
MyTracks.getInstance().setChartActivity(this);
providerUtils = MyTracksProviderUtils.Factory.get(this);
// The volume we want to control is the Text-To-Speech volume
setVolumeControlStream(TextToSpeech.Engine.DEFAULT_STREAM);
requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.mytracks_elevation);
ViewGroup layout = (ViewGroup) findViewById(R.id.elevation_chart);