您的位置:首页 > 移动开发 > Android开发

android wearable-Creating Custom Layouts

2016-01-14 21:12 453 查看
Note: When creating custom notifications on the wearable, you can use the standard notification
APIs (API Level 20) instead of the Support Library.

You need to declare the activity to be exportable, be embeddable, and have an empty task affinity. We also recommend setting the theme to
Theme.DeviceDefault.Light
.
For example:

<activity android:name="com.example.MyDisplayActivity"
android:exported="true"
android:allowEmbedded="true"
android:taskAffinity=""
android:theme="@android:style/Theme.DeviceDefault.Light" />


Note: When the notification is peeking on the homescreen, the system displays it with a standard
template that it generates from the notification's semantic data. This template works well on all watchfaces. When users swipe the notification up, they'll then see the custom activity for the notification.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: