private void adaptMessageTextSize ( ) { if ( getRootView ( ) != null ) { View messageView = getRootView ( ) . findViewById ( android . R . id . message ) ; if ( messageView instanceof TextView ) { TextView messageTextView = ( TextView ) messageView ; if ( TextUtils . isEmpty ( getDialog ( ) . getTitle ( ) ) ) { messageTextView . setTextSize ( TypedValue . COMPLEX_UNIT_PX , getContext ( ) . getResources ( ) . getDimensionPixelSize ( R . dimen . dialog_message_text_size_large ) ) ; } else { messageTextView . setTextSize ( TypedValue . COMPLEX_UNIT_PX , getContext ( ) . getResources ( ) . getDimensionPixelSize ( R . dimen . dialog_message_text_size_normal ) ) ; } } } }
Adapts the text size of the dialog s message depending on whether a title is shown .