Code example for ToggleButton

Methods: setVisibilitysetChecked

0
		PassageChangeMediator.getInstance().forcePageUpdate(); 
	} 
 
	public void update() { 
        boolean showStrongsToggle = canShow();
        mButton.setVisibility(showStrongsToggle? View.VISIBLE : View.GONE);
        if (showStrongsToggle) {
	        boolean isShowstrongs = CommonUtils.getSharedPreferences().getBoolean("show_strongs_pref", true);
	        mButton.setChecked(isShowstrongs);
        } 
	} 
 
	/** return true if Strongs are relevant to this doc & screen */ 
	@Override 
	public boolean canShow() { 
		return isEnoughRoomInToolbar() && ControlFactory.getInstance().getDocumentControl().isStrongsInBook(); 
	} 
 
	@Override 
	public int getPriority() { 
Stop searching for code, let great code find you!  Add Codota to your java IDE