Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pull #50

Open
wants to merge 55 commits into
base: master
Choose a base branch
from
Open

pull #50

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
2053511
add a commment
Jan 29, 2014
c633a2a
Intial ActivityLab Commit since it was not on github
Lallo Feb 7, 2014
a9c0f23
Initial commit of ActivityLabTest because it was not on github
Lallo Feb 7, 2014
352ff51
Tried to implement all the requirements from the Programming Assignment
Lallo Feb 8, 2014
cb4b10a
All three tests finally passing
Lallo Feb 8, 2014
3fdb659
IntentsLab: initial commit
Lallo Feb 11, 2014
ab173e1
MyBrowser: initial commit
Lallo Feb 11, 2014
6a7584b
IntentsLabTest: initial commit
Lallo Feb 12, 2014
66b0e60
Week 03 Intents Lab homework done
Lallo Feb 16, 2014
6652376
Week 03 Permissions Homework Initial Commit
Lallo Feb 16, 2014
85db953
Week 03 Homework Permissions Lab working
Lallo Feb 16, 2014
b06897b
Week 03 Fragments Lab initial commit
Lallo Feb 16, 2014
d007adf
Week 03 Fragments Lab homework completed
Lallo Feb 16, 2014
19389d5
MyFirstApp and TheAnswer initial commit
Lallo Feb 17, 2014
c91ad4e
UI Examples initial commit
Lallo Feb 17, 2014
da3693e
UILabs and UILabsTest initial commit
Lallo Feb 17, 2014
b71a589
UILabs homework done
Lallo Feb 17, 2014
20843ca
UILabs homework done
Lallo Feb 17, 2014
5477246
Week 05 initial commit of lectures' examples
Lallo Feb 24, 2014
da0ff25
Week 05 Labs initial commit
Lallo Feb 28, 2014
fe68797
Week 05 Labs almost working but something to correct in the second test
Lallo Mar 1, 2014
51dbfe4
Week 05 Labs fixes second submission although the test was already
Lallo Mar 2, 2014
55f3d03
Week 04 Examples - added google-play-services_lib project
Lallo Mar 2, 2014
bcd3575
Week 03 - examples committed
Lallo Mar 2, 2014
be2bb59
Week 01 - examples committed
Lallo Mar 2, 2014
fe9e87d
Week 02 - examples committed except AppFundamentalsVideoSourceExamples
Lallo Mar 2, 2014
efc29ab
Week 06 - GraphicsLab initial commit
Lallo Mar 2, 2014
0740511
Week 06 GraphicsLab completed although fling actions maybe move the
Lallo Mar 8, 2014
b63cfa7
Week 06 GraphicsLab completed although the application runs so slow on
Lallo Mar 8, 2014
8c09eb2
Week 07 Lab initial commit
Lallo Mar 17, 2014
4dcc50b
Merge branch 'master' of https://github.com/Lallo/lallo-coursera-andr…
Mar 17, 2014
08e90ef
Week 07 Lab completed
Lallo Mar 17, 2014
c28ea7e
Week 07 Moved some projects' locations with the hope of fixing things...
Lallo Mar 17, 2014
60e5da4
Week 07 MapsEarthquakeMapActivity and LocationGetLocationServices still
Lallo Mar 17, 2014
0f4ce47
LocationLabTest committed res directory
Lallo Mar 20, 2014
93a7678
playing with merge
Lallo Mar 21, 2014
3ffe620
Merge branches 'aporter' and 'master'
Lallo Mar 21, 2014
00e8298
Restored LocationGetLocation
Lallo Mar 21, 2014
64415f5
Restored all Examples as per aporter zip download with sha1
Lallo Mar 21, 2014
362b35c
Fixing hundreds of build path. Starting to see the light at the end of
Lallo Mar 21, 2014
1df769f
Fixed ActivityLab
Lallo Mar 21, 2014
efb24c4
Fixed PermissionLab
Lallo Mar 21, 2014
a02065d
Fixed FragmentsLab
Lallo Mar 21, 2014
bd1c11b
Fixed GraphicsLab and IntentsLab
Lallo Mar 21, 2014
63c1a99
Fixed LocationLab
Lallo Mar 21, 2014
0cc7dd1
Fixed NotificationLab and UILabs
Lallo Mar 21, 2014
74f44ad
Fixed IntentsLab once again because the last time I forgot to add the
Lallo Mar 21, 2014
fefb1ed
Fixed MyFirstApp ;-)
Lallo Mar 21, 2014
2b270c7
MyFirstApp added a comment in .project
Lallo Mar 21, 2014
ae85627
MyFirstApp modified comment in .project, rock on Lallo!
Lallo Mar 21, 2014
824faeb
_MyFirstApp was still MyFirstApp on the filesystem, fixed this
Lallo Mar 21, 2014
d4f69d0
Fixed some paths and added a few projects from the first optional labs.
Lallo Mar 22, 2014
4bd232b
Renamed a few projects
Lallo Mar 24, 2014
e9d22a3
Week 8 initial lab committ
Lallo Mar 24, 2014
99f079f
Week 8 ContentProviderLab working
Lallo Mar 24, 2014
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
33 changes: 33 additions & 0 deletions ActivityLab/ActivityLab/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>ActivityLab</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.android.ide.eclipse.adt.ApkBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>com.android.ide.eclipse.adt.AndroidNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
31 changes: 31 additions & 0 deletions ActivityLab/ActivityLab/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="course.labs.activitylab"
android:versionCode="1"
android:versionName="1.0" >

<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="17" />

<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="course.labs.activitylab.ActivityOne"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="course.labs.activitylab.ActivityTwo"
android:label="@string/title_activity_activity_two" >
</activity>
</application>

</manifest>
Binary file added ActivityLab/ActivityLab/ic_launcher-web.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions ActivityLab/ActivityLab/project.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# This file is automatically generated by Android Tools.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file must be checked in Version Control Systems.
#
# To customize properties used by the Ant build system edit
# "ant.properties", and override values to adapt the script to your
# project structure.
#
# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt

# Project target.
target=android-19
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 32 additions & 0 deletions ActivityLab/ActivityLab/res/layout/activity_one.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >

<TextView android:id="@+id/create"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/onCreate" />

<TextView android:id="@+id/start"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/onStart" />

<TextView android:id="@+id/resume"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/onResume" />

<TextView android:id="@+id/restart"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/onRestart" />

<Button android:id="@+id/bLaunchActivityTwo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/button" />

</LinearLayout>
33 changes: 33 additions & 0 deletions ActivityLab/ActivityLab/res/layout/activity_two.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >

<TextView android:id="@+id/create"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/onCreate" />

<TextView android:id="@+id/start"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/onStart" />

<TextView android:id="@+id/resume"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/onResume" />

<TextView android:id="@+id/restart"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/onRestart" />

<Button android:id="@+id/bClose"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/close"
/>

</LinearLayout>
11 changes: 11 additions & 0 deletions ActivityLab/ActivityLab/res/values-v11/styles.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<resources>

<!--
Base application theme for API 11+. This theme completely replaces
AppBaseTheme from res/values/styles.xml on API 11+ devices.
-->
<style name="AppBaseTheme" parent="android:Theme.Holo.Light">
<!-- API 11 theme customizations can go here. -->
</style>

</resources>
12 changes: 12 additions & 0 deletions ActivityLab/ActivityLab/res/values-v14/styles.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<resources>

<!--
Base application theme for API 14+. This theme completely replaces
AppBaseTheme from BOTH res/values/styles.xml and
res/values-v11/styles.xml on API 14+ devices.
-->
<style name="AppBaseTheme" parent="android:Theme.Holo.Light.DarkActionBar">
<!-- API 14 theme customizations can go here. -->
</style>

</resources>
14 changes: 14 additions & 0 deletions ActivityLab/ActivityLab/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>

<string name="app_name">ActivityLab</string>
<string name="menu_settings">Settings</string>
<string name="onCreate">onCreate() calls: 0</string>
<string name="onStart">onStart() calls: 0</string>
<string name="onResume">onResume() calls: 0</string>
<string name="onRestart">onRestart() calls: 0</string>
<string name="button">Start Activity Two</string>
<string name="title_activity_activity_two">Activity Two</string>
<string name="close">Close Activity</string>

</resources>
205 changes: 205 additions & 0 deletions ActivityLab/ActivityLab/src/course/labs/activitylab/ActivityOne.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,205 @@
package course.labs.activitylab;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;

public class ActivityOne extends Activity {

private static final String RESTART_KEY = "restart";
private static final String RESUME_KEY = "resume";
private static final String START_KEY = "start";
private static final String CREATE_KEY = "create";

// String for LogCat documentation
private final static String TAG = "Lab-ActivityOne";

// Lifecycle counters

// TODO:
// Create counter variables for onCreate(), onRestart(), onStart() and
// onResume(), called mCreate, etc.
// You will need to increment these variables' values when their
// corresponding lifecycle methods get called
private int mCreate = 0;
private int mRestart = 0;
private int mStart = 0;
private int mResume = 0;




// TODO: Create variables for each of the TextViews, called
// mTvCreate, etc.
private TextView mTvCreate;
private TextView mTvRestart;
private TextView mTvStart;
private TextView mTvResume;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_one);

// TODO: Assign the appropriate TextViews to the TextView variables
// Hint: Access the TextView by calling Activity's findViewById()
// textView1 = (TextView) findViewById(R.id.textView1);
mTvCreate = (TextView) findViewById(R.id.create);
mTvRestart = (TextView) findViewById(R.id.restart);
mTvStart = (TextView) findViewById(R.id.start);
mTvResume = (TextView) findViewById(R.id.resume);





Button launchActivityTwoButton = (Button) findViewById(R.id.bLaunchActivityTwo);
launchActivityTwoButton.setOnClickListener(new OnClickListener() {

@Override
public void onClick(View v) {
// TODO:
// Launch Activity Two
// Hint: use Context's startActivity() method

// Create an intent stating which Activity you would like to start
Intent activityTwoIntent= new Intent(ActivityOne.this,ActivityTwo.class);

// Launch the Activity using the intent
startActivity(activityTwoIntent);


}
});

// Check for previously saved state
if (savedInstanceState != null) {

// TODO:
// Restore value of counters from saved state
// Only need 4 lines of code, one for every count variable
mRestart = savedInstanceState.getInt(RESTART_KEY);
mCreate = savedInstanceState.getInt(CREATE_KEY);
mStart = savedInstanceState.getInt(START_KEY);
mResume = savedInstanceState.getInt(RESUME_KEY);
}

// TODO: Emit LogCat message
Log.i(TAG,"Entered the onCreate method");

// TODO:
// Update the appropriate count variable
++mCreate;
// Update the user interface via the displayCounts() method
displayCounts();



}

// Lifecycle callback overrides

@Override
public void onStart() {
super.onStart();

// TODO: Emit LogCat message
Log.i(TAG,"Entered the onStart method");

// TODO:
// Update the appropriate count variable
++mStart;
// Update the user interface
displayCounts();

}

@Override
public void onResume() {
super.onResume();

// TODO: Emit LogCat message
Log.i(TAG, "Entered the onResume method");

// TODO:
// Update the appropriate count variable
// Update the user interface
++mResume;
displayCounts();
}

@Override
public void onPause() {
super.onPause();

// TODO: Emit LogCat message
Log.i(TAG, "Entered the onPause method");

}

@Override
public void onStop() {
super.onStop();

// TODO: Emit LogCat message
Log.i(TAG, "Entered the onStop method");

}

@Override
public void onRestart() {
super.onRestart();

// TODO: Emit LogCat message
Log.i(TAG, "Entered the onRestart method");

// TODO:
// Update the appropriate count variable
++mRestart;
// Update the user interface
displayCounts();



}

@Override
public void onDestroy() {
super.onDestroy();

// TODO: Emit LogCat message
Log.i(TAG,"Entered the onDestroy method");

}

@Override
public void onSaveInstanceState(Bundle savedInstanceState) {
// TODO:
// Save state information with a collection of key-value pairs
// 4 lines of code, one for every count variable
savedInstanceState.putInt(RESTART_KEY, mRestart);
savedInstanceState.putInt(RESUME_KEY, mResume);
savedInstanceState.putInt(CREATE_KEY, mCreate);
savedInstanceState.putInt(START_KEY, mStart);





}

// Updates the displayed counters
public void displayCounts() {

mTvCreate.setText("onCreate() calls: " + mCreate);
mTvStart.setText("onStart() calls: " + mStart);
mTvResume.setText("onResume() calls: " + mResume);
mTvRestart.setText("onRestart() calls: " + mRestart);

}
}
Loading