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
For example:
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.
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.
相关文章推荐
- android初接触之service1
- android 获取apk md5值
- Android studio ElasticDownloadView
- Android:30分钟弄明白Touch事件分发机制(转)
- Android应用坐标系统全面详解
- Android mk文件详解
- Android内存泄露情况总结
- Android:TextView添加下划线以及利用intent跳转到一个网页
- 从Java回调机制分析Android动态加载布局过程中出现的IllgalStateException
- android apk 防止反编译技术第二篇-运行时修改Dalvik指令
- android混淆去掉日志
- Android 图片处理之 Fresco
- android出现注: 某些输入文件使用或覆盖了已过时的 API。 注: 有关详细信息, 请使用 -Xlint:deprecation 重新编译。 注: 某些输入文件使用了未经检查或不安全的操作。
- Android 长度单位
- android初接触之activity2
- android控件拖动,移动、解决父布局重绘时控件回到原点
- Android aidl在Framework的使用
- 读写文件(内存,sd等多种) Android
- Android官方数据绑定框架DataBinding(一)
- android:descendantFocusability用法简析(Item失效问题)