am bcd1af39: Merge "docs: Wear UI Lib training fixes" into klp-modular-docs
* commit 'bcd1af39fa674dcc46ddb30778304eaf67100a13': docs: Wear UI Lib training fixes
This commit is contained in:
@@ -167,3 +167,9 @@ protected void onCreate(Bundle savedInstanceState) {
|
|||||||
cardScrollView.setCardGravity(Gravity.BOTTOM);
|
cardScrollView.setCardGravity(Gravity.BOTTOM);
|
||||||
}
|
}
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
|
<p><code>CardScrollView</code> detects the shape of the screen and displays the card differently
|
||||||
|
on round and square devices, using wider side margins on round screens. However,
|
||||||
|
placing the <code>CardScrollView</code> element inside a <code>BoxInsetLayout</code> and using the
|
||||||
|
<code>layout_box="bottom"</code> attribute is useful to align the card to the bottom of round
|
||||||
|
screens without cropping its content.</p>
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ the long-press-to-dismiss UI pattern to let users exit your app using the
|
|||||||
You must also inform your users the first time they run your app that they can exit using
|
You must also inform your users the first time they run your app that they can exit using
|
||||||
a long press.</p>
|
a long press.</p>
|
||||||
|
|
||||||
<p>For design guidelines on exiting Android Wear activities, see
|
<p>For design guidelines about exiting Android Wear activities, see
|
||||||
<a href="{@docRoot}design/wear/structure.html#Custom">Breaking out of the card</a>.</p>
|
<a href="{@docRoot}design/wear/structure.html#Custom">Breaking out of the card</a>.</p>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -172,8 +172,9 @@ specifies the layout parameters of each of the components inside a list item. Th
|
|||||||
definition uses the custom layout implementation from the previous section and defines an icon
|
definition uses the custom layout implementation from the previous section and defines an icon
|
||||||
and a text view whose IDs match those in the layout implementation class:</p>
|
and a text view whose IDs match those in the layout implementation class:</p>
|
||||||
|
|
||||||
|
<p class="code-caption">res/layout/list_item.xml</p>
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
<-- res/layout/list_item.xml -->
|
|
||||||
<com.example.android.support.wearable.notifications.WearableListItemLayout
|
<com.example.android.support.wearable.notifications.WearableListItemLayout
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
|
|||||||
Reference in New Issue
Block a user