android - 在自定义通知中显示 HTML 内容

标签 android android-notifications

是否可以构建显示 HTML 内容的自定义通知?

我看到可以使用 RemoteViews 构建自定义通知,是否可以将 WebView 嵌入到 RemoteViews 中,并将其作为自定义 View 传递给通知?

最佳答案

不,遗憾的是这是不可能的:(

自定义通知只能包含 RemoteViews,它只能包含所有 View 的特定子集,如 Buttons、TextViews 等。

关于android - 在自定义通知中显示 HTML 内容,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44574951/

相关文章:

android - View.SurfaceView,为什么它的成员mSurfaceHolder从getSurface()返回null?

java - EditText 上的 FloatingActionButton 不可点击

android - 从通知中发送 ACTION_SEND Intent

android - 在透明背景上的状态栏上永久显示扩展字符串(天气温度),所有字符大小合适且可见

php - 从 APK 生成屏幕截图(在线)

android - 以编程方式单击通知操作按钮

android - 为什么不显示带有 setCustomContentView 的通知?

深色模式下的 Android 10 通知图像看起来像一张负面图像

android - 为什么这个 NotificationListenerService 不工作

android - 如何从自定义操作栏的顶部和底部删除边距