Buggy code:
public class HeaderImageLinkView extends RelativeLayout { private TextView title ; private TextView info ; private ImageView backdrop ; public HeaderImageLinkView ( Context context ) { } public HeaderImageLinkView ( Context context , AttributeSet attrs ) { } public HeaderImageLinkView ( Context context , AttributeSet attrs , int defStyle ) { } public double getHeightFromAspectRatio ( int imageHeight , int imageWidth ) { } boolean done ; public void setSubmission ( final Submission submission , final boolean full , String baseSub ) { } public void doImageAndText ( Submission submission , boolean full , String baseSub ) { final ContentType . ImageType type = ContentType . getImageType ( submission ) ; setVisibility ( VISIBLE ) ; String url = "" ; boolean forceThumb = false ; if ( ( submission . getDataNode ( ) . has ( "preview" ) ) && ( submission . getDataNode ( ) . get ( "preview" ) . get ( "images" ) . get ( 0 ) . get ( "source" ) . has ( "width" ) ) ) { int height = submission . getDataNode ( ) . get ( "preview" ) . get ( "images" ) . get ( 0 ) . get ( "source" ) . get ( "height" ) . asInt ( ) ; int width = submission . getDataNode ( ) . get ( "preview" ) . get ( "images" ) . get ( 0 ) . get ( "source" ) . get ( "width" ) . asInt ( ) ; if ( full ) { if ( ( height < ( dpToPx ( 50 ) ) ) && ( type != ( ImageType . SELF ) ) ) { forceThumb = true ; } else if ( SettingValues . cropImage ) { backdrop . setLayoutParams ( new RelativeLayout . LayoutParams ( LayoutParams . MATCH_PARENT , dpToPx ( 200 ) ) ) ; } else { double h = getHeightFromAspectRatio ( height , width ) ; if ( h != 0 ) { backdrop . setLayoutParams ( new RelativeLayout . LayoutParams ( LayoutParams . MATCH_PARENT , ( ( int ) ( h ) ) ) ) ; } else { backdrop . setLayoutParams ( new RelativeLayout . LayoutParams ( LayoutParams . MATCH_PARENT , dpToPx ( 200 ) ) ) ; } } } else if ( SettingValues . bigPicCropped ) { if ( height < ( dpToPx ( 50 ) ) ) { forceThumb = true ; } else { backdrop . setLayoutParams ( new RelativeLayout . LayoutParams ( LayoutParams . MATCH_PARENT , dpToPx ( 200 ) ) ) ; } } else if ( height >= ( dpToPx ( 50 ) ) ) { double h = getHeightFromAspectRatio ( height , width ) ; if ( h != 0 ) { backdrop . setLayoutParams ( new RelativeLayout . LayoutParams ( LayoutParams . MATCH_PARENT , ( ( int ) ( getHeightFromAspectRatio ( height , width ) ) ) ) ) ; } else { <START_BUG> backdrop . setLayoutParams ( new RelativeLayout . LayoutParams ( LayoutParams . MATCH_PARENT , dpToPx ( 200 ) ) ) ; <END_BUG> } } else { forceThumb = true ; } } if ( ( submission . isNsfw ( ) ) && ( ! ( SettingValues . NSFWPreviews ) ) ) { setVisibility ( GONE ) ; if ( ( ! full ) || forceThumb ) { thumbImage2 . setVisibility ( VISIBLE ) ; } else { wrapArea . setVisibility ( VISIBLE ) ; } if ( submission . isSelfPost ( ) ) thumbImage2 . setVisibility ( GONE ) ; else { thumbImage2 . setImageDrawable ( ContextCompat . getDrawable ( getContext ( ) , nsfw ) ) ; } } else if ( ( ( type != ( ImageType . IMAGE ) ) && ( type != ( ImageType . SELF ) ) ) && ( ( submission . getThumbnailType ( ) ) != ( ThumbnailType . URL ) ) ) { setVisibility ( GONE ) ; if ( ! full ) { thumbImage2 . setVisibility ( VISIBLE ) ; } else { wrapArea . setVisibility ( VISIBLE ) ; } thumbImage2 . setImageDrawable ( ContextCompat . getDrawable ( getContext ( ) , web ) ) ; } else if ( type == ( ImageType . IMAGE ) ) { url = submission . getUrl ( ) ; if ( ( ( ! full ) && ( ! ( SettingValues . isPicsEnabled ( baseSub ) ) ) ) || forceThumb ) { if ( ! full ) { thumbImage2 . setVisibility ( VISIBLE ) ; } else { wrapArea . setVisibility ( VISIBLE ) ; } ( ( me . ccrama . redditslide . Reddit ) ( getContext ( ) . getApplicationContext ( ) ) ) . getImageLoader ( ) . displayImage ( url , thumbImage2 ) ; setVisibility ( GONE ) ; } else { ( ( me . ccrama . redditslide . Reddit ) ( getContext ( ) . getApplicationContext ( ) ) ) . getImageLoader ( ) . displayImage ( url , backdrop ) ; setVisibility ( VISIBLE ) ; if ( ! full ) { thumbImage2 . setVisibility ( GONE ) ; } else { wrapArea . setVisibility ( GONE ) ; } } } else if ( ( submission . getDataNode ( ) . has ( "preview" ) ) && ( submission . getDataNode ( ) . get ( "preview" ) . get ( "images" ) . get ( 0 ) . get ( "source" ) . has ( "height" ) ) ) { url = submission . getDataNode ( ) . get ( "preview" ) . get ( "images" ) . get ( 0 ) . get ( "source" ) . get ( "url" ) . asText ( ) ; if ( ( ( ! ( SettingValues . isPicsEnabled ( baseSub ) ) ) && ( ! full ) ) || forceThumb ) { if ( ! full ) { thumbImage2 . setVisibility ( VISIBLE ) ; }

Fix:
backdrop . setLayoutParams ( new RelativeLayout . LayoutParams ( LayoutParams . MATCH_PARENT , LayoutParams . WRAP_CONTENT ) ) ;