Merge "docs: studio mipmap update" into lmp-docs
This commit is contained in:
BIN
docs/html/images/tools/projectview-p1.png
Normal file
BIN
docs/html/images/tools/projectview-p1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 30 KiB |
BIN
docs/html/images/tools/projectview-p2.png
Normal file
BIN
docs/html/images/tools/projectview-p2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 33 KiB |
BIN
docs/html/images/tools/studio-mipmap-folders.png
Normal file
BIN
docs/html/images/tools/studio-mipmap-folders.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 8.2 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 18 KiB |
@@ -71,7 +71,7 @@ of your project.</p>
|
||||
<h3 id="Step2SelectFormFactor">Step 2: Select Form Factors and API Level</h2>
|
||||
|
||||
<p>The next window lets you select the form factors supported by your app, such as phone, tablet,
|
||||
TV, Wear, and Google Glass. The selected form factors become the application modules witin the
|
||||
TV, Wear, and Google Glass. The selected form factors become the application modules within the
|
||||
project. For each form factor, you can also select the API Level for that app. To get more information,
|
||||
click <strong>Help me choose</strong>.</p>
|
||||
|
||||
@@ -220,7 +220,7 @@ with complete source files for each of them as shown in figure 6.</p>
|
||||
along with the other modules. </p>
|
||||
|
||||
<p> You can easily change an existing application module to a library module by changing the
|
||||
plugin assignment in the <strong>build.gradle</strong> file to <em>com.android.libary</em>.</p>
|
||||
plugin assignment in the <strong>build.gradle</strong> file to <em>com.android.library</em>.</p>
|
||||
|
||||
<pre>
|
||||
apply plugin: 'com.android.application'
|
||||
@@ -287,7 +287,7 @@ file will override any shared library resources declared in the manifest file.</
|
||||
|
||||
<ol>
|
||||
<li>Make sure that both the module library and the application module that depends on it are
|
||||
in your proejct. If one of the modules is missing, import it into your project.</li>
|
||||
in your project. If one of the modules is missing, import it into your project.</li>
|
||||
|
||||
<li>In the project view, right-click the dependent module and select
|
||||
<strong>Open</strong> > <strong>Module Settings</strong>.</li>
|
||||
@@ -359,39 +359,38 @@ Android project view:</p>
|
||||
per resource type.</li>
|
||||
</ul>
|
||||
|
||||
<div style="float:right;margin-left:30px;width:240px">
|
||||
<img src="{@docRoot}images/tools/projectview01.png" alt="" width="220" height="264"/>
|
||||
<p class="img-caption"><strong>Figure 9:</strong> Show the Android project view.</p>
|
||||
</div>
|
||||
|
||||
|
||||
<h2 id="enable-view">Enable and use the Android Project View</h2>
|
||||
<h2 id="enable-view">Use the Android Project View</h2>
|
||||
|
||||
<p>The Android project view is not yet enabled by default. To show the Android project view,
|
||||
click <strong>Project</strong> and select <strong>Android</strong>, as shown in figure 9.</p>
|
||||
|
||||
<p>The Android project view shows all the build files at the top level of the project hierarchy
|
||||
under <strong>Gradle Scripts</strong>. Each project module appears as a folder at the top
|
||||
level of the project hierarchy and contains these three elements at the top level:</p>
|
||||
<p>The <em>Android</em> project view is enabled by default and shows all the build files at
|
||||
the top level of the project hierarchy under <strong>Gradle Scripts</strong>. The project module
|
||||
appears as a folder at the top level of the project hierarchy and contains these three elements
|
||||
at the top level:</p>
|
||||
|
||||
<ul>
|
||||
<li><code>java/</code> - Source files for the module.</li>
|
||||
<li><code>manifests/</code> - Manifest files for the module.</li>
|
||||
<li><code>java/</code> - Source files for the module.</li>
|
||||
<li><code>res/</code> - Resource files for the module.</li>
|
||||
</ul>
|
||||
|
||||
<p>Figure 10 shows how the Android project view groups all the instances of the
|
||||
<p>Notice how the Android project view groups all instances of the
|
||||
<code>ic_launcher.png</code> resource for different screen densities under the same element.</p>
|
||||
|
||||
<p class="note"><strong>Note:</strong> The Android project view shows a hierarchy that helps you
|
||||
work with Android projects by providing a flattened structure that highlights the most commonly
|
||||
used files while developing Android applications. However, the project structure on disk differs
|
||||
from this representation.</p>
|
||||
from this representation and maintains the traditional project structure.</p>
|
||||
|
||||
<img src="{@docRoot}images/tools/projectview-p1.png" alt="" style="width:240px" "/>
|
||||
|
||||
<img src="{@docRoot}images/tools/projectview-p2.png" alt="" style="width:240px" " />
|
||||
<p class="img-caption"><strong>Figure 10:</strong> Android and Traditional project view </p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<img src="{@docRoot}images/tools/projectview03.png" alt=""
|
||||
style="margin-top:10px" width="650" height="508"/>
|
||||
<p class="img-caption"><strong>Figure 10:</strong> The traditional project view (left) and the
|
||||
Android project view (right).</p>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ Studio</a>.</p>
|
||||
<h3 id="project-view"><em>Android</em> Project View</h3>
|
||||
<p>By default, Android Studio displays your profile files in the <em>Android</em> project view. This
|
||||
view shows a flattened version of your project's structure that provides quick access to the key
|
||||
source files of Android projects and helps you work with the new
|
||||
source files of Android projects and helps you work with the
|
||||
<a href="{@docRoot}sdk/installing/studio-build.html">Gradle-based build system</a>.
|
||||
The Android project view:</p>
|
||||
|
||||
@@ -102,7 +102,7 @@ the <strong>Project</strong drop-down. </p>
|
||||
|
||||
|
||||
|
||||
<h3>New Project and Directory Structure</h3>
|
||||
<h3>Android Studio Project and Directory Structure</h3>
|
||||
<p>When you use the <em>Project</em> view of a new project in Android Studio, you
|
||||
should notice that the project structure appears different than you may be used to in Eclipse. Each
|
||||
instance of Android Studio contains a project with one or more application modules. Each
|
||||
@@ -120,6 +120,7 @@ specification and the files under {@code src/androidTest} directory for test cas
|
||||
<a href="{@docRoot}tools/projects/index.html">Managing Projects</a>.</p>
|
||||
|
||||
|
||||
|
||||
<h3>Creating new files</h3>
|
||||
<p>You can quickly add new code and resource files by clicking the appropriate directory in the
|
||||
<strong>Project</strong> pane and pressing <code>ALT + INSERT</code> on Windows and Linux or
|
||||
@@ -250,23 +251,15 @@ memory the connected device is using. With your app running on a device or emula
|
||||
<strong>Memory Monitor</strong> tab in the lower right corner to launch the memory monitor. </p>
|
||||
|
||||
<img src="{@docRoot}images/tools/studio-memory-monitor.png" />
|
||||
<p class="img-caption"><strong>Figure 4.</strong> Memory Monitor</p>
|
||||
<p class="img-caption"><strong>Figure 5.</strong> Memory Monitor</p>
|
||||
|
||||
|
||||
|
||||
<h3> New Lint inspections</h3>
|
||||
<p>Lint has several new checks to ensure:
|
||||
<ul>
|
||||
<li><code> Cipher.getInstance()</code> is used with safe values</li>
|
||||
<li>In custom Views, the associated declare-styleable for the custom view uses the same
|
||||
base name as the class name.</li>
|
||||
<li>Security check for fragment injection.</li>
|
||||
<li>Where ever property assignment no longer works as expected.</li>
|
||||
<li>Gradle plugin version is compatible with the SDK.</li>
|
||||
<li>Right to left validation </li>
|
||||
<li>Required API version</li>
|
||||
<li>many others</li>
|
||||
</ul>
|
||||
<h3> Lint inspections</h3>
|
||||
<p>The Android {@code lint} tool is a static code analysis tool that checks your Android project
|
||||
source files for potential bugs and optimization improvements. Choose the <strong>Analyze >
|
||||
Inspect Code</strong> to manually run the inspections. The {@code lint} settings icon in the
|
||||
Inspection display provides a complete list of the current inspections.</p>
|
||||
|
||||
<p>Hovering over a Lint error displays the full issue explanation inline for easy error
|
||||
resolution. There is also a helpful hyperlink at the end of the error message for additional
|
||||
@@ -295,17 +288,17 @@ build.gradle file. </p>
|
||||
<p>Android Studio allows you to work with layouts in both a <em>Design View</em> </p>
|
||||
<p><img src="{@docRoot}images/tools/studio-helloworld-design.png" alt="" />
|
||||
</p>
|
||||
<p class="img-caption"><strong>Figure 5.</strong> Hello World App with Design View</p>
|
||||
<p class="img-caption"><strong>Figure 6.</strong> Hello World App with Design View</p>
|
||||
|
||||
<p>and a <em>Text View</em>. </p>
|
||||
|
||||
<p><img src="{@docRoot}images/tools/studio-helloworld-text.png" alt="" />
|
||||
<pclass="img-caption"><strong>Figure 6.</strong> Hello World App with Text View</p>
|
||||
<pclass="img-caption"><strong>Figure 7.</strong> Hello World App with Text View</p>
|
||||
|
||||
<p>Easily select and preview layout changes for different device images, display
|
||||
densities, UI modes, locales, and Android versions (multi-API version rendering).
|
||||
<p><img src="{@docRoot}images/tools/studio-api-version-rendering.png" /></p>
|
||||
<p class="img-caption"><strong>Figure 7.</strong> API Version Rendering</p>
|
||||
<p class="img-caption"><strong>Figure 8.</strong> API Version Rendering</p>
|
||||
|
||||
|
||||
<p>From the Design View, you can drag and drop elements from the Palette to the Preview or
|
||||
@@ -342,18 +335,18 @@ the wizard updates your system image and emulation requirements, such GPU, and t
|
||||
an optimized default Android Virtual Device (AVD) based on Android 5 (Lollipop) for speedy and
|
||||
reliable emulation. </p>
|
||||
<p><img src="{@docRoot}images/tools/studio-setup-wizard.png" /></p>
|
||||
<p class="img-caption"><strong>Figure 8.</strong> Setup Wizard</p>
|
||||
<p class="img-caption"><strong>Figure 9.</strong> Setup Wizard</p>
|
||||
|
||||
|
||||
<h3>Expanded template and form factor support</h3>
|
||||
<p>Android Studio supports new templates for Google Services and expands the available device
|
||||
<p>Android Studio supports templates for Google Services and expands the available device
|
||||
types. </p>
|
||||
|
||||
<h4> Android Wear and TV support</h4>
|
||||
<p>For easy cross-platform development, the Project Wizard provides new templates for
|
||||
creating your apps for Android Wear and TV. </p>
|
||||
<p><img src="{@docRoot}images/tools/studio-tvwearsupport.png" />
|
||||
<p class="img-caption"><strong>Figure 9.</strong> New Form Factors</p>
|
||||
<p class="img-caption"><strong>Figure 10.</strong> Supported Form Factors</p>
|
||||
<p>During app creation, the Project Wizard also displays an API Level dialog to help you choose
|
||||
the best <em>minSdkVersion</em> for your project.</p>
|
||||
|
||||
@@ -363,7 +356,7 @@ types. </p>
|
||||
and create a cloud end-point is as easy as selecting <em>File > New Module > App Engine Java
|
||||
Servlet Module</em> and specifying the module, package, and client names. </p>
|
||||
<p><img src="{@docRoot}images/tools/studio-cloudmodule.png" /></p>
|
||||
<p class="img-caption"><strong>Figure 10.</strong> Setup Wizard</p>
|
||||
<p class="img-caption"><strong>Figure 11.</strong> Setup Wizard</p>
|
||||
|
||||
|
||||
|
||||
@@ -514,14 +507,14 @@ into your project. </p>
|
||||
<strong>Open Editor</strong> link. </p>
|
||||
|
||||
<img src="{@docRoot}images/tools/studio-translationeditoropen.png" />
|
||||
<p class="img-caption"><strong>Figure 11.</strong> Translation Editor</p>
|
||||
<p class="img-caption"><strong>Figure 12.</strong> Translation Editor</p>
|
||||
|
||||
|
||||
<h3> Editor support for the latest Android APIs</h3>
|
||||
<p>Android Studio supports the new
|
||||
<p>Android Studio supports the
|
||||
<a href="{@docRoot}design/material/index.html">Material Design</a></li> themes, widgets, and
|
||||
graphics, such as shadow layers and API version rendering (showing the layout across different
|
||||
UI versions). Also, the new drawable XML tags and attributes, such as <ripple>
|
||||
UI versions). Also, the drawable XML tags and attributes, such as <ripple>
|
||||
and <animated-selector>, are supported.</p>
|
||||
|
||||
|
||||
@@ -529,10 +522,10 @@ and <animated-selector>, are supported.</p>
|
||||
<p>Clicking <strong>Import Samples</strong> from the <strong>File</strong> menu or Welcome page
|
||||
provides seamless access to Google code samples on GitHub.</p>
|
||||
<p><img src="{@docRoot}images/tools/studio-samples-githubaccess.png" /></p>
|
||||
<p class="img-caption"><strong>Figure 12.</strong> Code Sample Access</p>
|
||||
<p class="img-caption"><strong>Figure 13.</strong> Code Sample Access</p>
|
||||
|
||||
|
||||
<p><img src="{@docRoot}images/tools/studio-sample-in-editor.png" /></p>
|
||||
<p class="img-caption"><strong>Figure 13.</strong> Imported Code Sample</p>
|
||||
<p class="img-caption"><strong>Figure 14.</strong> Imported Code Sample</p>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user