Home | History | Annotate | Download | only in layout
      1 <?xml version="1.0" encoding="utf-8"?>
      2 <!-- Copyright (C) 2015 The Android Open Source Project
      3 
      4      Licensed under the Apache License, Version 2.0 (the "License");
      5      you may not use this file except in compliance with the License.
      6      You may obtain a copy of the License at
      7 
      8           http://www.apache.org/licenses/LICENSE-2.0
      9 
     10      Unless required by applicable law or agreed to in writing, software
     11      distributed under the License is distributed on an "AS IS" BASIS,
     12      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13      See the License for the specific language governing permissions and
     14      limitations under the License.
     15 -->
     16 
     17 <!--
     18     NOTE: There is 10px, NOT 10dp, padding to ensure that the burn-in protection (+/- 10px),
     19     which is applied as padding to the inner LinearLayout, doesn't obscure text by moving it off
     20     screen.
     21 -->
     22 <android.support.wear.widget.BoxInsetLayout
     23     xmlns:android="http://schemas.android.com/apk/res/android"
     24     xmlns:tools="http://schemas.android.com/tools"
     25     xmlns:app="http://schemas.android.com/apk/res-auto"
     26     android:layout_width="match_parent"
     27     android:layout_height="match_parent"
     28     android:padding="10px"
     29     tools:context=".MainActivity">
     30 
     31     <LinearLayout
     32         android:id="@+id/content_view"
     33         android:layout_width="match_parent"
     34         android:layout_height="match_parent"
     35         android:orientation="vertical"
     36         android:gravity="center"
     37         app:boxedEdges="all">
     38 
     39         <TextView
     40             android:id="@+id/time"
     41             android:layout_width="match_parent"
     42             android:layout_height="wrap_content"
     43             android:gravity="center"
     44             android:textSize="24sp"
     45             android:text="Hello, time!"/>
     46 
     47         <TextView
     48             android:id="@+id/time_stamp"
     49             android:layout_width="match_parent"
     50             android:layout_height="wrap_content"
     51             android:gravity="center"
     52             android:text="Hello, timestamp!"/>
     53 
     54         <TextView
     55             android:id="@+id/state"
     56             android:layout_width="match_parent"
     57             android:layout_height="wrap_content"
     58             android:gravity="center"
     59             android:textColor="@color/green"
     60             android:text="Hello, state!"/>
     61 
     62         <TextView
     63             android:id="@+id/update_rate"
     64             android:layout_width="match_parent"
     65             android:layout_height="wrap_content"
     66             android:gravity="center"
     67             android:textColor="@color/green"
     68             android:text="Hello, update rate!"/>
     69 
     70         <TextView
     71             android:id="@+id/draw_count"
     72             android:layout_width="match_parent"
     73             android:layout_height="wrap_content"
     74             android:gravity="center"
     75             android:textColor="@color/green"
     76             android:text="Hello, draw count!"/>
     77 
     78     </LinearLayout>
     79 </android.support.wear.widget.BoxInsetLayout>