从 2.0.0-alpha3 升级到 2.0.0 后,我的大部分观点看起来都出现了偏差。这是我正在使用的布局的 XML:
<?xml version="1.0" encoding="utf-8"?>
<android.support.wearable.view.BoxInsetLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="oviroa.bestshot.android.StartPlayActivity"
tools:deviceIds="wear"
android:padding="15dp">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="5dp"
app:layout_box="all">
<TextView
android:id="@+id/shot_type"
app:layout_box="all"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/forehand"
android:theme="@style/BST.HeaderText"/>
<Button
android:layout_marginTop="30dp"
android:layout_marginBottom="0dp"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp"
android:id="@+id/record"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/swoosh_background"
android:text="@string/record_action"
android:gravity="center_horizontal|bottom"
android:textAlignment="center"
android:paddingBottom="15dp"
android:theme="@style/BST.ButtonWithIcon.Bold" />
</FrameLayout>
</android.support.wearable.view.BoxInsetLayout>
正如您在下面的屏幕截图中看到的那样,该按钮相当倾斜。我没有通过代码进行任何操作。
这是 2.0.0-alpha3:
我正在测试 LG Urbane 第二代 LTE。