Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3b3145ed authored by Scott Main's avatar Scott Main
Browse files

docs: fix several instances of the 'sidebox' class

Change-Id: I3f676929e1ce919fee254c2ac5320f2070b2a14f
parent 41696d37
Loading
Loading
Loading
Loading
+4 −6
Original line number Diff line number Diff line
@@ -7,9 +7,8 @@ page.title=Draw 9-patch
the section on Nine-patch in the 
<a href="{@docRoot}guide/topics/resources/available-resources.html#ninepatch">Nine-patch Images</a> topic.</p>

<div class="sidebox" style="width:auto"><br/>
<img src="{@docRoot}images/draw9patch-norm.png" alt="" height="300" width="341" />
</div>
<img src="{@docRoot}images/draw9patch-norm.png" style="float:right" alt="" height="300" width="341"
/>

<p>Here's a quick guide to create a Nine-patch graphic using the Draw 9-patch tool.
You'll need the PNG image with which you'd like to create a NinePatch.</p>
@@ -39,9 +38,8 @@ You'll need the PNG image with which you'd like to create a NinePatch.</p>
     A previously saved 9-patch file (<code>*.9.png</code>) will be loaded as-is, 
     with no drawing area added, because it already exists.</p>

<div class="sidebox" style="width:auto"><br/>
<img src="{@docRoot}images/draw9patch-bad.png" alt="" height="300" width="341" />
</div>
<img src="{@docRoot}images/draw9patch-bad.png" style="float:right" alt="" height="300" width="341"
/>

<p>Optional controls include:</p>
<ul>
+2 −2
Original line number Diff line number Diff line
@@ -23,8 +23,8 @@ level, you can think of responsiveness as a <em>class</em> problem. (Compare
this with basic performance, which was described above as a <em>method</em>-level
concern.)</p>

<div class="sidebox" style="margin-top:1em;border:0;">
<div style="border:0;background-color:#fff;padding:15px;padding-right:2em;margin:0;">
<div class="sidebox-wrapper">
<div class="sidebox">
<img src="{@docRoot}images/anr.png" width="240" height="320" alt="Screenshot of ANR dialog box">
<p style="margin-top:.5em;padding:.5em;">An ANR dialog displayed to the user.</p>
</div>
+5 −2
Original line number Diff line number Diff line
@@ -176,10 +176,13 @@ elements.</li>
<h3 id="mapsApiKey">7. Register for a Maps API Key, if your application is using
MapView elements</h3>

<div class="sidebox" style="margin-bottom:.5em;padding:1em;"><p>
<div class="sidebox-wrapper">
<div class="sidebox"><p>
For complete information about getting a Maps API Key, see <a
href="http://code.google.com/android/add-ons/google-apis/mapkey.html">
Obtaining a Maps API Key</a>.</p></div>
Obtaining a Maps API Key</a>.</p>
</div>
</div>

<p>If your application uses one or more Mapview elements, you will need to 
register your application with the Google
+9 −2
Original line number Diff line number Diff line
@@ -41,6 +41,7 @@ application can create View and ViewGroup objects (and manipulate their properti

<p>The Android framework gives you the flexibility to use either or both of these methods for declaring and managing your application's UI. For example, you could declare your application's default layouts in XML, including the screen elements that will appear in them and their properties. You could then add code in your application that would modify the state of the screen objects, including those declared in XML, at run time. </p>

<div class="sidebox-wrapper">
<div class="sidebox">
  <ul>
  <li>The <a href="{@docRoot}sdk/eclipse-adt.html">ADT
@@ -54,6 +55,7 @@ application can create View and ViewGroup objects (and manipulate their properti
  <li>The <a href="{@docRoot}guide/developing/tools/layoutopt.html">layoutopt</a> tool lets
  you quickly analyze your layouts and hierarchies for inefficiencies or other problems.</li>
</div>
</div>

<p>The advantage to declaring your UI in XML is that it enables you to better separate the presentation of your application from the code that controls its behavior. Your UI descriptions are external to your application code, which means that you can modify or adapt it without having to modify your source code and recompile. For example, you can create XML layouts for different screen orientations, different device screen sizes, and different languages. Additionally, declaring the layout in XML makes it easier to visualize the structure of your UI, so it's easier to debug problems. As such, this document focuses on teaching you how to declare your layout in XML. If you're
interested in instantiating View objects at runtime, refer to the {@link android.view.ViewGroup} and 
@@ -69,10 +71,15 @@ Layout Objects</a>. There are also a collection of tutorials on building various

<h2 id="write">Write the XML</h2>

<div class="sidebox"><p>For your convenience, the API reference documentation for UI related classes lists the available XML attributes that correspond to the class methods, including inherited attributes.</p>
<div class="sidebox-wrapper">
<div class="sidebox">
<p>For your convenience, the API reference documentation for UI related classes
lists the available XML attributes that correspond to the class methods, including inherited
attributes.</p>
<p>To learn more about the available XML elements and attributes, as well as the format of the XML file, see <a
href="{@docRoot}guide/topics/resources/available-resources.html#layoutresources">Layout Resources</a>.</p>
</div>
</div>

<p>Using Android's XML vocabulary, you can quickly design UI layouts and the screen elements they contain, in the same way you create web pages in HTML &mdash; with a series of nested elements. </p>

+6 −2
Original line number Diff line number Diff line
@@ -18,12 +18,14 @@ and each View is responsible for drawing itself.
   siblings drawn in the order they appear in the tree.
   </p>

<div class="sidebox-wrapper">
<div class="sidebox">
  <p>The framework will not draw Views that are not in the invalid region, and also 
   will take care of drawing the Views background for you.</p>
   <p>You can force a View to draw, by calling <code>{@link android.view.View#invalidate()}</code>.
   </p>
</div>
</div>

<p>
   Drawing the layout is a two pass process: a measure pass and a layout pass. The measuring
@@ -50,10 +52,12 @@ and each View is responsible for drawing itself.
  as to how much space they each get, the parent will intervene and set the rules on the second pass).
   </p>
   
<div class="sidebox-wrapper">
<div class="sidebox"><p>
   To initiate a layout, call <code>{@link android.view.View#requestLayout}</code>. This method is typically
   called by a View on itself when it believes that is can no longer fit within
   its current bounds.</p>
</div>
</div>

   <p>
Loading