我想要在自定义的Android通知中加入一条竖线,但是我很困难。我尝试在相对布局中添加以下视图:
<View
android:id="@+id/line_vertical"
android:layout_width="1dip"
android:layout_height="fill_parent"
android:layout_centerVertical="true"
android:layout_toRightOf="@id/image_logo"
android:background="#0000FF" />
但是当我触发通知时,我会收到以下异常:
android.app.RemoteServiceException:包XXX发布的通知不好:不能为StatusBarNotification(package = XXX)扩展RemoteViews。
有人有什么想法吗?
- Karim Varela