Skip to content

Instantly share code, notes, and snippets.

@adavis
Created September 11, 2014 17:32
Show Gist options
  • Save adavis/0308f629d2393a379ccb to your computer and use it in GitHub Desktop.
Save adavis/0308f629d2393a379ccb to your computer and use it in GitHub Desktop.
An example of using the Wearable Support BoxInsetLayout view
<android.support.wearable.view.BoxInsetLayout
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_height="match_parent"
android:layout_width="match_parent">
<LinearLayout
android:id="@+id/textViewsLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:orientation="horizontal"
android:weightSum="3"
app:layout_box="all">
<TextView
android:layout_width="0dp"
android:layout_height="64dp"
android:textSize="30sp"
android:padding="8dp"
android:textStyle="bold"
android:text="1"
android:id="@+id/firstChoiceTextView"
android:gravity="center"
android:textColor="@android:color/white"
android:layout_weight="1"
android:clickable="true"/>
<TextView
android:layout_width="0dp"
android:layout_height="64dp"
android:textSize="30sp"
android:padding="8dp"
android:textStyle="bold"
android:text="2"
android:id="@+id/secondChoiceTextView"
android:gravity="center"
android:textColor="@android:color/white"
android:layout_weight="1"
android:clickable="true"/>
<TextView
android:layout_width="0dp"
android:layout_height="64dp"
android:textSize="30sp"
android:padding="8dp"
android:textStyle="bold"
android:text="3"
android:id="@+id/thirdChoiceTextView"
android:gravity="center"
android:textColor="@android:color/white"
android:layout_weight="1"
android:clickable="true"/>
</LinearLayout>
</android.support.wearable.view.BoxInsetLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment