custom_notification.xml 1.4 KB

123456789101112131415161718192021222324252627282930313233343536
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  3. android:layout_width="match_parent"
  4. android:layout_height="match_parent"
  5. android:padding="10dp" >
  6. <ImageView
  7. android:id="@+id/notificationIcon"
  8. android:layout_width="44dp"
  9. android:layout_height="44dp"
  10. android:layout_alignParentLeft="true"
  11. android:layout_alignParentTop="true"
  12. android:src="@android:drawable/ic_dialog_info"
  13. android:contentDescription="@string/notificationIconDescription" />
  14. <TextView
  15. android:id="@+id/appName"
  16. android:layout_width="wrap_content"
  17. android:layout_height="wrap_content"
  18. android:layout_alignParentTop="true"
  19. android:layout_marginLeft="16dp"
  20. android:layout_marginBottom="8dp"
  21. android:layout_toRightOf="@+id/notificationIcon"
  22. android:text="@string/app_name"
  23. android:textAppearance="?android:attr/textAppearanceMedium"/>
  24. <TextView
  25. android:id="@+id/notificationContent"
  26. android:layout_width="wrap_content"
  27. android:layout_height="wrap_content"
  28. android:layout_alignBottom="@+id/notificationIcon"
  29. android:layout_alignLeft="@+id/appName"
  30. android:text="@string/content"
  31. android:textAppearance="?android:attr/textAppearanceSmall" />
  32. </RelativeLayout>