This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.android.hello; | |
import android.app.Activity; | |
import android.os.Bundle; | |
import android.widget.Button; | |
import android.widget.TextView; | |
import android.widget.EditText; | |
import android.view.View; | |
import android.view.View.OnClickListener; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
android:orientation="vertical" | |
android:layout_width="fill_parent" | |
android:layout_height="fill_parent"> | |
<LinearLayout | |
android:orientation="horizontal" | |
android:layout_width="fill_parent" | |
android:layout_height="wrap_content"> | |
<EditText |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.android.hello; | |
import android.app.Activity; | |
import android.os.Bundle; | |
import android.widget.Button; | |
import android.widget.TextView; | |
import android.widget.EditText; | |
import android.view.View; | |
import android.view.View.OnClickListener; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void onCreate(Bundle savedInstanceState) | |
{ | |
super.onCreate(savedInstanceState); | |
final EditText editText = new EditText(this); | |
editText.setWidth(240); | |
final TextView textView = new TextView(this); | |
Button button = new Button(this); | |
button.setText("Click Me"); | |
button.setOnClickListener(new Button.OnClickListener() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void onCreate(Bundle savedInstanceState) | |
{ | |
super.onCreate(savedInstanceState); | |
LinearLayout main = new LinearLayout(this); | |
main.setOrientation(LinearLayout.VERTICAL); | |
setContentView(main); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% ant install |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
activitycreator -o HelloAndroid com.android.hello.HelloAndroid | |
cd HelloAndroid | |
emulator & | |
# Make sure that you wait until you see the actual | |
# operating system (i.e., the main “desktop”) before | |
# you execute the next line, otherwise you’ll be | |
# stuck with some type of error stating that the | |
# install wasn’t successful. | |
ant install |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% source ~/.bashrc |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Adding Google's Android SDK | |
export PATH=$PATH:/your/chosen/path/android-sdk-mac_x86-0.9_beta/tools |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Check for the .bashrc file and execute it if it exists | |
if [ -f ~/.bashrc ]; then | |
source ~/.bashrc | |
fi |