我想在主屏幕或锁屏上显示我的自定义布局,但我在 Android 5.0 (Lollipop) 中找不到任何可用的示例。
正如@commonsware 所建议的那样,这在 5.0 上是不可能的但是这如何 Next Lock Screen app在 5.0 上管理这个
我想实现类似 this app 的目标, 任何方向或帮助将不胜感激。
谢谢!
最佳答案
Android 5.0 摆脱了锁屏上的应用程序小部件,因此不再支持此功能。引用 the documentation :
The widgetCategory attribute declares whether your App Widget can be displayed on the home screen (home_screen), the lock screen (keyguard), or both. Only Android versions lower than 5.0 support lock-screen widgets. For Android 5.0 and higher, only home_screen is valid.
关于android - 如何在 Android 5.0 的锁屏或主屏幕上显示小部件/自定义布局,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32526078/