 Android- 
  


      Android-   ,     Eclipse  Android Studio,       .





 Android- 



  



    



  ,2020

  ,  ,2020



ISBN978-5-4483-0450-7

     Ridero







 Android-     Eclipse,   Android Studio.   Android Studio     ,  Eclipse   -    Java-    .

  Android-  Eclipse  Eclipse- Android Development Tools (ADT) (http://developer.android.com/sdk/eclipse-adt.html).

ADT-   Android-,  UI-     Android Framework API,  Android-   . apk .




 ADT 


  ADT-   Eclipse IDE for Java EE Developers  Help   Install New Software.   Work with:   Add,  Name:    ADT,  Location:  https://dl-ssl.google.com/android/eclipse/  ,   OK,  Install   Developer Tools   Next.








  ADT-   Eclipse     Android SDK Manager   AndroidSDK.








    Android SDK (http://developer.android.com/sdk/index.html)     SDK Tools, SDK Platform-tools,   AVD Manager SDK Manager.

 SDK Manager       Android SDK,    AVD Manager  URL- .

 SDK Manager     Eclipse   Android SDK Manager  Window  Java.

  SDK Tools    Android-.   SDK Platform-tools      Android-    Android Debug Bridge (adb),     Android-.  AVD Manager  GUI-     Android-,  Android-     Android.  Android Build Tools    Android-.

  Android-    Android-,    ,  ,  ,  .

,   SDK Manager,     Android-      Android-.          Android Support Library  Extras.

     Android-, ,     AndroidSDK.

  API Android-      ,    .

    API,   Android-   ,      .




 ADT-


   ADT-  New  File  Eclipse   Android,   :

Android Activity  ,   android.app.Activity   .

Android Application Project    Android-.

Android Icon Set     :

Launcher Icons ,  .

Action Bar and Tab Icons (Android 3.0+)         3.0.

Notification Icons    .

Pre-Android 3.0Tab Icons         3.0.

Pre-Android 3.0Menu Icons      3.0.

Android Object   ,   Activity, Widget, Fragment, Receiver, Provider, Service .

Android Project from Existing Code   .

Android Sample Project     SDK Manager   Samples for SDK,      Android-.

Android Test Project   Android-       Android testing framework,     JUnit.

Android XML File     :

Layout XML- GUI- Activity-.

Values XML-,    , ,   ,  .

Drawable XML-,    .

Menu XML-,   .

Color List XML-,       GUI-.

Property Animation XML-,    .

Tween Animation XML-,   View- (, ,  ).

AppWidgetProvider XML-,      App Widget,      Home Screen.

Preference XML- GUI- PreferenceActivity-,    .

Searchable XML-,   GUI- .

Android XML Layout File   Android XML File | Layout.

Android XML Values File   Android XML File | Values.

Template Development Wizard      template.xml.








  ADT-,    Package Explorer   :

Run As | Android Application  Android-   ,   AVD Manager.

Run As | Android JUnit Test     Android-    .

Android Tools | New Test Project   Android Test Project     Android-.

Android Tools | New Resource File   Android XML File   .

Android Tools | Export Signed Application Package   Export Android Application       Android-.

Android Tools | Export Unsigned Application Package     APK- Android-.

Android Tools | Display dex bytecode  Eclipse-   ,  DEX-,        Java -     Dalvik   Android.

Android Tools | Rename Application Package   .

Android Tools | Add Support Library   SDK Manager      Android Support Package,   API,   API  Android-.     Android Support Package     Extras  SDK Manager,   libs  ,     extras\android\support  Android SDK       Build Path | Configure Build Path    Package Explorer.

Android Tools | Fix Project Properties    Android-    ,      .

Android Tools | Run Lint: Check for Common Errors  Android-         Lint Warnings.

Android Tools | Clear Lint Markers   Lint Warnings.

Android Tools | Add Native Support   AndroidNDK.

  Windows Workbench-   Android SDK Manager, AVD Manager Run Android Lint,       SDK Tools  Android-    .        Workbench-.

ADT-   Eclipse  DDMS, Hierarchy View, Pixel Perfect, Tracer for OpenGL ES XML.




DDMS


 DDMS    Dalvik Debug Monitor Server  SDK Tools   GUI-   Eclipse-,       Android-.

 DDMS   Devices, Emulator Control, LogCat, Threads, Heap, Allocation Tracker, Network Statistics, System Information File Explorer.

 Devices   Android-.    Android- Devices-     ,        Dalvik.       Android- ,       .     Dalvik    Linux,     Linux-,   Devices   .     Devices   ,  DDMS-    Eclipse-  Dalvik-   JDWP (Java Debug Wire Protocol).  Eclipse-    8700,     Dalvik-  . DDMS-   Android-   Android Debug Bridge (adb),  - . DDMS-  adb-,   adb- ( ,  Android-)  adb-.








   Devices   :

(Debug the selected process, )  ,  Android-   Eclipse , Eclipse-,      Debug.








(Update Heap)       .








(Dump HPROF file)      HPROF-.   Android-  2.1   HPROF-   SD- ,   <uses-permission http://www.eclipse.org/mat/).rmission. WRITE_EXTERNAL_STORAGE/>   AndroidManifest. xml Android-.  HPROF-    Eclipse- Memory Analyzer (MAT) (android:name="android.pe








(Cause GC)   ,       .








(Update Threads)       .








(Start Method Profiling) (Stop Method Profiling)        Trace-,      Traceview-,      : Timeline Panel           , Profile Panel    .   Android-  2.1   Trace-   SD- ,   <uses-permission android:name="android.permission. WRITE_EXTERNAL_STORAGE/>   AndroidManifest. xml Android-.   Traceview   traceview  SDK Tools.























(Stop Process)   .








(Screen Capture)   Device Screen Capture,      Android-.








(Dump View Hierarchy for UI Automator)   GUI-      Tablet- API 16,      GUI-     GUI-.     uiautomatorviewer  AndroidSDK.








(Capture system wide trace using Android systrace)   Android 4.1(API Level 16)    ,       HTML-.








(Start OpenGL Trace)   Android 4.1(API Level 16)     OpenGL ES .








    Devices,   ,   Reset adb,   adb-.

 Emulator Control      Android-  , SMS- .








 Voice: Data:  Telephony Status  Emulator Control    GPRS-:

unregistered  .

home  .

roaming  .

searching  .

denied    .

 Speed:  Telephony Status  Emulator Control      :

GSM 14.4\.

HSCSD 14.443.2\.

GPRS 40.080.0\.

EDGE 118.4236.8\.

UMTS 128.01920.0\.

HSDPA 348.014400.0\.

Full  .

 Latency:  Telephony Status  Emulator Control     :

GPRS 150550.

EDGE 80400.

UMTS 35200.

None  .

 Telephony Actions  Emulator Control      SMS-.

 Location Controls  Emulator Control    Android-  ( Manual)    GPS eXchange ( GPX) Keyhole Markup Language ( KML).

 LogCat      Android-,     Console   ,    Android-  .

LogCat-    ,   Level ( ), Time (  ), PID (Linux- ), Application (  ), Tag (  ,   ), Text ( ).     LogCat     , ,    .

 Threads      .      Devices     Update Threads    Devices.

Threads-      .            :

ID Dalvik- ࠖ  ,  3.  *.

TID Linux- .

Status  :

Wait   Object. wait().

Native  .

Vmwait  Dalvik-.

Runnable   .

TimedWait     .

utime      ( 10.).

stime      ( 10.).

Name  .

        ,  , , ,   .

 Heap       .     Heap-   Devices     Update Heap,   Cause GC    Devices.

 Heap   .          ID ( ), Heap Size (   ), Allocated (   ), Free (   ), %Used (  ) #Objects (  ),    Cause GC   .

       .            .








 Allocation Tracker     ,    .           Devices     Start Tracking  Allocation Tracker,   Get Allocations.      Allocation Tracker   ,     Start Tracking    Get Allocations,   ,  ,  ,        ,  , , ,   .

 Network Statistics       .

 System Information     .

 File Explorer    Android-    ,     .

  DDMS-    Android | DDMS  Preferences  Window,     ,  DDMS-      Eclipse-  Dalvik-  JDWP,       ,  HPROF-     Eclipse,   adb-, adb-   Android- .









 Hierarchy View Pixel Perfect


 Hierarchy View Pixel Perfect   hierarchyviewer  SDK Tools   GUI-   Eclipse-,    GUI- Android-.

 Hierarchy View   Windows, View Properties, Tree View, Tree Overview, Layout View.








 Windows    Android-,      Activity-,      , GUI-    Android-.

 Tree View   GUI-    Activity-.     GUI-   Tree View,  Windows   Activity-    Load the view hierarchy into the tree view   Windows-.    Tree View   View- .








  Tree View     , ,   Filter byclass or id:.    Tree View      PNG-,  PSD-,   View-   .

 Tree Overview     Tree View      Tree Overview.

 Layout View    GUI-.      Tree View   GUI-     Layout View.    View-   Tree View,         GUI-   View-,  ,    .     View-    View Properties.

    GUI-       .

 Pixel Perfect   Windows, Pixel Perfect Tree, Pixel Perfect Loup Pixel Perfect.








 Windows    Android-  .      Inspect ascreenshot inthe pixel perfect view    Windows    Android-   Pixel Perfect Loup Pixel Perfect.   Pixel Perfect Tree   View- GUI- ,   .   View-  Pixel Perfect Tree,       Pixel Perfect.








 Pixel Perfect Loup  ,    ,   ,   HTML-  ,  RGB- .   Pixel Perfect Loup     .  Zoom      Android-.

 Pixel Perfect   ,          Pixel Perfect Loup .   Pixel Perfect   ,    Pixel Perfect       PNG-,       ,   GUI- ,          Overlay:  Pixel Perfect Loup.

      Android-     GUI-  Android-.




Wizard  ADT 


 Android Project

  Android-   Eclipse  ADT-  File   New | Other | Android | Android Application Project   Next.

  ,  ,  ,  .    SDK,   SDK,  SDK     ,     Next.    Create custom launcher icon Create activity   Next.      Next.   Activity-   Next:

Blank Activity   Hello world!.

Blank Activity with Fragment    Hello world!.

Empty Activity     Hello world!.

Fullscreen Activity ,        .

Master/Detail Flow    .

Navigation Drawer Activity   ,   .

Tabbed Activity    :   Swipe Views (ViewPager),    Action Bar Tabs (with ViewPager),    Action Bar Spinner.

  Activity-,    res/layout/activity_main. xml   Finish      Android-.

  Android-     ,   ࠖ   main (),   . Android-      ,     AndroidManifest. xml   :

Activity   android.app.Activity,      Android-   GUI-.

Service   android.app.Service,      GUI-.

BroadcastReceiver   android.content.BroadcastReceiver,        Android-      .

ContentProvider   android.content.ContentProvider,     .

  ADT-   Android-     Activity-.








   Android-,   Eclipse,     Package Explorer:

src   ,   android.app.Activity.

gen  R-,    aapt  SDK Platform-tools       ,   BuildConfig,   DEBUG,   true     .       DEBUG   false.

Android .  Android-,    .

Android Private Libraries   android-support,      AndroidAPI.

ssets      ,      android.content.res.AssetManager.     res  ,       ,    res    R-.

bin   .

libs  JAR-  android-support.

res   ,     R-,    :

animator XML-    .

color XML-,    View-.

drawable PNG, JPEG, GIF, 9-PNG XML-,  .

layout XML-    GUI- Activity-.

menu XML-,   .

raw           MP3 Ogg.

values XML-   , , ,  .,  ,   -.

xml    XML-.

AndroidManifest. xml   ,   Android-   Android  Android- ,  ,   API Android-,    ,   Android- .

ic_launcher-web.png     Google Play Store.

proguard.cfg   proguard  SDK Tools,  ,   .

project.properties   .

 Android-    ,       Android-.   Android-     ssets  Android-        Android- ,  .

  Android-   Package Explorer      Android-     Properties.   Android   Is Library  OK.








   Android-  Android-   Package Explorer      Android-     Properties.   Android   Add  Android-.

   Package Explorer Android-   Library Projects,   JAR- Android-,      .




 Android-  Eclipse


     Run As | Android Application    Package Explorer   Android-   ,      Android-,    Android-.

  Android-  Android-       .       ,        USB.         .    Eclipse   ,    Devices ( Window | Show View | Android | Devices).

  Android-   Run As | Run Configurations    Package Explorer    Target   Always prompt topick device.   Run,  Android Device Chooser     OK.   Android-     Android-.   Screen Capture    Devices      Android-.













  Android- Android-    AVD Manager    Android-  Android Virtual Devices   Create:

  AVDName:   .

  Device:   .

  Target:   Android- .

  CPU/ABI:   .

  Skin:   ࠖ        Android-.

  Front Camera: Back Camera:   .

  Memory Options:       ,     Android-.

  Internal Storage: SD Card:     /   .  File:  SD Card:      ,    mksdcard  SDK Tools.

  Emulation Options:   Snapshot      ,        ,   Use Host CPU    ,      CPU .

Ƞ  OK.    Android Virtual Device Manager    ,     Start.













 Create Device  Device Definitions      Device.

   Start     Launch Options   , :

 Launch from snapshot Save tosnapshot     Snapshot  Emulation Options:        .

 Scale display toreal size         .

 Wipe user data         ,      Launch from snapshot.

     Launch  Launch Options.








  AVD Manager      [user]\.android\avd   .        ,   .  ,      ,       .

      .








  Android-  Android-   Run As | Android Application    Package Explorer.

   Android-  bin Android-   :

 classes  Java -,    R-.

 dexedLibs  DEX-   Dalvik  .

 res  .

  AndroidManifest.xml.

  resources.arsc  .

 classes.dex  DEX-   Dalvik Java -.

APK-렖 ZIP- Android-    ,   META-INF Java- MANIFEST. MF ,  res ,   AndroidManifest. xml,  resources.arsc  classes.dex.




  Android-


  Android    ,   Android-      ,       .        Android SDK      ,      debug.keystore  [user]\.android.       365       debug.keystore     .

    Android-   Android-,     Android   ,   ,    Android Tools | Export Signed Application Package    Package Explorer    Export Android Application,  Project:     Android-      Next.

      ,       Android-.        Android-,   Android-      ,             ,        .  ,          ,       ,     .

      Export Android Application   Create new keystore,  Location:    ,  Password: Confirm:      Next.



  Location:    Browse      , , C:\Users\user\my_keystore,   my_keystore  .

  Alias:   ,  Password: Confirm:   ,  Validity (years):      25,  First and Last Name:      Next,  Destination APK file:   APK- Android-   Finish.

        ,      zipalign  SDK Tools.









Activity-


  Android Project  Android- Blank Activity  src  Package Explorer     Activity-,   ,   android.app.Activity,   onCreate().

       Activity-,    Android    Activity-      .   onCreate ()  ,       Activity-    GUI-.

  onCreate ()  android.app.Activity        :

onRestart   ,     Activity-  ,    onStart.

onStart   , ,  Activity-  .

onResume   , ,  Activity-      .

onPause   , ,  Activity-   .       onResume,  Activity-    ,   onStop,  Activity-  .

onStop   , ,  Activity-  .       onRestart   onDestroy.

onDestroy   ,    Activity-    finish  android.app.Activity  Android-   .

onActionModeFinished        ActionMode.

onActionModeStarted       ActionMode  Activity-.

onActivityResult    Activity-  startActivityForResult     Activity-     .

onAttachFragment     Fragment  Activity      Fragment. onAttach Fragment. onCreate.

onAttachedToWindow     Activity- Window-,       onCreate.

onBackPressed      Back.

onConfigurationChanged        Activity-,        android.content.res.Configuration.

onContentChanged    GUI- Activity-    setContentView.

onContextItemSelected      .

onContextMenuClosed     .

onCreateContextMenu      ,      GUI-.

onCreateDescription     onPause.

onCreateNavigateUpTaskStack     .

onCreateOptionsMenu     頖 ,   Activity-.

onCreatePanelMenu      (    ).

onCreatePanelView     .

onCreateThumbnail     onPause    Activity- , .

onCreateView     GUI-.

onDetachedFromWindow     Activity- Window-.

onGenericMotionEvent     MotionEvent.

onKeyDown     KeyEvent   .

onKeyLongPress     KeyEvent   .

onKeyMultiple     KeyEvent     .

onKeyShortcut     KeyEvent    .

onKeyUp     KeyEvent   .

onLowMemory     ,        ,      .

onMenuItemSelected     .

onMenuOpened    .

onNavigateUp    Up.

onNavigateUpFromChild ,   Activity-  Up-.

onNewIntent    Activity-  Android-      Activity-    ,   android: launchMode=singleTop  ,    Android-   startActivity  FLAG_ACTIVITY_SINGLE_TOP Intent-,     Activity-.

onOptionsItemSelected      .

onOptionsMenuClosed     .

onPanelClosed     .

onPostCreate     onRestoreInstanceState.

onPostResume     onResume.

onPrepareNavigateUpTaskStack     .

onPrepareOptionsMenu     .

onPreparePanel     .

onProvideAssistData ,    .

onRestoreInstanceState    onStart    Activity-  android. os.Bundle.

onSaveInstanceState    Activity-,   , Android-    .       Activity-  android. os.Bundle   -.   Bundle  Android-  onCreate (Bundle) onRestoreInstanceState (Bundle).

onSearchRequested    .

onTouchEvent     MotionEvent   .

onTrackballEvent     MotionEvent   .

onTrimMemory      .

onUserInteraction    .

onUserLeaveHint ,  Activity-      .

onWindowAttributesChanged     .

onWindowFocusChanged       .

onWindowStartingActionMode     ActionMode  .

     android.app.Activity,      onPause (),     Activity-      Activity-,   Android-      ⠖ Android-    Activity-    .

  onPause ()   ,        ,  ContentProvider-,        SharedPreferences (  -   ),  openFileOutput ()  android.content.Context (    ),  getCacheDir ()  android.content.Context ( ),  getExternalStorageDirectory ()  android. os.Environment (   ),     SQLite, Web-   java.net.*  android.net.*.

  onPause ()    Activity-   ,    onSaveInstanceState (),    onSaveInstanceState ()   Android-,  Activity-   , ,   BACK.

  onCreate (), onStart (), onRestart (), onResume (), onPause (), onStop (), onDestroy () .        super.

   onCreate ()  Activity-   Android-   setContentView ()  android.app.Activity,  GUI- Activity-  XML- activity_main. xml   res/layout .

   onCreateOptionsMenu ()  Activity-   Android-  getMenuInflater ()   android.view.MenuInflater,     XML-.

  onOptionsItemSelected ()  Activity-   Android-      .




Layout- ADT-


  XML- GUI- Activity- ADT-    .








Layout- ADT-   Graphical Layout    GUI- XML-,   Layout-.

XML- Layout-   Android- Blank Activity  GUI-,  RelativeLayout-,  TextView-.

RelativeLayout-   android.widget.RelativeLayout,     android.view.View      .

 View-  XML-.

 android: layout_above android: layout_below        .

 android: layout_toLeftOf, android: layout_toStartOf android: layout_toRightOf, android: layout_toEndOf        .

 android: layout_alignLeft, android: layout_alignStart, android: layout_alignRight, android: layout_alignEnd, android: layout_alignBottom, android: layout_alignTop       .

 android: layout_alignBaseline       .

 android: layout_alignParentBottom, android: layout_alignParentEnd, android: layout_alignParentTop, android: layout_alignParentStart, android: layout_alignParentLeft, android: layout_alignParentRight   , ,     .

 android: layout_alignWithParentIfMissing  true       .

 android: layout_centerHorizontal, android: layout_centerInParent, android: layout_centerVertical     ,      .

 android: layout_marginBottom, android: layout_marginEnd, android: layout_marginLeft, android: layout_marginRight, android: layout_marginStart, android: layout_marginTop   .

 android: layout_height android: layout_width   ,    FILL_PARENT, MATCH_PARENT WRAP_CONTENT    ,      .       px (), dp ( , px = dp * (dpi / 160)), sp ( ,    ), in(), mm ().

TextView-   android. widget. TextView,    . XML- android: layout_height android: layout_width  wrap_content    ,    . XML- android: text  @string/hello_world          strings. xml Android-  hello_world.







 Any  Graphical Layout ,   Android-    .








  Android-  Package Explorer           New | Other | Android | Android XML Values File   Next.     File:    strings. xml   Next,  Optional: Choose aspecific configuration tolimit the XML to:  Language   ->.   Language  ru   Finish.    res     values-ru  strings.xml.








  Values- Android- ADT-     ,   Resources    XML-,   Values-.








    Android-   strings. xml  res/values-ru    Add  Resources,     String   OK.   Name    hello_world,  Value   !.     Add  Resources,     String   OK.   Name    app_name,  Value    .  ,  strings. xml  res/values    .

  activity_main. xml   res/layout Android- ,   Locale  Graphical Layout    Russian (ru) ( ) b Other ( ),       GUI-  Graphical Layout     TextView-.








   Android-      Run As | Android Application    Package Explorer,   Home Settings    Language & keyboard,  Select locale  頖  Android-   GUI-  .

,     Android-    Add New Translation  Locale,   ,   Language    ,  New Translation     .









  Graphical Layout


 Android  Graphical Layout     GUI-    Android-.








  Configuration  Graphical Layout     GUI-    ,   ,  ,  .  Manual Previews   Add As Thumbnail      .








 Create New  Configuration  Graphical Layout      activity_main. xml  GUI- Activity-    Android-.   Android-   Android-      Layout-.  Create New    Android-:








Country Code Network Code    .

LTR layout-direction-left-to-right ( ldltr)    .

sw [n] dp  Layout-  res/layout-sw [n] dp     ndp.

w[n] dp  Layout-  res/layout-w [n] dp    ndp.

h [n] dp  Layout-  res/layout-h [n] dp    ndp.

Small, Normal, Large, Xlarge  Layout-  res/layout- [small, normal, large, xlarge]     320x426, 320x470, 480x640, 720x960.

Long, Not Long  Layout-  res/layout-long res/layout-notlong    WQVGA, WVGA, FWVGA   QVGA, HVGA,VGA.

Portrait, Landscape  Layout-  res/layout-port res/layout-land     .

Not Night, Night  Layout-  res/layout-notnight res/layout-night     .

Low Density, Medium Density, High Density, Extra High Density, TV Density  Layout-  res/layout-ldpi, res/layout-mdpi, res/layout-hdpi, res/layout-xhdpi, res/layout-tvdpi    120dpi, 160dpi, 240dpi, 320dpi, 213dpi.

Finger  Layout-  res/layout-finger   .

Soft  Layout-  res/layout-keyssoft    .

No Keys  Layout-  res/layout-nokeys     .

Hidden, Exposed  Layout-  res/layout-navhidden, res/layout-navexposed     .

None, Trackball  Layout-  res/layout-nonav, res/layout-trackball  ,      ,   .

800x480  Layout-  res/layout-1280x800    1280x800.

API 18  Layout-  res/layout-v18   Android- 4.3.

      GUI-    .








       GUI-      (Portrait Landscape),  ,   ,   ,   (Normal, Car Dock, Desk Dock, Television, Appliance),  Android-,     (Day Time Night Time).








      GUI-     .








       android: theme="@style/AppTheme  <application>   AndroidManifest. xml  res/values/styles.xml.

 Activity-     android: theme="@style/ActivityTheme  <activity>   AndroidManifest. xml  res/values/styles.xml.

  Activity-      GUI-  Android-. ,    Theme. Dialog, Activity-    ,    .

  Graphical Layout,     ,     android: layout_width, android: layout_height .  ,     -  .

Palette-  Graphical Layout    GUI- Activity- View-    Palette-     GUI-.

 ,  Graphical Layout   ,       View-     GUI-,        View-.




  AndroidManifest. xml ADT-


   AndroidManifest. xml ADT-     .








  AndroidManifest. xml ADT-   Manifest, Application, Permissions, Instrumentation AndroidManifest.xml.

   Manifest Application   Android-,    Android-.

 Manifest ADT-  AndroidManifest. xml    :

Package    Android-,   package  <manifest>.

Version Code   Android-,   android: versionCode  <manifest>.

Version name  ,    Android-,   android: versionName  <manifest>.

Shared user id        Android-,               ,   android: sharedUserId  <manifest>.

Shared user label    sharedUserId-,   android: sharedUserLabel  <manifest>.

 Manifest Extras   Add     :

<uses-sdk> ( Uses Sdk)    Android-.

<supports-screens> ( Supports Screens)   Android-  .

<uses-configuration> ( Uses Configuration) ,       Android-.

<uses-feature> ( Uses Feature)    Android-,       Android-.

<protected-broadcast> ( Protected Broadcast)  Broadcasts-,     Android-.

<compatible-screens> ( Compatible Screens)   Android Market    ,   <screen> ( Screen  Add).

<original-package> ( Original Package)     .

<package-verifier> ( Package Verifier)    ,   PackageManager-    . PackageManager-  Broadcast- ACTION_PACKAGE_NEEDS_VERIFICATION  ,    BroadcastReceiver-   .

Exporting   Use the Export Wizard Export an unsigned APK,        Android-.

Links   Application (  Application ), Permission (  Permission ), Instrumentation (  Instrumentation ), XML Source (  AndroidManifest. xml ), Documentation (    ).

 Application ADT-  AndroidManifest. xml    <application>     Application Toggle, Application Attributes Application Nodes.

 Application Toggle  Application   application     <application>  Define an <application> tag inthe AndroidManifest. xml   <application>  .

 Application Attributes  Application    <application>    :

Name      Java-,   android. app. Application.  Application-     android: name  <application>.     Activity-,             Application-.    Android-    Application-      .   Application-  Singleton-     .

Theme   Activity- ,     android: theme  <application>.       res/values ,   New | Other | Android | Android XML Values File    Package Explorer,    <style>,   Browse  Theme      <application>   android: theme.

Label    ,    android: label  <application>.  Browse  Label        res/values,   <string>.

Icon  ,    android: icon  <application>.  Browse  Icon        ,   res/drawable.  drawable    ldpi, mdpi, hdpi, xhdpi, nodpi tvdpi,      .

Logo    android: logo  <application>,       ActionBar.

Description   ,     android: description  <application>     .  Browse  Description        res/values,   <string>.

Permission    ,     Android-    Android- ,    android: permission  <application>.

Process    android: process  <application>,    .        Android-,    sharedUserId-   ,     android: process         .

Task affinity    android: taskAffinity  <application>,      Activity- ,    . Task-    Activity-,       ,   Activity-    , ,   Activity-    Activity-.

Allow task reparenting    android: allowTaskReparenting  <application>  true,  Activity-    ,   ,   ,  Activity-   taskAffinity-,  false.

Has code    android: hasCode  <application>  false,    Java-,      NDK API,  true.

Persistent    android: persistent  <application>  true,     ,   ,    ,  false.

Enabled    android: enabled  <application>  false,  Android-     ,  true.

Debuggable    android: debuggable  <application>. Android-  ADT-     true     ,    false,    .

Vm safe mode    android: vmSafeMode  <application>  true,  JIT- .

Hardware accelerated    android: hardwareAccelerated  <application>  true,     ,  false.

Manage space activity    android: manageSpaceActivity  <application>,   Activity-,          |   Android-.

Allow clear user data    android: allowClearUserData  <application>     ,    .

Test only    android: testOnly  <application>  true,         Android-.

Backup agent    android: backupAgent  <application>,   ,   android.app.backup.BackupAgent,    Backup Manager    ,   ,        Android- .

Allow backup    android: allowBackup  <application>  false,     Backup Manager,  true.

Kill after restore    android: killAfterRestore  <application>   .

Restore needs application    android: restoreNeedsApplication  <application>   .

Restore any version    android: restoreAnyVersion  <application>  true,   Backup Manager      ,       ,  false.

Never encrypt    android: neverEncrypt  <application>  true,       .

Large heap    android: largeHeap  <application>  true,       .

Cant save state    android: cantSaveState  <application>  true,       - Android-  .    ,      ,     .

Ui options    android: uiOptions  <application>,    GUI- Activity-    : none (,   ) splitActionBarWhenNarrow (  ActionBar,     ).

Supports rtl    android: supportsRtl  <application>  true,    right-to-left (RTL)   .

 Application Nodes  Application  Add    <application>  <activity> ( Activity), <activity-alias> ( Activity Alias), <meta-data> ( Meta Data), <provider> ( Provider), <receiver> ( Receiver), <service> ( Service), <uses-library> ( Uses Library).

 Add    <activity>, <receiver> <service>  <intent-filter> ( Intent Filter) <meta-data> ( Meta Data),    <intent-filter>    Add  <action> ( Action), <category> ( Category), <data> ( Data).

  <provider>  Add   <grant-uri-permission> ( Grant Uri Permission), <meta-data> ( Meta Data), <path-permission> ( Path Permission).

 <activity> ( Activity)  Activity-  (,   android.app.Activity).    Activity  Add,  Application   Attributes for Activity,     <activity>    :

Name      Java-,   android.app.Activity.  Activity-     android: name.

Theme   Activity- ,     android: theme.

Label    Activity-,    android: label.

Icon  Activity-,    android: icon.

Logo    android: logo,       ActionBar.

Launch mode      android: launchMode,   Activity-    Intent-:

standart () Android-     Activity-     Intent-.

singleTop   Activity-      ,   onNewIntent ()   ,     Activity-.

singleTask Android-    Activity-     Intent-.   Activity-  ,     onNewIntent (),     Activity-.

singleInstance   singleTask,  ,       Activity-.

Screen orientation      android: screenOrientation,    Activity- :

unspecified ()   Android-.

user    .

behind  ,   Activity-.

landscape  () .

portrait  () .

reverseLandscape  ()   .

reversePortrait  ()   .

sensorLandscape  () ,    Android-  .

sensorPortrait  () ,    Android-  .

sensor   Android-  .

fullSensor   Android-     landscape, portrait, reverseLandscape reversePortrait.

nosensor   .

Config changes  Select     android: configChanges,   ,   Activity- ,    onConfigurationChanged():

mcc  MCC- .

mnc  MNC- .

locale   .

touchscreen   .

keyboard    .

keyboardHidden   .

navigation    .

screenLayout   .

fontScale   .

uiMode    (  ).

orientation   .

screenSize       .

smallestScreenSize        .

Permission    ,     Android-   Activity-,    android: permission.

Multiprocess    android: multiprocess  true,  Activity-   ,    Android-.

Process    android: process,   ,   Activity-.

Task affinity    android: taskAffinity,   ,   Activity-  FLAG_ACTIVITY_NEW_TASK.

Allow task reparenting    android: allowTaskReparenting  true,  Activity-   ,   ,   ,  Activity-   taskAffinity-,  false.

Finish on task launch    android: finishOnTaskLaunch  true,    Activity- ,      ,  false.

Finish on close system dialogs    android: finishOnCloseSystemDialogs  true,  Activity-     ,     HOME    .

Clear task on launch    android: clearTaskOnLaunch  true,      ,    Activity-   Activity-,  false.

No history    android: noHistory  true,  Activity-    ,    ,  false.

Always retain task state    android: alwaysRetainTaskState  true,  Android-     Activity-,    ,  false.

State not need    android: stateNotNeeded  true,   onSaveInstanceState () Activity- ,   onCreate ()     null,  false.

Exclude from recents    android: excludeFromRecents  true,  Activity-     Activity-,       HOME ,  false.

Enabled    android: enabled  false,  Android-    Activity-,  true.

Exported    android: exported  true,  Activity-    Android-,  false,  Activity-    Android-       sharedUserId-.

Window soft input mode  Select     android: windowSoftInputMode,    Activity-    :

stateUnspecified ()        Android-.

stateUnchanged      .

stateHidden        Activity-.

stateAlwaysHidden    .

stateVisible        Activity-.

stateAlwaysVisible    .

adjustUnspecified ()   Activity-               Activity-    Android-.

adjustResize  Activity-        .

adjustPan     Activity-,   .

adjustNothing  Activity-    .

Immersive    android: immersive  true,  Activity-   Activity- .

Hardware accelerated    android: hardwareAccelerated  true,     ,  false.

Ui options    android: uiOptions,    GUI- Activity-   : none (,   ) splitActionBarWhenNarrow (  ActionBar,     ).

Parent activity name    android: parentActivityName,    Activity-,     Activity-      Up.

 <intent-filter> ( Intent Filter)    android.content.IntentFilter,   Android-   (  )  android.content.Intent   Android-.    Intent Filter  Add,  Application   Attributes for Intent Filter,     <intent-filter>   :

Label    android: label,     Android-,    Intent-.

Icon    android: icon,   Android-,    Intent-.

Logo    android: logo,    ActionBar Android-,    Intent-.

Priority    android: priority,      Intent-  ,   Android-  Intent-.

  <action> ( Action)  <intent-filter>   Intent-,  Android-.    Action  Add,  Application   Attributes for Action,     <action>   Name,    android.intent.action.*    android: name.

  <category> ( Category)  <intent-filter> ,    Android-,    Intent-.    Category  Add,  Application   Attributes for Category,     <category>   Name,    android.intent.category.*    android: name.

  <data> ( Data)  <intent-filter> ,      Intent- Android-.    Data  Add,  Application   Attributes for Data,     <data>   Mime type ( android: mimeType  MIME-  Intent-), Scheme, Host, Port, Path, Path prefix, Path pattern (URI-   scheme://host: port/path,  android: scheme, android: host, android: port, android: path, android: pathPrefix, android: pathPattern).

 <meta-data> ( Meta Data)     Android-,      :

ApplicationInfo ai = getPackageManager().getApplicationInfo(activity.getPackageName (), PackageManager.GET_META_DATA);

Bundle bundle = ai.metaData;

String myValue = bundle.getString (myKey);

   Meta Data  Add,  Application   Attributes for Meta Data,     <meta-data>   Name ( android: name    ), Value ( android: value    ), Resource ( android: resource   ).

 <activity-alias> ( Activity Alias)    Activity-   , ,  Intent-.    Activity Alias  Add,  Application   Attributes for Activity Alias,     <activity-alias>   :

Name ( android: name     Activity-),

Target activity ( android: targetActivity    Activity-),

Label ( android: label   ),

Description ( android: description   ),

Icon ( android: icon   ),

Logo ( android: logo    ActionBar),

Permission ( android: permission  ,     Android-   Activity-  ),

Enabled ( android: enabled      Activity-  ),

Exported ( android: exported     Activity-  Android-  ).

Parent activity name    android: parentActivityName,    Activity-,     Activity-      Up.

 <provider> ( Provider)  ContentProvider-  (,   android.content.ContentProvider),    .    Provider  Add,  Application   Attributes for Provider c  ,     <provider>.

  Name      Java-,   android.content.ContentProvider.  ContentProvider-     android: name.

 Label, Description, Icon, Logo, Process, Permission, Multiprocess, Enabled, Exported  Provider      Activity  Application Nodes  Application.

 Authorities  Provider    android: authorities  <provider>,     URI-,   Android- ContentProvider-.

 Syncable    android: syncable  <provider>  true,   ContentProvider-   .

 Read permission  Write permission    android: readPermission android: writePermission,  ,      ContentProvider-.

 Grand URI permissions    android: grantUriPermissions  true,  ,  ContentProvider- Intent-  FLAG_GRANT_READ_URI_PERMISSION FLAG_GRANT_WRITE_URI_PERMISSION,    .

 Init order    android: initOrder,     ContentProvider- .

  <grant-uri-permission> ( Grant Uri Permission)  <provider>  URI- ContentProvider-,        ,   Path, Path prefix Path pattern,    android: path, android: pathPrefix android: pathPattern.

  <path-permission> ( Path Permission)  <provider>   URI- ContentProvider-      ,   Path, Path prefix,Path pattern, Permission, Read permission, Write permission,    android: path, android: pathPrefix, android: pathPattern, android: permission, android: readPermission android: writePermission.

 <receiver> ( Receiver)  BroadcastReceiver-  (,   android.content.BroadcastReceiver),   Intent-,    Android-   .    Receiver  Add,  Application   Attributes for Receiver c  ,     <receiver>.   Name      Java-,   android.content.BroadcastReceiver.  BroadcastReceiver-     android: name.

 Label, Description, Icon, Logo, Process, Permission, Enabled, Exported  Receiver      Activity  Application Nodes  Application.

 <service> ( Service)  Service-  (,   android.app.Service),        GUI-.    Service  Add,  Application   Attributes for Service c  ,     <service>.   Name      Java-,   android.app.Service.  Service-     android: name.  Label, Description, Icon, Logo, Process, Permission, Enabled, Exported  Service      Activity  Application Nodes  Application.

 Stop with task  Service    android: stopWithTask  <service>  true,           ,  false.

 Isolated process  Service    android: isolatedProcess  true,      ,   ,     .

 <uses-library> ( Uses Library)  Android-,     .    Uses Library  Add,  Application   Attributes for Uses Library c  ,     <uses-library>.  Name    android: name,   Android-,   ,  Required   android: required  true (),           .

 Permissions ADT-  AndroidManifest. xml   Add    <manifest>  <permission> ( Permission), <permission-group> ( Permission Group), <permission-tree> ( Permission Tree), <uses-permission> ( Uses Permission).

 <permission> ( Permission)    ,        Android-  .    Permission  Add,  Permissions   Attributes for Permission c  ,     <permission>.

 Name, Label, Description, Icon Logo    android: name, android: label, android: description, android: icon android: logo,  , , ,    .

 Permission group    android: permissionGroup,   ,    .

 Protection level    android: protectionLevel,   ,    :

normal     , Android-, .

dangerous    , ,    .

signature Android-      ,        ,   ,    .

signatureOrSystem       ,   ,  ,    .

system     .

development     ,  .

 <permission-group> ( Permission Group)    .    PermissionGroup  Add,  Permissions   Attributes for Permission Group c  ,     <permission-group>.

 Name, Label, Description, Icon Logo    android: name, android: label, android: description, android: icon android: logo,  , , ,     .

 Priority    android: priority,    Intent-.

 <permission-tree> ( Permission Tree)     ,         addPermission ()  android.content.pm.PackageManager.    PermissionTree  Add,  Permissions   Attributes for Permission Tree c ,     <permission-tree>.  Name, Label, Icon Logo    android: name, android: label, android: icon android: logo,   , ,      .

 <uses-permission> ( Uses Permission)         ,    android: name      Name  Attributes for Uses Permission  Permissions.

 Instrumentation ADT-  AndroidManifest. xml   Add    <manifest>  <instrumentation>,      Android- (  Android-    Android Test Project).

  ADT-   Android- ,   activity_main. xml, strings. xml AndroidManifest. xml,  Refactor Workbench-   Android,   Android-.




 Android XMLFile



 Android XML File,   Android  New,     Android-, :

XML- GUI- Activity- (  Layout),

  ,   (  Values),

 (  Drawable),

  (  Menu),

  (  Color List),

 (  Property Animation Tween Animation),

  App Widgets (  AppWidget Provider),

GUI- PreferenceActivity- (  Preference),

  (  Searchable).




  Layout


  Layout- Android-  Project Explorer           New | Other | Android | Android XML File  Android XML Layout File,   Next      Layout-,  Resource Type    Layout.








 File:   Layout-      XML- GUI-,   . xml   res/layout Android-   Java-    R.layout. [ Layout-]  XML-   @ [package: ]layout/ [ Layout-].

 Root Element:   Layout-    View- GUI-,        GUI-,   GUI-.

     ViewGroup- LinearLayout (   ), RelativeLayout ( ) FrameLayout ( ),  GUI-   View-  , , ,   .

   GUI-   Layout-    <merge>,     Layout-,   Layout-   <include>.   GUI-     <requestFocus>,    View-.

 <fragment>,   Android 3.0(API level 11),   GUI- Activity-,   ,     ,               Activity-.  <fragment>     Layout-,   Layout-     LinearLayout, RelativeLayout  FrameLayout.    android: name    ,   android.app.Fragment  android.support.v4.app.Fragment.

    Layout-,       Next,   Choose Configuration Folder,     layout,     Android-,    layout     Android-      .

   Layout-    Layout- ADT-,    GUI-.




  Values


    Android-  Project Explorer           New | Other | Android | Android XML File  Android XML Values File,   Next    ,  Resource Type    Values.








 File:          XML-  ,   . xml   res/values Android-   Java-   R-  XML-    .

 Root Element:     ,    XML-   <resources>.

        Next,   Choose Configuration Folder,     values,     Android-,    values     Android-      .

         Values- ADT-.  Add  Resources  Values-     <resources>    <color> ( Color), <dimen> ( Dimension), <drawable> ( Drawable), <integer-array> ( Integer Array), <item> ( Item), <plurals> ( Quantity Strings (Plurals)), <string> ( String), <string-array> ( String Array), <style> ( Style/Theme).

 <color> ( Color)  ,   <color name=color_name> hex_color </color>,  hex_color    #RGB, #ARGB, #RRGGBB, #AARRGGBB.    Color  Add,  Resources   Attributes for Color c  Name (   name)  Value (  ).  <color>       colors. xml  res/values.          ,   Drawable  TextView.   

Java-    R.color.color_name,  XML-堖   @ [package: ]color/color_name.

 <dimen> ( Dimension)   ,   <dimen name=dimension_name> dimension </dimen>,  dimension   dp (  ), sp (  ), pt (, 1/72), px (), mm (), in().    Dimension  Add,  Resources   Attributes for Dimension c  Name (   name)  Value ( ).   

Java-    R. dimen. dimension_name,  XML-堖   @ [package: ]dimen/dimension_name.

 <drawable> ( Drawable)    android.graphics.drawable.PaintDrawable,  ,  ,   <drawable name=color_name> color_value </drawable>,  color_value    #RGB, #ARGB, #RRGGBB, #AARRGGBB.    Drawable  Add,  Resources   Attributes for Drawable c  Name (   name)  Value ( ).    Java-    R. drawable. drawable_name,  XML-堖   @ [package: ]drawable/drawable_name.

 <integer-array> ( Integer Array)    ,   <integer-array name=integer_array_name> <item> integer </item> </integer-array>.    Integer Array  Add,  Resources   Attributes for Integer Array c  Name    name.    Java-    R.array.integer_array_name  XML-   @ [package: ]array/integer_array_name.

 <item> ( Item)     ,     Java-    R. [ ]. [ ].    Item  Add,  Resources   Attributes for Item c  :

 Name    name,   .

 Type    type,   .

 Format    format,    .

 Value   .

 <plurals> ( Quantity Strings (Plurals))         .    Quantity Strings (Plurals)  Add,  Resources   Attributes for Quantity Strings (Plurals) c  Name,    name  .     Add     Item  <item>   .    Attributes for Item   Quantity,     ,     ( quantity).    Java-   getQuantityString (int id, int quantity)  android.content.res.Resources.

 <string> ( String)   ,   <string name=string_name> text_string </string>.    String  Add,  Resources   Attributes for String c  Name (   name)  Value ( ).     Java-    R.string.string_name,  XML-堖   @string/string_name.

 <string-array> ( String Array)   ,   <string-array name=string_array_name> <item> text_string </item> </string-array>.    String Array  Add,  Resources   Attributes for String Array c  Name    name.    Java-    R.array.string_array_name  XML-   @ [package: ]array/string_array_name.

 <style> ( Style/Theme)      View-,  Activity-   ,   <style name=style_name parent="@ [package: ]style/style_to_inherit> <item name= [package: ]style_property_name> style_value </item> </style>.    Style/Theme  Add,  Resources   Attributes for Style/Theme c  Name    name  Parent    parent.    Java-    R.style.style_name  XML-   @ [package: ]style/style_name.




  Drawable


    Android-  Project Explorer           New | Other | Android | Android XML File,   Next    ,  Resource Type    Drawable.








 File:         XML-,     res/drawable Android-   Java-    R.drawable.filename  XML-   @ [package: ]drawable/filename.

 Root Element:        XML- :

<animation-list>   ,     Drawable-,    <item>.  <animation-list>   android: visible (true/false,   ), android: variablePadding (true/false,   ), android: oneshot (true/false,     ).  <item>   android: drawable ( Drawable- ) android: duration (  ).

<bitmap>  PNG, JPG, GIF ,   android: src (  ), android: antialias (true/false,  ), android: filter (true/false,    ), android: dither (true/false,       ), android: gravity ( ,   top, bottom, left, right, center_vertical, fill_vertical, center_horizontal, fill_horizontal, center, fill, clip_vertical, clip_horizontal), android: tileMode (      ,   disabled, clamp, repeat, mirror).

<clip>   Drawable-,  Level-   android: clipOrientation ( ,   horizontal, vertical), android: gravity ( ,   top, bottom, left, right, center_vertical, fill_vertical, center_horizontal, fill_horizontal, center, fill, clip_vertical, clip_horizontal), android: drawable (  Drawable-).

<color>  ,  ,   android: color ( ).

<corners>    <shape>,       android: radius (  4   <dimen>), android: topLeftRadius (      <dimen>), android: topRightRadius (      <dimen>), android: bottomLeftRadius (      <dimen>), android: bottomRightRadius (      <dimen>).

<gradient>    <shape>,        android: angle (  ), android: centerX (    , 01.0), android: centerY (    Y, 01.0), android: centerColor (  ), android: endColor (  ), android: gradientRadius (   ), android: startColor (  ), android: type ( ,   linear, radial, sweep), android: useLevel (true/false,     <level-list>,   true      ).

<inset>  Drawable- ,   android: drawable (  Drawable-), android: insetTop (    <dimen>), android: insetRight (    <dimen>), android: insetBottom (    <dimen>), android: insetLeft (    <dimen>).

<item>    <animation-list>, <layer-list>, <level-list>, <selector>.

<layer-list>  Drawable-,    <item>  android: drawable ( Drawable-), android: id (  @+id/name), android: top (  ), android: right (  ), android: bottom (  ), android: left (  ).

<nine-patch>  9PNG-  ,   draw9patch SDK Tools PNG-,   android: src ( 9PNG-), android: dither (true/false,       ).

<padding>    <shape>,        android: top (    <dimen>), android: right (    <dimen>), android: bottom (    <dimen>), android: left (    <dimen>).

<rotate>  Drawable-,  Level-   android: visible (true/false,   ), android: fromDegrees (  ), android: toDegrees (  ), android: pivotX (       ), android: pivotY (   Y    ), android: drawable (  ).

<scale>  Drawable-,  Level-   android: scaleWidth (  ), android: scaleHeight (  ), android: scaleGravity (  ), android: drawable (  Drawable-), android: useIntrinsicSizeAsMinimum (true/false,       ).

<selector>   Drawable-    View-.  Drawable-    <item>,       android: drawable ( Drawable-), android: state_pressed (true/false), android: state_focused (true/false), android: state_hovered (true/false), android: state_selected (true/false), android: state_checkable (true/false), android: state_checked (true/false), android: state_enabled (true/false), android: state_activated (true/false), android: state_window_focused (true/false).

<shape>   ,   android: shape (  rectangle, oval, line, ring)   <corners>, <gradient>, <padding>, <size>, <solid>, <stroke>.

<size>    <shape>,    ,   android: height (   <dimen>), android: width (   <dimen>).

<solid>    <shape>,       android: color.

<stroke>    <shape>,    ,   android: width (    <dimen>), android: color ( ), android: dashGap (     <dimen>), android: dashWidth (    <dimen>).

     ,       Next,   Choose Configuration Folder,     drawable,     Android-,    drawable     Android-      .

        XML- .




 Menu


Android-       Android-  ,      MENU    Android- 3.0      ActionBar-,   View-   .

           XML-.    XML-   ,        -.   XML-       Activity-   onCreateOptionsMenu (),      XML-,   MenuInflater.inflate (),    onOptionsItemSelected (),    .

     onCreate () Activity-  View-       registerForContextMenu (),   onCreateContextMenu (),      XML-,   MenuInflater.inflate (),    onContextItemSelected (),    .        XML-   .

  XML-  Android-  Project Explorer           New | Other | Android | Android XML File,   Next    ,  Resource Type    Menu.








 File:   Menu-      XML- ,   . xml   res/menu Android-   Java-    R.menu. [ Menu-]  XML-   @ [package: ]menu. [ Menu-].

 Root Element:   Menu- ,    XML-   <menu>.

    Menu-   Next,   Choose Configuration Folder,     menu,     Android-,    menu     Android-      .

   Menu-     ADT-,    XML- .  Add  Layout  Menu-     <menu>  <group> ( Group) <item> ( Item).

 <item>   ,      <menu> <group>     <menu>,   ( Sub-Menu).  <item>   :

android: id    @+id/name.

android: menuCategory   ,    ( )  ,   container, system, secondary, alternative.

android: orderInCategory      .

android: title   .

android: titleCondensed    .

android: icon  Drawable-,   ,     6  .

android: alphabeticShortcut    .

android: numericShortcut    .

android: checkable  true,     .

android: checked  true,     .

android: visible  true,   .

android: enabled  true,   .

android: onClick  ,    .

android: showAsAction     ActionBar-,   ifRoom (    ), never (), withText ( ), always ( ), collapseActionView (   View-).

android: actionLayout  Layout-,  View-  ActionBar-.

android: actionViewClass   View-  ActionBar-.

android: actionProviderClass  ActionProvider-,   ActionBar-.

 <group>     ,        ,    .  <group>   :

android: id    @+id/name.

android: menuCategory    ,    ( )  ,   container, system, secondary, alternative.

android: orderInCategory      .

android: checkableBehavior   ,   none (   ), all (    checkbox), single (    radio button).

android: visible   , true/false.

android: enabled   , true/false.

   Group Item  Add,  Layout   Attributes for Group Attributes for Item c ,     <group> <item>.




  ColorList


     Drawable- State List   <selector>.   ,   Drawable State List        View-,  Color State List        View-.

   Color State List  Project Explorer           New | Other | Android | Android XML File,   Next    ,  Resource Type    Color List.








 File:    Color State List      XML-     View-,   . xml   res/color Android-   Java-    R.color.filename  XML-   @ [package: ]color/filename.

 Root Element:    item selector,   <item> <selector> ,    <selector>    XML-  Color State List   Root Element:    selector.

 <selector>       <item>,      View-,  :

android: color    #RGB, #ARGB, #RRGGBB, #AARRGGBB.

android: state_pressed  , true/false.

android: state_focused  , true/false.

android: state_selected  , true/false.

android: state_checkable    , true/false.

android: state_checked   , true/false.

android: state_enabled  , true/false.

android: state_window_focused    , true/false.

    XML-  Color State List,   selector   Next,   Choose Configuration Folder,     color,     Android-,    color     Android-      .

   XML-  Color State List    XML- .




  Property Animation Tween Animation


 Property Animation        .      Android-,  3.0.

      XML-   XML- Property Animation  android.animation.AnimatorSet, android.animation. ObjectAnimator  android.animation.ValueAnimator,    android.animation.AnimatorInflater. loadAnimator (),      setTarget ()  android.animation.Animator,      start ()  Animator.

   Property Animation  Project Explorer           New | Other | Android | Android XML File,   Next    ,  Resource Type    Property Animation.








 File:    Property Animation      XML- ,   . xml   res/animator Android-   Java-    R.animator.filename  XML-   @ [package: ]animator/filename.

 Root Element:    animator, objectAnimator set,   <animator>, <objectAnimator> <set> ,          XML-  Property Animation.

 <animator>   ValueAnimator     float, int  color    ,  :

android: duration   ,  300ms.

android: valueFrom  .

android: valueTo  .

android: startOffset   .

android: repeatCount   ,  -1  .

android: repeatMode   ,   repeat reverse.

android: valueType    ,    color ,   intType floatType ().

 <objectAnimator>   ObjectAnimator         ,  :

android: propertyName   ,  android: propertyName=alpha.

android: duration   ,  300ms.

android: valueFrom   .

android: valueTo   .

android: startOffset   .

android: repeatCount   ,  -1  .

android: repeatMode   ,   repeat reverse.

android: valueType    ,    color ,   intType floatType ().

 <set>   AnimatorSet   ,   android: ordering   together (  ) sequentially (  ).

    XML-  Property Animation,      Next,   Choose Configuration Folder,     animator,     Android-,    animator     Android-      .

   XML-  Property Animation    XML- .

 Tween Animation   , ,   View-.    View-  XML-   XML- Tween Animation  android.view.animation.Animation,    android.view.animation.AnimationUtils. loadAnimation ()    startAnimation (Animation animation)  android.view.View.

   Tween Animation  Project Explorer           New | Other | Android | Android XML File,   Next    ,  Resource Type    Tween Animation.








 File:    Tween Animation      XML- ,   . xml   res/anim Android-   Java-    R.anim.filename  XML-   @ [package: ]anim/filename.

 Root Element:    alpha, rotate, scale, set translate,   <alpha>, <rotate>, <scale>, <set> <translate> ,          XML-  Tween Animation.

    ,   android.view.animation.Animation:

android: detachWallpaper  true,     .

android: duration   .

android: fillAfter  true,      .

android: fillBefore  true,      .

android: fillEnabled  true,   fillBefore .

android: interpolator   android.view.animation.Interpolator,    .

android: repeatCount   .

android: repeatMode   ,   repeat reverse.

android: startOffset   .

android: zAdjustment     Z,   normal (  ), top (     ), bottom (     ).

 <alpha>   AlphaAnimation        ,  :

android: fromAlpha   .

android: toAlpha   .

 <rotate>   RotateAnimation    ,  :

android: fromDegrees   .

android: toDegrees   .

android: pivotX android: pivotY         .

 <scale>   ScaleAnimation   ,  :

android: fromXScale    .

android: toXScale    .

android: fromYScale    Y.

android: toYScale    Y.

android: pivotX android: pivotY   .

 <translate>   TranslateAnimation   ,  :




  .


   .

   ,     (https://www.litres.ru/timur-mashnin/razrabotka-android-prilozheniy-v-detalyah/)  .

      Visa, MasterCard, Maestro,    ,   ,     ,  PayPal, WebMoney, ., QIWI ,       .


