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); } }