Buggy code:
public class SettingsUltraFeaturesActivity extends BaseFragment { private ListView listView ; private int enableMarkdownRow ; private int PhotoQualityRow ; private int showAndroidEmojiRow ; private int disableTabletModeRow ; private int highlighWordsRow ; private int rowCount = 0 ; @ Override public boolean onFragmentCreate ( ) { } @ Override public void onFragmentDestroy ( ) { } @ Override <START_BUG> public View createView ( final LayoutInflater inflater , ViewGroup container ) { <END_BUG> if ( ( fragmentView ) == null ) { actionBar . setBackButtonImage ( ic_ab_back ) ; actionBar . setAllowOverlayTitle ( true ) ; actionBar . setTitle ( LocaleController . getString ( "UltraSettings" , UltraSettings ) ) ; actionBar . setActionBarMenuOnItemClick ( new ActionBar . ActionBarMenuOnItemClick ( ) { @ Override public void onItemClick ( int id ) { if ( id == ( - 1 ) ) { finishFragment ( ) ; } } } ) ; fragmentView = new FrameLayout ( getParentActivity ( ) ) ; FrameLayout frameLayout = ( ( FrameLayout ) ( fragmentView ) ) ; listView = new ListView ( getParentActivity ( ) ) ; listView . setDivider ( null ) ; listView . setDividerHeight ( 0 ) ; listView . setVerticalScrollBarEnabled ( false ) ; frameLayout . addView ( listView ) ; FrameLayout . LayoutParams layoutParams = ( ( FrameLayout . LayoutParams ) ( listView . getLayoutParams ( ) ) ) ; layoutParams . width = LayoutParams . MATCH_PARENT ; layoutParams . height = LayoutParams . MATCH_PARENT ; listView . setLayoutParams ( layoutParams ) ; listView . setAdapter ( new SettingsUltraFeaturesActivity . ListAdapter ( getParentActivity ( ) ) ) ; listView . setOnItemClickListener ( new AdapterView . OnItemClickListener ( ) { @ Override public void onItemClick ( AdapterView < ? > adapterView , View view , final int i , long l ) { boolean enabled = false ; if ( i == ( enableMarkdownRow ) ) { SharedPreferences preferences = applicationContext . getSharedPreferences ( "Ultra" , MODE_PRIVATE ) ; SharedPreferences . Editor editor = preferences . edit ( ) ; enabled = preferences . getBoolean ( "view_markdown" , false ) ; editor . putBoolean ( "view_markdown" , ( ! enabled ) ) ; editor . commit ( ) ; ApplicationLoader . MARK_DOWN = ! enabled ; } else if ( i == ( showAndroidEmojiRow ) ) { SharedPreferences preferences = applicationContext . getSharedPreferences ( "Ultra" , MODE_PRIVATE ) ; SharedPreferences . Editor editor = preferences . edit ( ) ; enabled = preferences . getBoolean ( "showAndroidEmoji" , false ) ; editor . putBoolean ( "showAndroidEmoji" , ( ! enabled ) ) ; editor . commit ( ) ; ApplicationLoader . SHOW_ANDROID_EMOJI = ! enabled ; } else if ( i == ( disableTabletModeRow ) ) { SharedPreferences preferences = applicationContext . getSharedPreferences ( "Ultra" , MODE_PRIVATE ) ; SharedPreferences . Editor editor = preferences . edit ( ) ; enabled = preferences . getBoolean ( "disableTabletMode" , false ) ; editor . putBoolean ( "disableTabletMode" , ( ! enabled ) ) ; editor . commit ( ) ; } else if ( i == ( PhotoQualityRow ) ) { final View layout = inflater . inflate ( settings_seekbar_dialog_layout , ( ( ViewGroup ) ( fragmentView . findViewById ( seekBar_Dialog_Layout ) ) ) ) ; AlertDialog . Builder builder = new AlertDialog . Builder ( getParentActivity ( ) ) ; builder . setView ( layout ) ; builder . setTitle ( LocaleController . getString ( "PhotoQuality" , PhotoQuality ) ) ; builder . setPositiveButton ( LocaleController . getString ( "OK" , OK ) , new DialogInterface . OnClickListener ( ) { public void onClick ( DialogInterface dialog , int which ) { if ( ( listView ) != null ) { listView . invalidateViews ( ) ; } dialog . dismiss ( ) ; } } ) ; builder . setOnCancelListener ( new DialogInterface . OnCancelListener ( ) { @ Override public void onCancel ( DialogInterface dialogInterface ) { if ( ( listView ) != null ) { listView . invalidateViews ( ) ; } } } ) ; AlertDialog alertDialog = builder . create ( ) ; alertDialog . show ( ) ; SeekBar sb = ( ( SeekBar ) ( layout . findViewById ( seekBar1 ) ) ) ; final TextView txtSeekPercent = ( ( TextView ) ( layout . findViewById ( txtSeekPercent ) ) ) ; SharedPreferences preferences = applicationContext . getSharedPreferences ( "Ultra" , MODE_PRIVATE ) ; int percent = preferences . getInt ( "PhotoQuality" , 80 ) ; txtSeekPercent . setText ( ( ( Integer . toString ( percent ) ) + "%" ) ) ; sb . setProgress ( percent ) ; sb . setOnSeekBarChangeListener ( new SeekBar . OnSeekBarChangeListener ( ) { public void onProgressChanged ( SeekBar seekBar , int progress , boolean fromUser ) { txtSeekPercent . setText ( ( ( Integer . toString ( progress ) ) + "%" ) ) ; } @ Override public void onStartTrackingTouch ( SeekBar seekBar ) { } @ Override public void onStopTrackingTouch ( SeekBar seekBar ) { SharedPreferences preferences = applicationContext . getSharedPreferences ( "Ultra" , MODE_PRIVATE ) ; SharedPreferences . Editor editor = preferences . edit ( ) ; editor . putInt ( "PhotoQuality" , seekBar . getProgress ( ) ) ; editor . commit ( ) ; } } ) ; } else if ( i == ( highlighWordsRow ) ) { presentFragment ( new UltraHighlightWordsActivity ( ) ) ; } if ( view instanceof TextCheckCell ) { ( ( TextCheckCell ) ( view ) ) . setChecked ( ( ! enabled ) ) ; } else if ( view instanceof TextUltraInfoCheckCell ) { ( ( TextUltraInfoCheckCell ) ( view ) ) . setChecked ( ( ! enabled ) ) ; } } } ) ; } else { ViewGroup parent = ( ( ViewGroup ) ( fragmentView . getParent ( ) ) ) ; if ( parent != null ) { parent . removeView ( fragmentView ) ; } } return fragmentView ; }

Fix:
public View createView ( final LayoutInflater inflater ) {