Wear Os基础入门-WatchViewStub

WatchViewStub

    • 布局

Wear Os基础入门-WatchViewStub_第1张图片

布局

<android.support.wearable.view.WatchViewStub xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/swipe_dismiss_root"
    app:rectLayout="@layout/rect_activity_wear"
    app:roundLayout="@layout/round_activity_wear">
</android.support.wearable.view.WatchViewStub>
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/grey"
    android:paddingLeft="10dp"
    android:paddingRight="10dp">
    <FrameLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@color/red_a200"/>
</FrameLayout>
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent">
    <androidx.wear.widget.BoxInsetLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent">
        <FrameLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            app:boxedEdges="all">
            <ImageView
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:background="@color/green"/>
        </FrameLayout>

    </androidx.wear.widget.BoxInsetLayout>
</FrameLayout>

你可能感兴趣的:(Wear Os基础入门-WatchViewStub)