Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

6. Flag Quiz Game App > 6.5. Building the App

6.5. Building the App

Figures 6.146.22 implement the Flag Quiz Game app in the single class FlagQuizGame, which extends Activity.


 1   // FlagQuizGame.java
 2   // Main Activity for the Flag Quiz Game App
 3   package com.deitel.flagquizgame;
 4
 5   import java.io.IOException;  
 6   import java.io.InputStream;  
 7   import java.util.ArrayList;  
 8   import java.util.Collections;
 9   import java.util.HashMap;    
10   import java.util.List;       
11   import java.util.Map;        
12   import java.util.Random;     
13   import java.util.Set;        
14
15   import android.app.Activity;
16   import android.app.AlertDialog;
17   import android.content.Context;
18   import android.content.DialogInterface;
19   import android.content.res.AssetManager;  
20   import android.graphics.drawable.Drawable;
21   import android.os.Bundle;
22   import android.os.Handler;
23   import android.util.Log;  
24   import android.view.LayoutInflater;
25   import android.view.Menu;    
26   import android.view.MenuItem;
27   import android.view.View;
28   import android.view.View.OnClickListener;
29   import android.view.animation.Animation;     
30   import android.view.animation.AnimationUtils;
31   import android.widget.Button;
32   import android.widget.ImageView;
33   import android.widget.TableLayout;
34   import android.widget.TableRow;
35   import android.widget.TextView;
36


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint