public void onContentViewChanged ( NotificationView view , View contentView , int layoutId ) { if ( DBG ) Log . v ( TAG , "onContentViewChanged" ) ; ChildViewManager mgr = view . getChildViewManager ( ) ; if ( layoutId == R . layout . notification_simple || layoutId == R . layout . notification_large_icon || layoutId == R . layout . notification_full ) { view . setNotificationTransitionEnabled ( false ) ; mgr . setView ( ICON , contentView . findViewById ( R . id . switcher_icon ) ) ; mgr . setView ( TITLE , contentView . findViewById ( R . id . switcher_title ) ) ; mgr . setView ( TEXT , contentView . findViewById ( R . id . switcher_text ) ) ; mgr . setView ( WHEN , contentView . findViewById ( R . id . switcher_when ) ) ; } else if ( layoutId == R . layout . notification_simple_2 ) { view . setNotificationTransitionEnabled ( true ) ; mgr . setView ( ICON , contentView . findViewById ( R . id . icon ) ) ; mgr . setView ( TITLE , contentView . findViewById ( R . id . title ) ) ; mgr . setView ( TEXT , contentView . findViewById ( R . id . text ) ) ; mgr . setView ( WHEN , contentView . findViewById ( R . id . when ) ) ; } }
Called when content view is changed . All child - views were cleared due the change of content view . You need to re - setup the associated child - views .