Model solutions to Friday week 2 in class quiz

Model solutions to Friday week 2 in class quiz

by Tony deLaubenfels -
Number of replies: 6

Model solutions to Friday week 2 in class quiz, include the question and a citation where appropriate.

In reply to Tony deLaubenfels

Re: Model solutions to Friday week 2 in class quiz

by Brian Hixson-Simeral -

3. How is the shift to Landscape mode handled in the Android architecture, from a View, not a Controller perspective?

There is another xml file with the same name with -land added on (will be located in the layout/land folder instead of layout) that is loaded as the View for Landscape mode.

In reply to Tony deLaubenfels

Re: Model solutions to Friday week 2 in class quiz

by Kat Sayrs -

2. Give 2 reasons Resources are maintained independent of executable code in the Android architecture.

Using independent application resources makes it easy to update various characteristics of your application without modifying code

By providing sets of alternative resources, it enables you to optimize your application for a variety of device configurations

Source: http://developer.android.com/reference/android/content/res/Resources.html

In reply to Tony deLaubenfels

Re: Model solutions to Friday week 2 in class quiz

by Joe Sterchele -

4. What are the four steps in the onCreate method?

1) start an activity 

2)gather information from a bundle

3)set the content view

4)call the parent onCreate method 

In reply to Tony deLaubenfels

5) what is the task backstack? what is the effect of the back arrow and the home key on the task backstack?

by Ryan Conrardy -

The backstack is a stack of tasks that you are accessing or previously accessed.  


Pressing the back arrow takes you one task back and removes the task from the stack. 


Pressing the home key pauses the task, and leaves the stack. 


Page 63 and 107 in the text. 


In reply to Tony deLaubenfels

Re: Model solutions to Friday week 2 in class quiz

by Natalie Powell -

1) What are the other three major runnable components of an Android program (other than activities)?

Services (supports long-running/in the background apps)

Broadcast Receiver (listens for and responds to events)

Content Providers (allows multiple apps to store & share data)

In reply to Tony deLaubenfels

Re: Model solutions to Friday week 2 in class quiz

by Tony deLaubenfels -

5) What was the primary motivation for implementing the Fragment class in Android 3.0?

It was noticed by the developers that larger tablet screens had the potential to show more data than phones, yet the inflexability of the Activity class prevented showing multiple pages at the same time. Thus the Fragment was introduced to make the android interface more dynamic.