Adt
Android develop tools, Android development tools (Eclipse plugin) The latest version of 23.xxx is not good. Some new controls are enforced by default.
Sdk
Standard Develop kits Standards Development Kit
Directory structure of the SDK
Add-ons, put in an extra tool. Google API, provide Google Maps jar Package * Build-tools compilation tool, Google SDK upgrade after use of directory * Docs document directory. Development documentation. * Extras add-on tool Support folder, providing backwards compatible jar packages. and extra drive, camera drive, mobile phone drive * Platform Development platform * Platform Tools development tool * Sample Instance code * Source Source code * System-image System Image * Tools Directory development tool
AVD
Android Virtual devices simulator
Screen resolution
vga:480 * 640 qvga:240 * hvga:480 * 854 wvga:480 *
Directory Structure of Android project
Source code * Gen Tool automatically generated code buildconfig debug switch default on R.java many static internal class * Android.jar development with JAR Package * Android dependence dependent, backwards compatible dependent jar Package * A Ssets Asset Catalog holds some other types of files * Bin Eclipse Tool compiled folder * Libs application development with JAR Package * RES Application resource * Androidmanifest.xml manifest file
Resolution Difference
L-lowm-middleh-high 72*72 x-xtra 144xx-super-Large 144
32:48:72:96:144 2:3:4.5:6:9
Process for Application Package installation
- Javac.exe compile. java files into a. class
- Turn the. dex File
\sdk\platform-tools\dx.bat 3. Package the file and application manifest file Manifest.xml in the Res directory to an APK 4. Upload apk to your phone and install and run
adb
Android Debug Bridge Android Debugging bridges (socket communication)
Common ADB directives
Installing a apk-r overlay installation
- ADB Uninstall < package name >
Uninstall an APK, the package name is the application's unique logo, a mobile phone can not have two application package name the same.
The Linux command line that comes directly to the mobile OS
Push: Import a file on your computer to the path of the file phone on your phone's adb push computer
Pull: Import the file from your phone into the path on the file on your computer's ADB pull phone
Ddms
ADT Plug-in functionality, provides a debug view Dalvik Debug Manager System
Four ways to click events
- Inner class implementation interface new implementation class
- Private class MyListener implements Onclicklistener
- {
- @Override
- public void OnClick (View v) {
- button-clicked Event
- SYSTEM.OUT.PRINTLN ("Call 110");
- Loosely coupled//machine code-->C language-->c++--->java (c+++)--->c#--> natural language//intention. Intent//tea-making and hitting soy sauce
- Intent Intent = new Intent ();
- Set actions to make calls
- Intent.setaction (Intent.action_call);
- Set data URI Uniform Resource Identifier URL Uniform Resource Locator network path HTTP FTP rstp//ITHEIMA://56
- Intent.setdata (Uri.parse ("tel://110")); Activating action startactivity (intent);
- }
- }
-
Anonymous inner class View.setonclicklistener (new Onclicklistener () {
-
@Override
-
public void OnClick (View v) {//click event
}});简单点击事件的实现 一般都用匿名内部类
-
Let the current activity implement interface extends activity implements Onclicklistener if the buttons are very numerous, it is recommended to use this method
-
Configure the Click event method in the layout file class to write the demo
Steps for Android App development
- Layout Write UI Layouts
- SRC Write the Java code
- Find the controls you care about
- Write click events to get Data
- Compile Run View results
Common UI Layouts
- Linear layout LinearLayout
Important attribute android:orientation= "horizontal" horizontal arrangement android:orientation= "vertical" vertical arrangement android:layoutwidth= "0dip" Android:layoutweight= "1" weight
Outdated set-top boxes
-
Table Layout Tablelayout
-
Frame Layout Framelayout
Android (Java) Learning Notes 162:android Development Basics