Code example for ImageButton

Methods: requestFocussetEnabled

0
	} 
 
	private void disableUnsupportedButtons() { 
		try { 
			if (mPauseButton != null && !mPlayer.canPause())
				mPauseButton.setEnabled(false);
		} catch (IncompatibleClassChangeError ex) {
		} 
	} 
 
	/** 
	 * <p> 
	 * Change the animation style resource for this controller. 
	 * </p> 
	 *  
	 * <p> 
	 * If the controller is showing, calling this method will take effect only 
	 * the next time the controller is shown. 
	 * </p> 
	 *  
	 * @param animationStyle 
	 *            animation style to use when the controller appears and 
	 *            disappears. Set to -1 for the default animation, 0 for no 
	 *            animation, or a resource identifier for an explicit animation. 
	 *  
	 */ 
	public void setAnimationStyle(int animationStyle) {
		mAnimStyle = animationStyle;
	} 
 
	/** 
	 * Show the controller on screen. It will go away automatically after 
	 * 'timeout' milliseconds of inactivity. 
	 *  
	 * @param timeout 
	 *            The timeout in milliseconds. Use 0 to show the controller 
	 *            until hide() is called. 
	 */ 
	public void show(int timeout) {
		if (!mShowing && mAnchor != null && mAnchor.getWindowToken() != null) {
			if (mPauseButton != null)
				mPauseButton.requestFocus();
			disableUnsupportedButtons(); 
 
			if (mFromXml) {
				setVisibility(View.VISIBLE);
			} else { 
Experience pair programming with AI  Get Codota for Java