Search in sources :

Example 1 with SpeechInputView

use of ee.ioc.phon.android.speak.view.SpeechInputView in project K6nele by Kaljurand.

the class ChatDemoActivity method onCreate.

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_chat_demo);
    mPrefs = PreferenceManager.getDefaultSharedPreferences(this);
    mRes = getResources();
    SpeechInputView siv = (SpeechInputView) findViewById(R.id.vSpeechInputView);
    CallerInfo callerInfo = new CallerInfo(createExtras(), getCallingActivity());
    // TODO: review this
    siv.init(R.array.keysActivity, callerInfo, 0);
    siv.setListener(getSpeechInputViewListener(), null);
    mList = (ListView) findViewById(R.id.list_matches);
    mList.setOnItemClickListener(new AdapterView.OnItemClickListener() {

        @Override
        public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
            Object entry = parent.getAdapter().getItem(position);
            startActivity(entry.toString());
        }
    });
}
Also used : CallerInfo(ee.ioc.phon.android.speak.model.CallerInfo) SpeechInputView(ee.ioc.phon.android.speak.view.SpeechInputView) AdapterView(android.widget.AdapterView) SpeechInputView(ee.ioc.phon.android.speak.view.SpeechInputView) View(android.view.View) AdapterView(android.widget.AdapterView) ListView(android.widget.ListView)

Aggregations

View (android.view.View)1 AdapterView (android.widget.AdapterView)1 ListView (android.widget.ListView)1 CallerInfo (ee.ioc.phon.android.speak.model.CallerInfo)1 SpeechInputView (ee.ioc.phon.android.speak.view.SpeechInputView)1