Friends who have bought this book and want to see the example code do not want to put the CD in the CD-ROM drive to read it out. Teacher Li Gang's "Crazy Android Lecture Notes" is a practical book that introduces Android application development. It comprehensively introduces all aspects of application development on the Android 2.3 platform. If you are not familiar with JDK installation and basic Java syntax, this book is not suitable for you. This book only uses one chapter to introduce how to build an Android development environment and Android application structure. Of course, it also briefly explains the development history of Android. This book is just a book that introduces the actual development of Android. It is not a book about so-called "ideas". Don't expect that studying this book will improve your so-called "Android ideas", so readers who hope to improve their programming ideas are advised not to read it. book. Table of Contents: Chapter 1 Android Application and Development Environment 1.1 Development and History of Android 1.1.1 Development and Introduction of Android 1.1.2 Android Platform Architecture and Features 1.2 Building Android Development Environment 1.2.1 Download and Install Android SDK 1.2.2 Install Ecli PSe and ADT plug-ins 1.3 Usage of common Android development tools 1.3.1 Create, delete and browse AVD 1.3.2 Use Android Emulator (Emulator) 1.3.3 Use DDMS for debugging 1.3.4 Usage of Android Debug Bridge (ADB) 1.3. 5 Use DX to compile Android applications 1.3.6 Use Android Asset Packaging Tool (AAPT) to package resources 1.3.7 Use mksdcard to manage virtual SD cards 1.4 Start the first Android application 1.4.1 Use eclipse to develop the first Android application 1.4.2 Pass ADT runs Android applications 1.5 Android application structure analysis 1.5.1 Create an Android application 1.5.2 Automatically generated R.java 1.5.3 res directory description 1.5.4 Android application manifest file: AndroidManifest.xml 1.5.5 Application permission description 1.6 Introduction to the basic components of Android applications 1.6.1 Activity and View 1.6.2 Service 1.6.3 BroadcastReceiver 1.6.4 ContentProvider 1.6.5 Intent and IntentFilter 1.7 Summary of this Chapter Chapter 2 Interface Programming of Android Applications 2.1 Interface Programming and View (View) Components 2.1.1 View components and container components 2.1.2 Use XML layout files to control the UI interface 2.1.3 Control the UI interface in code 2.1.4 Use a mixture of XML layout files and Java code to control the UI interface 2.1.5 Develop custom View 2.2 Layout manager 2.2.1 Linear layout 2.2.2 Table layout 2.2.3 Frame layout 2.2.4 Relative layout 2.2.5 Absolute layout 2.3 Basic interface components 2.3.1 Function and usage of text box (TextView) and edit box (EditText) 2.3.2 Functions and usage of Button and ImageButton components 2.3.3 Using 9Patch pictures as button backgrounds 2.3.4 Introduction and application of RadioButtons and CheckBoxes 2.3.5 Status Function and usage of switch button (ToggleButton) 2.3.6 Function and usage of clock (AnalogClock and DigitalClock) 2.3.7 Function and usage of image view (ImageView) 2.4 Advanced interface components 2.4.1 Automatic completion of text box (AutoCompleteTextView) Function and usage 2.4.2 Function and usage of Spinner 2.4.3 Function and usage of date and time picker (DatePicker and TimePicker) 2.4.4 Function and usage of progress bar (ProgressBar) 2.4.5 Drag bar (SeekBar) Function and usage 2.4.6 Function and usage of star rating bar (RatingBar) 2.4.7 Function and usage of tab (TabHost) 2.4.8 Function and usage of scroll view (ScrollView) 2.4.9 List view (ListView and ListActivity ) 2.4.10 Expandable List Component (ExpandableListView) 2.4.11 Grid View (GridView) and Image Switcher (ImageSwitcher) Functions and Usage 2.4.12 Gallery View (Gallery) Function and Usage 2.5 Dialog Box 2.5.1 Usage AlertDialog to create a simple dialog box 2.5.2 Use AlertDialog to create a list dialog box 2.5.3 Use AlertDialog to create a custom dialog box 2.5.4 Use PopupWindow 2.5.5 Use DatePickerDialog and TimePickerDialog 2.5.6 Use ProgressDialog to create a progress dialog box 2.6 Message prompts 2.6. 1 Use Toast to display the prompt message box 2.6.2 Function and usage of Notification 2.7 Menu 2.7.1 Option menu and submenu (SubMenu) 2.7.2 Use listeners to listen to menu events 2.7.3 Create check menu items and radio menu items 2.7.4 Set the Activity associated with the menu item 2.7.5 Context menu 2.8 Summary of this chapter Chapter 3 Event processing 3.1 Android event processing 3.2 Event processing based on listening 3.2.1 Processing model of event listening 3.2.2 Events and event listeners 3.2.3 Inner class as event listener class 3.2.4 External class as event listener class 3.2.5 Activity itself as event listener 3.2.6 Anonymous inner class as event listener class 3.2.7 Direct binding to tags 3.3 Based on Callback event processing 3.3.1 Callback mechanism and listening mechanism 3.3.2 Callback-based event propagation 3.3.3 Rewriting the onTouchEvent method to respond to touch screen events 3.4 Responding to system-set events 3.4.1 Introduction to the Configuration class 3.4.2 Rewriting the onConfigurationChanged response System settings changes 3.5 Handler message passing mechanism 3.5.1 Introduction to Handler class 3.5.2 Handler use cases 3.6 Summary of this chapter Chapter 4 In-depth understanding of Activity 4.1 Establish, configure and use Activity 4.1.1 Establish Activity 4.1.2 Configure Activity 4.1.3 Start , close Activity 4.1.4 Use Bundle to exchange data between Activities 4.1.5 Start other Activities and return results 4.2 Activity callback mechanism 4.3 Activity life cycle 4.3.1 Activity life cycle demonstration 4.3.2 Similarity between Activity and Servlet Differences 4.4 Summary of this chapter Chapter 5 Using Intent and IntentFilter Chapter 5 Communicating 5.1 Detailed explanation of Intent objects 5.1.1 Using Intent to start system components 5.2 Intent attributes and intent-filter configuration 5.2.1 Component attributes 5.2.2 Action, Category attributes and intent-filter configuration 5.2.3 Specify Action and Category to call system Activity 5.2.4 Data, Type attributes and intent-filter configuration 5.2.5 Extra attribute 5.3 Use Intent to create Tab page 5.4 Summary of this chapter Chapter 6 Resources of Android applications 6.1 Resources Types and storage methods 6.1.1 Types and storage methods of resources 6.1.2 Using resources 6.2 Using string, color, and size resources 6.2.1 Definition of color values 6.2.2 Defining string, color, and size resource files 6.2.3 Using string, color, and size resources 6.3 Array resources 6.4 Using (Drawable) resources 6.4.1 Picture resources 6.4.2 StateListDrawable resources 6.4.3 LayerDrawable resources 6.4.4 ShapeDrawable resources 6.4.5 ClipDrawable resources 6.4.6 AnimationDrawable resources 6.5 Use original XML resources 6.5.1 Define original XML resources 6.5.2 Use original XML files 6.6 Use layout resources 6.7 Use menu resources 6.7.1 Define menu resources 6.7.2 Use menu resources 6.8 Style and Theme resources 6.8.1 Style resources 6.8.2 Theme resources 6.9 Attribute resources 6.10 Using original resources 6.11 Internationalization and resource adaptation 6.11.1 Java internationalization ideas 6.11.2 Languages and countries supported by Java 6.11.3 Complete program internationalization 6.11.4 Provide international resources for Android applications 6.11.5 Internationalize Android applications 6.12 Summary of this chapter Chapter 7 Graphics and Image Processing 7.1 Using simple pictures 7.1.1 Using Drawable objects 7.1.2 Bitmap and BitmapFactory 7.2 Drawing 7.2.1 Android drawing basics: Canvas, Paint, etc. 7.2.2 Path class 7.2.3 Drawing game animation 7.3 Graphics special effects processing 7.3.1 Use Matrix to control transformation 7.3.2 Use drawBitmapMesh to distort images 7.3.3 Use Shader to fill graphics 7.4 Frame-by-frame animation 7.4.1 AnimationDrawable and frame-by-frame animation 7.5 Tween animation 7.5.1 Tween animation and Interpolator 7.5.2 Tween animation with changes in position, size, rotation, and transparency 7.5.3 Custom tweening Interval animation 7.6 Using SurfaceView to implement animation 7.6.1 SurfaceView's drawing mechanism 7.7 Summary of this chapter Chapter 8 Android data storage and IO 8.1 Using SharedPreferences 8.1.1 Introduction to SharedPreferences and Editor 8.1.2 Storage location and format of SharedPreferences 8.1.3 Reading, Writing other applications Shared Preferences 8.2 File storage 8.2.1 openFileOutput and open FileInput 8.2.2 Reading and writing files on the SD card 8.3 SQLite database 8.3.1 Introduction to SQLiteDatabase 8.3.2 Creating databases and tables 8.3.3 Using SQL statements to operate SQLite database 8.3 .4 Use the sqlite3 tool 8.3.5 Use specific methods to operate the SQLite database 8.3.6 Transactions 8.3.7 SQLiteOpenHelper class 8.4 Gesture (Gesture) 8.4.1 Gesture detection 8.4.2 Add gestures 8.4.3 Recognize user's gestures 8.5 Automatic reading (TTS) ) 8.6 Summary of this Chapter Chapter 9 Using ContentProvider to Implement Chapter 9 Data Sharing 9.1 Data Sharing Standard: Introduction to ContentProvider 9.1.1 Introduction to ContentProvider 9.1.2 Introduction to Uri 9.1.3 Use ContentResolver to operate data 9.2 ContentProvider of the operating system 9.2.1 Use ContentProvider management Contact 9.2.2 Use ContentProvider to manage multimedia content 9.3 Implement ContentProvider 9.3.1 Steps to create ContentProvider 9.4 Monitor data changes of ContentProvider 9.4.1 Introduction to ContentObserver 9.5 Summary of this chapter Chapter 10 Service and Broadcast Chapter 10 Receiver 10.1 Introduction to Service 10.1.1 Create and configure Service 10.1.2 Start and stop Service 10.1.3 Bind local Service and communicate with it 10.1.4 Service life cycle 10.2 Cross-process call Service (AIDL service) 10.2.1 Introduction to AIDL service 10.2.2 Create AIDL file 10.2.3 Expose the interface to the client 10.2.4 Client access AIDLService 10.3 Telephone Manager (TelephonyManager) 10.4 SMS Manager (SmsManager) 10.5 Audio Manager (AudioManager) 10.5.1 Introduction to AudioManager 10.6 Vibrator (Vibrator) 10.6. 1 Introduction to Vibrator 10.6.2 Use Vibrator to control mobile phone vibration 10.7 Mobile alarm clock service (AlarmManager) 10.7.1 Introduction to AlarmManager 10.7.2 Set alarm clock 10.8 Receive broadcast messages 10.8.1 Introduction to BroadcastReceiver 10.8.2 Send broadcast 10.8.3 Ordered broadcast 10.9 Receive System broadcast message 10.10 Summary of this chapter Chapter 11 Multimedia application development 11.1 Audio and video playback 11.1.1 Use MediaPlayer to play audio 11.1.2 Use SoundPool to play sound effects 11.1.3 Use VideoView to play video 11.1.4 Use MediaPlayer and SurfaceView to play video 11.2 Use MediaRecorder records audio 11.3 Control the camera to take pictures 11.3.1 Take pictures through Camera 11.3.2 Record video clips 11.4 Summary of this chapter Chapter 12 OpenGL and 3D application development 12.1 Basic knowledge of 3D images and 3D development 12.2 Introduction to OpenGL and OpenGL ES 12.3 Drawing 2D graphics 12.3.1 Using OpenGL ES in Android applications 12.3.2 Drawing polygons on the plane 12.3.3 Rotation 12.4 Drawing 3D graphics 12.4.1 Building 3D graphics 12.4.2 Applying texture maps 12.5 Summary of this chapter Chapter 13 Android network applications 13.1 Based on Network communication of TCP protocol 13.1.1 Basics of TCP protocol 13.1.2 Use ServerSocket to create a TCP server 13.1.3 Use Socket for communication 13.1.4 Join multi-threading 13.2 Use URL to access network resources 13.2.1 Use URL to read network resources 13.2. 2 Use URLConnection to submit a request 13.3 Use HTTP to access the network 13.3.1 Use HttpURLConnection 13.3.2 Use Apache HttpClient 13.4 Use WebView to display web pages 13.4.1 Use WebView to browse web pages 13.4.2 Use WebView to load HTML code 13.5 Use Web Service for network programming 13.5 .1 Introduction to Web Service 13.5.2 Overview of Web Service Platform 13.5.3 Using Android Applications to Call Web Service 13.6 Summary of this Chapter Chapter 14 Managing Android Mobile Desktop 14.1 Managing Mobile Desktop 14.1.1 Deleting Desktop Components 14.1.2 Adding Desktop Components 14.2 Changing Mobile Phones Wallpapers 14.2.1 Developing Live Wallpapers 14.3 Desktop shortcuts 14.3.1 Creating shortcuts on the desktop 14.3.2 Adding shortcuts to Launcher 14.4 Managing desktop widgets 14.5 Live folders (LiveFolder) 14.5.1 Using live files Clip displays ContentProvider data 14.6 Summary of this chapter Chapter 15 Sensor application development 15.1 Using Android sensors 15.1.1 Developing sensor applications 15.1.2 Download and install SensorSimulator 15.1.3 Using SensorSimulator to develop sensor applications 15.2 Commonly used sensors in Android 15.2.1 Orientation sensor Orientation 15.2.2 Magnetic Field 15.2.3 Temperature sensor Temperature 15.2.4 Light sensor Light 15.2.5 Pressure sensor Pressure 15.3 Sensor application case 15.4 Summary of this chapter Chapter 16 GPS application development 16.1 Core API supporting GPS 16.2 Obtaining LocationProvider 16.2. 1 Get all available LocationProviders 16.2.2 Get the specified LocationProvider by name 16.2.3 Get the LocationProvider according to Criteria 16.3 Get positioning information 16.3.1 Send GPS information through the simulator 16.3.2 Get positioning data 16.4 Proximity warning 16.5 Summary of this chapter Chapter 17 Use Google Map service 17.1 Preparation for calling Google Map 17.1.1 Obtain Map API Key 17.1.2 Create AVD that supports Google Map API 17.2 Position on the map based on GPS information 17.3 GPS navigation 17.4 Position based on address 17.4.1 Address resolution and reverse address Analysis 17.4.2 Positioning based on address 17.5 Summary of this chapter Chapter 18 Crazy Lianliankan 18.1 Introduction to Lianliankan game 18.2 Developing game interface 18.2.1 Developing interface layout 18.2.2 Developing game interface components 18.2.3 Processing the connecting lines between blocks 18.3 Lianlian Look at the state data model 18.3.1 Define the data model 18.3.2 Initialize the game state data 18.4 Load the picture of the interface 18.5 Implement the game activity 18.6 Implement the game logic 18.6.1 Define the GameService component interface 18.6.2 Implement the GameService component 18.6.3 Get the touch Pointed block 18.6.4 Determine whether two blocks can be connected 18.6.5 Define the tool method to obtain the channel 18.6.6 Horizontal connection without turning point 18.6.7 Vertical connection without turning point 18.6.8 Connection with one turning point 18.6.9 Two Connections at turning points 18.6.10 Find the shortest distance 18.7 Summary of this chapter Chapter 19 Electronic Auction System 19.1 Introduction to system functions and architecture design 19.1.1 Introduction to system functions 19.1.2 System architecture design 19.2 Introduction to JSON 19.2.1 Creating objects using JSON syntax 19.2 .2 Create an array using JSON syntax 19.2.3 Java's JSON support 19.3 Tool class for sending requests 19.4 User login 19.4.1 Servlet to process login 19.4.2 User login 19.5 View unsold items 19.5.1 Servlet to view unsold items 19.5 .2 View unauctioned items 19.6 Manage item types 19.6.1 Browse item types Servlet 19.6.2 View item types 19.6.3 Add type Servlet 19.6.4 Add item types 19.7 Manage auction items 19.7.1 View your own auction items Servlet 19.7.2 View your own auction items 19.7.3 Servlet to add auction items 19.7.4 Add auction items 19.8 Participate in bidding 19.8.1 Select item type 19.8.2 Servlet to browse items according to type 19.8.3 Browse items according to type 19.8. 4 Servlets participating in the bidding 19.8.5 Participating in the bidding 19.9 Permission control 19.10 Summary of this chapter Software screenshot 1
Expand