Created
January 15, 2010 21:10
-
-
Save scottferg/278408 to your computer and use it in GitHub Desktop.
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.myapp.mobile; | |
import android.app.Activity; | |
import android.os.Bundle; | |
import android.widget.Button; | |
import android.view.View; | |
import android.util.Log; | |
import java.net.URL; | |
import java.net.URLEncoder; | |
import java.net.URLConnection; | |
import java.io.InputStreamReader; | |
import java.io.BufferedReader; | |
import java.io.OutputStreamWriter; | |
public class PizzaHut extends Activity | |
{ | |
private static final String TAG = "MyActivity"; | |
private Button mSubmitButton; | |
/** Called when the activity is first created. */ | |
@Override | |
public void onCreate(Bundle savedInstanceState) | |
{ | |
mSubmitButton = (Button)findViewById(R.id.btnSubmit); | |
Log.i(TAG, "Submitting a request"); | |
fireSubmitRequest(); | |
Log.i(TAG, "Completed a request"); | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.main); | |
mSubmitButton.setOnClickListener(new View.OnClickListener() { | |
public void onClick(View v) { | |
fireSubmitRequest(); | |
} | |
}); | |
} | |
private void fireSubmitRequest() { | |
// HTTP request here | |
} | |
} |
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
/* AUTO-GENERATED FILE. DO NOT MODIFY. | |
* | |
* This class was automatically generated by the | |
* aapt tool from the resource data it found. It | |
* should not be modified by hand. | |
*/ | |
package com.myapp.mobile; | |
public final class R { | |
public static final class attr { | |
} | |
public static final class drawable { | |
public static final int icon=0x7f020000; | |
} | |
public static final class id { | |
public static final int btnSubmit=0x7f050002; | |
public static final int dbg_output=0x7f050001; | |
public static final int widget29=0x7f050000; | |
} | |
public static final class layout { | |
public static final int main=0x7f030000; | |
} | |
public static final class string { | |
public static final int app_name=0x7f040000; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment