Code example for Handler

0
		// set display size 
		final Display display = getWindowManager().getDefaultDisplay(); 
		ThumbSize.setScreenSize(display.getWidth(), display.getHeight());
		 
		setTitle("XBMC Hosts");
		mSettingsController = new SettingsController(this, new Handler());
		mConfigurationManager = ConfigurationManager.getInstance(this);
		setPreferenceScreen(mSettingsController.createHostsPreferences(getPreferenceManager().createPreferenceScreen(this), this));
	} 
	 
	@Override 
	public boolean onCreateOptionsMenu(Menu menu) {
		mSettingsController.onCreateOptionsMenu(menu);
		return super.onCreateOptionsMenu(menu);
	} 
	 
	@Override 
	public boolean onMenuItemSelected(int featureId, MenuItem item) {
		mSettingsController.onMenuItemSelected(featureId, item);
		return super.onMenuItemSelected(featureId, item);
	}