Lesson 3

1.1   Download and Open the SimpleCalc Project

1.1   Explore the layout

CODING CHALLENGE :

TASK2

2.1 Start and Run your app in debug mode

2.2 Debug a Running App

Task 3 Explore Debugger Features

Step Intro

Step Out

3.2 Work With Breakpoints

 

Breakpoint Icon changes into green

Enables to view all the breakpoints in app

3.2 Testing Apps With Unit Test

TASK1. Explore and run SimpleCalc in android studio

1.1 Explore Source sets and SimpleCalc

Open Project Calculator Test

Run calculator test

Process finished

In the Calculator Test class, change the assertion in addTwoNumbers

The test failed

Change back to the correct test

TASK 2. Add more unit tests to Calculator Test

2.1 Add more tests for the add() method

Add a new method, and success

Change (1d,1d) to (-1d, 2d) and change the assertion to (1d)

 

Add a new method for floating-points number

Error message detected

Change the AssertThat() method to the closeTo()

2.2 Add unit tests for the other calculation methods

3.3 Using The Android Support Libraries

Task 1. Set up your project to use support libraries

1.1   Verify that the Android Support Library is Available

Android Support Repository has been installed on my Android Studio

Set Up the project and examine build.gradle

Locate the dependencies section of buil.gradle

Update the library version

Sync Process

1.1   Add the layout and colors

LESSON 2

TASK 2

3.2

3.3

3.4

4.1

4.3

2.2 Activity Life Cycle and State

1.2 Implement callbacks in to MainActivity

1.3 Implement lifecycle callbacks in SecondActivity

1.4 Observe the log as the app runs

Task2. Save and restore the activity instance state

2.1 Save the activity instance state with onSaveInstanceState()

2.2 Restore the activity instance state in onCreate()

2.3 Start Activities with Implicit Intents

Task1 Create new project and layout

  • . Create the project
  • Create the layouT

TASK2 Implement “Open Website”

2.1 Define the OpenWebsite method

 

TASK3 : Implement Open Location

TASK4 Implement Share this text

TASK5 Receive Implicit Intens

5.1 Create the project and layout

5.2 Modify the Android Manifest to add an intent filter

5.3 Process the intent