当自定义通知栏时,使用RemoteView自定义布局,通知栏不显示
原因:
- 根布局宽高设置问题,不能使用dimes里面的尺寸
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="@dimen/_250px"
android:layout_height="@dimen/_250px">
。。。
</RelativeLayout>
- 解决方法,宽高尺寸写死,或者用match_parent,wrap_content
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="666px
android:layout_height="666px">
。。。
</RelativeLayout>