« Home « Kết quả tìm kiếm

What readers are saying about


Tóm tắt Xem thử

- 2 Key Concepts 30 2.1 The Big Picture.
- Where’s the “wow”?.
- http://d.android.com/sdk Download at Boykma.Com.
- http://d.android.com/guide/developing/tools/avd.html Download at Boykma.Com.
- Let’s start by taking a look at the overall system architecture—the key layers and components that make up the Android open source software stack.
- Figure 2.1: Android system architecture.
- http://d.android.com/guide/developing/tools/adb.html Download at Boykma.Com.
- Figure 2.2: The Home application.
- http://d.android.com/guide/developing/tools/aapt.html Download at Boykma.Com.
- http://d.android.com/guide/topics/security/security.html Download at Boykma.Com.
- Figure 3.1: The Sudoku example program for Android.
- If you do that and run the program now, you’ll see a blank screen that just contains the words “Hello World, Sudoku.” The first order of business is to change that into an opening screen for the game, with buttons to let the player start a new game, continue a previous one, get information about the game, or exit.
- import android.app.Activity;.
- import android.os.Bundle;.
- main.xml declares the user interface in XML, so that’s the file we need to modify.
- http://d.android.com/reference/android/R.html Download at Boykma.Com.
- Here’s the color definition, which you should put in res/values/colors.xml.
- And here’s the new layout:.
- That’s the approach we’ll take here..
- import android.content.Intent;.
- import android.view.View;.
- import android.view.Menu;.
- import android.view.MenuInflater;.
- import android.view.MenuItem;.
- Here’s the definition for that method:.
- import android.app.AlertDialog;.
- import android.content.DialogInterface;.
- import android.util.Log;.
- http://d.android.com/guide/developing/tools/adb.html.
- takes one parameter, the index of the difficulty name selected from the list.Here’s the new definition:.
- Here’s the outline of the Game activity:.
- import android.app.Dialog;.
- import android.view.Gravity;.
- import android.widget.Toast;.
- Here’s the outline:.
- import android.content.Context;.
- import android.graphics.Canvas;.
- import android.graphics.Paint;.
- import android.graphics.Rect;.
- import android.view.KeyEvent;.
- import android.view.MotionEvent;.
- Here’s the basic outline for onDraw.
- Here’s the user interface layout from res/layout/keypad.xml.
- http://d.android.com/reference/android/graphics/package-summary.html Download at Boykma.Com.
- Remember those Apple television ads with the silhouette people danc- ing wildly to the beat of their iPods? That’s the kind of excitement you want your products to generate.
- http://d.android.com/guide/topics/media/index.html Download at Boykma.Com.
- import android.media.MediaPlayer;.
- If you do much multimedia programming, you’ll soon discover that Android’s MediaPlayer can be a fickle beast.The version in Android 1.5 is much improved over its predecessors but it can still crash at the slightest provocation.
- import android.widget.VideoView;.
- http://d.android.com/reference/android/media/MediaRecorder.html Download at Boykma.Com.
- Here’s the new definition:.
- import android.os.Parcelable;.
- Luckily, internal memory isn’t the only storage that you have to work with..
- http://d.android.com/guide/topics/security/security.html#signing.
- import android.widget.Button;.
- import android.widget.EditText;.
- If it’s the enter key, then we call the openBrowser.
- import android.webkit.WebView;.
- onclick="window.android.callAndroid('Hello from Browser')">.
- Here’s the basic outline, including all the imports we’ll need later:.
- 5 import android.os.Handler;.
- import android.widget.TextView;.
- When you click “Call Android from JavaScript,” the string “Hello from Browser” will be dis- played in an Android text control.
- Here’s the basic outline:.
- import android.text.Editable;.
- import android.text.TextWatcher;.
- import android.widget.AdapterView;.
- import android.widget.Spinner;.
- Here’s the outline of the LocationTest class and the onCreate.
- 5 import android.app.Activity;.
- import android.location.Criteria;.
- import android.location.Location;.
- import android.location.LocationListener;.
- import android.location.LocationManager;.
- Here’s the definition of the four methods required by that interface:.
- That’s the subject of the next section..
- http://d.android.com/guide/developing/tools/ddms.html Download at Boykma.Com.
- “Android 1.5” target.
- Here’s the outline of the MyMap class:.
- import com.google.android.maps.MapActivity;.
- import com.google.android.maps.MapController;.
- import com.google.android.maps.MapView;.
- import com.google.android.maps.MyLocationOverlay;.
- http://d.android.com/reference/android/hardware/Camera.html 10.
- import android.provider.BaseColumns;.
- That’s the method I’ll use in EventsData and other classes in this chapter.
- Figure 9.2: The first version displays database records in a TextView.
- import android.content.ContentValues;.
- import android.database.Cursor;.
- import android.widget.SimpleCursorAdapter;.
- Here’s the new version:.
- import android.content.ContentProvider;.
- import android.content.ContentUris;.
- import android.content.UriMatcher;.
- import android.text.TextUtils;.
- 6 And now for something completely different...the next chapter will cover 3D graphics with OpenGL..
- http://d.android.com/reference/android/widget/SimpleCursorAdapter.html Download at Boykma.Com.
- import android.view.SurfaceHolder;.
- import android.view.SurfaceView;.
- import android.opengl.GLU;

Xem thử không khả dụng, vui lòng xem tại trang nguồn
hoặc xem Tóm tắt