Android アプリケーションでカスタム通知を作成しようとしています。次のコードを使用しています
カスタム レイアウト
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/custom_notification"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="horizontal" >
<LinearLayout
android:layout_width="50dp"
android:layout_height="fill_parent"
android:background="@drawable/notification_background"
android:clickable="true" >
<ImageView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/ic_action_test" />
</LinearLayout>
</LinearLayout>
これが私の通知の作成方法です
RemoteViews contentView = new RemoteViews(activity.getPackageName(), R.layout.notification);
Notification noti = new NotificationCompat.Builder(activity)
.setSmallIcon(R.drawable.ic_launcher)
.build();
noti.contentView = contentView;
// Hide the notification after its selected
noti.flags |= Notification.FLAG_NO_CLEAR;
notificationManager.notify(0, noti);
通知が作成されますが、高さ属性に fill_parent を使用しているにもかかわらず、通知バーの高さ全体をカバーしていません。
ここで何が悪いのか誰か教えてもらえますか?