This file contains 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
// Progress Bar asyncTask example | |
package course.examples.Threading.ThreadingAsyncTask; | |
import android.app.Activity; | |
import android.graphics.Bitmap; | |
import android.graphics.BitmapFactory; | |
import android.os.AsyncTask; | |
import android.os.Bundle; | |
import android.util.Log; |
This file contains 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 course.examples.Threading.ThreadingHandlerRunnable; | |
import android.app.Activity; | |
import android.graphics.Bitmap; | |
import android.graphics.BitmapFactory; | |
import android.os.Bundle; | |
import android.os.Handler; | |
import android.view.View; | |
import android.view.View.OnClickListener; | |
import android.widget.Button; |
This file contains 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 course.examples.Threading.ThreadingHandlerMessages; | |
import android.app.Activity; | |
import android.graphics.Bitmap; | |
import android.graphics.BitmapFactory; | |
import android.os.Bundle; | |
import android.os.Handler; | |
import android.os.Message; | |
import android.view.View; | |
import android.view.View.OnClickListener; |
This file contains 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
//AlarmCreateActivity.java | |
package course.examples.Alarms.AlarmCreate; | |
import android.app.Activity; | |
import android.app.AlarmManager; | |
import android.app.PendingIntent; | |
import android.content.Intent; | |
import android.os.Bundle; | |
import android.os.SystemClock; | |
import android.view.View; |
This file contains 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
/* Variable section directly after class i.e. "public class <<ClassName>> extends <<baseClassToInher* itFrom>> This demonstrates the many different types of Fields and field configurations. | |
* | |
*/ | |
//Int,days in milliseconds - 7 * 24 * 60 * 60 * 1000 | |
private static final int SEVEN_DAYS = 604800000; | |
// String for LogCat messages (Debugging) | |
private static final String TAG = "<<app||className>>"; | |
// Simple strings, not initialized |
This file contains 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 <<packageName>>; | |
import java.util.ArrayList; | |
import java.util.List; | |
import android.content.Context; | |
import android.util.Log; | |
import android.view.LayoutInflater; | |
import android.view.View; | |
import android.view.ViewGroup; |
This file contains 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 <<packageName>>; | |
import java.text.ParseException; | |
import java.text.SimpleDateFormat; | |
import java.util.Date; | |
import java.util.Locale; | |
import android.content.Intent; | |
This file contains 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 <<packageName>>; | |
import java.util.Calendar; | |
import java.util.Date; | |
import android.app.Activity; | |
import android.app.DatePickerDialog; | |
import android.app.Dialog; | |
import android.app.DialogFragment; | |
import android.app.TimePickerDialog; |
This file contains 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
// 1. Declare Request Code field in main activity | |
private static final int <<requestCodeName>> = 0; | |
//2. Bind request code to the startActivityForResult method. | |
<<inflatedView>>.setOnClickListener(new OnClickListener() { | |
@Override | |
public void onClick(View v) { | |
log("Entered footerView.OnClickListener.onClick()"); |
This file contains 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
//Required Import | |
import android.view.LayoutInflater; | |
//Inflating a view within the onCreate method | |
@Override | |
public void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
//TODO - Ex., Inflate footerView for footer_view.xml file | |
TextView <<tvInstanceName>> = (TextView) getLayoutInflater().inflate(R.layout.<<viewXMLlayout>>, null); |