Skip to content

Instantly share code, notes, and snippets.

View lethargicpanda's full-sized avatar

Thomas Ezan lethargicpanda

View GitHub Profile
@lethargicpanda
lethargicpanda / AndroidManifest.xml
Created February 15, 2011 23:36
XML describing the behavior of the android search dialog
<application ... >
<activity android:name=".MainSearchableActivity" >
<intent-filter>
<action android:name="android.intent.action.SEARCH" />
</intent-filter>
<meta-data android:name="android.app.searchable"
android:resource="@xml/searchable"/>
</activity>
...
</application>
@lethargicpanda
lethargicpanda / TTSTestActivity.java
Created October 19, 2010 14:10
A basic activity to start to play with TextToSpeech on Android
public class TTSTestActivity extends Activity implements OnInitListener {
private static final int MY_DATA_CHECK_CODE = 0;
private TextToSpeech mTts;
@Override
protected void onCreate(Bundle savedInstanceState) {
setContentView(R.layout.tts_layout);
// check whether TTS resources are available on the device
Intent checkIntent = new Intent();
/* .... */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
// MRTIPS "Incantation" Section ----------------------------
//create a string array with the tips' ids from values/mrtips_arrays.xml