Homework:
Do the Fragment exercise on pp. 70-73 of Beginning Android 4 Application
Development by Wei-Meng Lee. I found that I needed to change
public class MainActivity extends Activity {
to
public class MainActivity extends FragmentActivity {
in MainActivity.java. Also in my activity_main.xml I gave the android:name attribute of the
fragment a value of android:name="com.csc349blum.fragments.Fragment1"
(Lee has
two capital F's; I only had one.) Paste a screen capture of some of your code and the reults
running.
Read and summarize the following article
Block
Android apps from phoning home without your permission (c|net)
Do the Dynamic Fragment exercise on pp. 73-76 of Beginning Android 4 Application
Development by Wei-Meng Lee. I found that I needed to change
WindowManager wm = getWindowManager();
Display d = wm.getDefaultDisplay();
if(d.getWidth() > d.getHeight())
WindowManager wm = getWindowManager();
Display display = wm.getDefaultDisplay();
Point size = new Point();
display.getSize(size);
int width = size.x;
int height = size.y;
if(width>height){
since some of the author's code has been deprecated. Also I had to run it on a tablet as the
emulator was not correctly emulating the effect. Paste a screen capture of some of your code and the reults
running.
Due: Feb. 18