From 490eb04c395d82efb226c19a890e9f48e80a94f7 Mon Sep 17 00:00:00 2001 From: Dan Buch Date: Mon, 20 Feb 2012 09:15:08 -0500 Subject: [PATCH] Yup, definitely did this before... but where did I put it? --- .env | 2 +- HelloAndroid/.gitignore | 2 ++ HelloAndroid/src/com/mbh/HelloAndroid.java | 11 ++++++----- 3 files changed, 9 insertions(+), 6 deletions(-) create mode 100644 HelloAndroid/.gitignore diff --git a/.env b/.env index 5dcb8b3..e97440c 100644 --- a/.env +++ b/.env @@ -1,2 +1,2 @@ -export ANDROID_HOME="$HOME/opt/android-sdk-linux" +export ANDROID_HOME="${ANDROID_HOME-"$HOME/opt/android-sdk-linux"}" export PATH="$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools:$PATH" diff --git a/HelloAndroid/.gitignore b/HelloAndroid/.gitignore new file mode 100644 index 0000000..e614fbb --- /dev/null +++ b/HelloAndroid/.gitignore @@ -0,0 +1,2 @@ +bin +gen diff --git a/HelloAndroid/src/com/mbh/HelloAndroid.java b/HelloAndroid/src/com/mbh/HelloAndroid.java index 6bd7260..c19432c 100644 --- a/HelloAndroid/src/com/mbh/HelloAndroid.java +++ b/HelloAndroid/src/com/mbh/HelloAndroid.java @@ -2,14 +2,15 @@ package com.mbh; import android.app.Activity; import android.os.Bundle; +import android.widget.TextView; -public class HelloAndroid extends Activity -{ +public class HelloAndroid extends Activity { /** Called when the activity is first created. */ @Override - public void onCreate(Bundle savedInstanceState) - { + public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); - setContentView(R.layout.main); + TextView tv = new TextView(this); + tv.setText("Hello, Android"); + setContentView(tv); } }