Translate

Wednesday, 10 February 2016

Generated R.java file

It is the auto-generated file that contains IDs for all the resources of res directory. It is generated by aapt(Android Asset Packaging Tool). Whenever you create any component on activity_main, a corresponding ID is created in the R.java file which can be used in the Java Source file later.
File: R.java
  1. /* AUTO-GENERATED FILE.  DO NOT MODIFY. 
  2.  * 
  3.  * This class was automatically generated by the 
  4.  * aapt tool from the resource data it found.  It 
  5.  * should not be modified by hand. 
  6.  */  
  7. package com.example.helloandroid;  
  8. public final class R {  
  9.     public static final class attr {  
  10.     }  
  11.     public static final class drawable {  
  12.         public static final int ic_launcher=0x7f020000;  
  13.     }  
  14.     public static final class id {  
  15.         public static final int menu_settings=0x7f070000;  
  16.     }  
  17.     public static final class layout {  
  18.         public static final int activity_main=0x7f030000;  
  19.     }  
  20.     public static final class menu {  
  21.         public static final int activity_main=0x7f060000;  
  22.     }  
  23.     public static final class string {  
  24.         public static final int app_name=0x7f040000;  
  25.         public static final int hello_world=0x7f040001;  
  26.         public static final int menu_settings=0x7f040002;  
  27.     }  
  28.     public static final class style {  
  29.         /**  
  30.         Base application theme, dependent on API level. This theme is replaced 
  31.         by AppBaseTheme from res/values-vXX/styles.xml on newer devices. 
  32.             Theme customizations available in newer API levels can go in 
  33.             res/values-vXX/styles.xml, while customizations related to 
  34.             backward-compatibility can go here. 
  35.          Base application theme for API 11+. This theme completely replaces 
  36.         AppBaseTheme from res/values/styles.xml on API 11+ devices. 
  37.   API 11 theme customizations can go here.  
  38.         Base application theme for API 14+. This theme completely replaces 
  39.         AppBaseTheme from BOTH res/values/styles.xml and 
  40.         res/values-v11/styles.xml on API 14+ devices. 
  41.  API 14 theme customizations can go here.  
  42.          */  
  43.         public static final int AppBaseTheme=0x7f050000;  
  44.         /**  Application theme.  
  45.  All customizations that are NOT specific to a particular API-level can go here.  
  46.          */  
  47.         public static final int AppTheme=0x7f050001;  
  48.     }  
  49. }  

No comments:

Post a Comment