PageRenderTime 7ms CodeModel.GetById 1ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

/brailler/src/com/google/marvin/brailler/Brailler.java

http://eyes-free.googlecode.com/
Java | 38 lines | 25 code | 7 blank | 6 comment | 2 complexity | d3f7db16766dae95ad6c9bdbfa471fc8 MD5 | raw file
 1package com.google.marvin.brailler;
 2
 3import com.google.tts.TTS;
 4
 5import android.app.Activity;
 6import android.os.Bundle;
 7import android.view.View;
 8
 9/**
10 * Demonstration of using the touch screen as a Braille-input device.
11 * 
12 * @author clchen@google.com (Charles L. Chen)
13 */
14public class Brailler extends Activity {
15  private BraillerView braillerView;
16  public TTS tts;
17  private Brailler self;
18
19    /** Called when the activity is first created. */
20    @Override
21    public void onCreate(Bundle savedInstanceState) {
22        super.onCreate(savedInstanceState);
23        tts = new TTS(this, ttsInitListener, true);
24        self = this;
25    }
26    
27    private TTS.InitListener ttsInitListener = new TTS.InitListener() {
28      public void onInit(int version) {        
29        if (braillerView != null) {
30          braillerView.setVisibility(View.GONE);
31        }
32        braillerView = new BraillerView(self);
33        setContentView(braillerView);
34      }
35    };
36    
37
38}