diff --git a/docs/html/tools/studio/studio-features.jd b/docs/html/tools/studio/studio-features.jd index 3d5b24c90d915..44d6985dfdc6d 100644 --- a/docs/html/tools/studio/studio-features.jd +++ b/docs/html/tools/studio/studio-features.jd @@ -14,6 +14,7 @@ page.tags=studio, features
Multi-language support is enhanced with the Translations Editor plugin so you can easily add a variety of locales to the app's translation file. With -BCP 47 support, the editor combines language and +BCP 47 support, the editor +combines language and region codes into a single selection for targeted localizations. Color codes indicate whether a locale is complete or still missing string translations.
@@ -167,6 +169,61 @@ detail about starting the services, refer to each service's specific activation +By default, Android Studio treats all library resources as public: A public library resource is +available to library clients for use outside the library, and appears in code completion suggestions +and other resource references. Android Studio also, however, supports the use of private library +resources. A private library resource can only be used within the source library, and does not +appear in code completion lists and other resource references.
+ +You cannot explicitly declare a library resource as private. Instead, if you declare any library +resources as public, Android Studio assumes all the other library resources are private.
+ +An app treats all Android library resources as public unless you explicitly declare at least one +resource in the library as public. Declaring one public resource causes your app to treat all other, +undeclared resources in the library as private.
+ +Note: Declaring public and private resources requires the +Android Plugin for Gradle version +1.3 or higher.
+ + +To declare a resource as public and set other undeclared resources as private, add a
+<public> declaration with the resource name and type in the resource file.
+This example shows the public declaration for the mylib_app_name string resource.
+<resources> + <public name="mylib_app_name" type="string"/> +</resources> ++ +
For large numbers of declarations, we recommended that you place the public marker declarations
+in a separate file named public.xml.
To help enforce private resource access, a lint +warning appears when a client of a library references a private resource. Many Android libraries, +such as the +Design Support Library and the +v7 appcompat Library, +declare public resources to display only resources that developers can directly reference. +
+ +Note: If your app requires a private resource, copy the +private resource from the library to the location in your app where it is needed.
+ +When the build system builds an Android Archive (AAR) file, it extracts the
+<public> resource declarations into a public.txt file, which is
+packaged inside the AAR file next to the R.txt file. The public.txt file
+contains a simple list of the declared public resources, describing their names and types.
For a complete list of the available Android resource types, see +Resource +Types and +More Resource +Types.
+ +Android Studio supports the @@ -277,4 +334,3 @@ properties for the project path and target build type variant.
app'sbuild.gradle file.
-