当前位置: 首页>>代码示例>>Java>>正文


Java Window.VISIBILITY_TRANSITION属性代码示例

本文整理汇总了Java中wei.mark.standout.ui.Window.VISIBILITY_TRANSITION属性的典型用法代码示例。如果您正苦于以下问题:Java Window.VISIBILITY_TRANSITION属性的具体用法?Java Window.VISIBILITY_TRANSITION怎么用?Java Window.VISIBILITY_TRANSITION使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在wei.mark.standout.ui.Window的用法示例。


在下文中一共展示了Window.VISIBILITY_TRANSITION属性的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: updateViewLayout

/**
 * Update the window corresponding to this id with the given params.
 *
 * @param id     The id of the window.
 * @param params The updated layout params to apply.
 */
public void updateViewLayout(int id, StandOutLayoutParams params) {
    Window window = getWindow(id);

    if (window != null) {

        if (window.visibility == Window.VISIBILITY_GONE) {
            return;
        }

        if (window.visibility == Window.VISIBILITY_TRANSITION) {
            return;
        }

        // alert callbacks and cancel if instructed
        if (onUpdate(id, window, params)) {
            Log.w(TAG, "Window " + id + " update cancelled by implementation.");
            return;
        }

        try {
            window.setLayoutParams(params);
            mWindowManager.updateViewLayout(window, params);
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
}
 
开发者ID:tuyendt6,项目名称:WindowsNoteMaster,代码行数:33,代码来源:StandOutWindow.java

示例2: updateViewLayout

/**
 * Update the window corresponding to this id with the given params.
 * 
 * @param id
 *            The id of the window.
 * @param params
 *            The updated layout params to apply.
 */
public void updateViewLayout(int id, StandOutLayoutParams params) {
	Window window = getWindow(id);

	if (window == null) {
		throw new IllegalArgumentException("Tried to updateViewLayout("
				+ id + ") a null window.");
	}

	if (window.visibility == Window.VISIBILITY_GONE) {
		return;
	}

	if (window.visibility == Window.VISIBILITY_TRANSITION) {
		return;
	}

	// alert callbacks and cancel if instructed
	if (onUpdate(id, window, params)) {
		Log.w(TAG, "Window " + id + " update cancelled by implementation.");
		return;
	}

	try {
		window.setLayoutParams(params);
		mWindowManager.updateViewLayout(window, params);
	} catch (Exception ex) {
		ex.printStackTrace();
	}
}
 
开发者ID:fatangare,项目名称:LogcatViewer,代码行数:37,代码来源:StandOutWindow.java

示例3: updateViewLayout

/**
 * Update the window corresponding to this id with the given params.
 * 
 * @param id
 *            The id of the window.
 * @param params
 *            The updated layout params to apply.
 */
public void updateViewLayout(int id, StandOutLayoutParams params) {
	Window window = getWindow(id);

	if (window == null) {
		return;
	}

	if (window.visibility == Window.VISIBILITY_GONE) {
		return;
	}

	if (window.visibility == Window.VISIBILITY_TRANSITION) {
		return;
	}

	// alert callbacks and cancel if instructed
	if (onUpdate(id, window, params)) {
		Log.w(TAG, "Window " + id + " update cancelled by implementation.");
		return;
	}

	try {
		window.setLayoutParams(params);
		mWindowManager.updateViewLayout(window, params);
	} catch (Exception ex) {
		ex.printStackTrace();
	}
}
 
开发者ID:MohammadAdib,项目名称:Roundr,代码行数:36,代码来源:StandOutWindow.java

示例4: bringToFront

/**
 * Bring the window corresponding to this id in front of all other windows.
 * The window may flicker as it is removed and restored by the system.
 * 
 * @param id
 *            The id of the window to bring to the front.
 */
public final synchronized void bringToFront(int id) {
	Window window = getWindow(id);
	if (window == null) {
		throw new IllegalArgumentException("Tried to bringToFront(" + id + ") a null window.");
	}

	if (window.visibility == Window.VISIBILITY_GONE) {
		throw new IllegalStateException("Tried to bringToFront(" + id + ") a window that is not shown.");
	}

	if (window.visibility == Window.VISIBILITY_TRANSITION) {
		return;
	}

	// alert callbacks and cancel if instructed
	if (onBringToFront(id, window)) {
		Log.w(TAG, "Window " + id + " bring to front cancelled by implementation.");
		return;
	}

	// StandOutLayoutParams params = window.getLayoutParams();
	// // remove from window manager then add back
	// try {
	// mWindowManager.removeView(window);
	// mWindowManager.addView(window, params);
	// inFront = window.id;
	// } catch (Exception ex) {
	// ex.printStackTrace();
	// }
}
 
开发者ID:tmatz,项目名称:FloatingStickies-custom,代码行数:37,代码来源:StandOutWindow.java

示例5: updateViewLayout

/**
 * Update the window corresponding to this id with the given params.
 * 
 * @param id
 *            The id of the window.
 * @param params
 *            The updated layout params to apply.
 */
public void updateViewLayout(int id, StandOutLayoutParams params) {
	Window window = getWindow(id);

	if (window != null) {

		if (window.visibility == Window.VISIBILITY_GONE) {
			return;
		}

		if (window.visibility == Window.VISIBILITY_TRANSITION) {
			return;
		}

		// alert callbacks and cancel if instructed
		if (onUpdate(id, window, params)) {
			Log.w(TAG, "Window " + id + " update cancelled by implementation.");
			return;
		}

		try {
			window.setLayoutParams(params);
			mWindowManager.updateViewLayout(window, params);
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}
}
 
开发者ID:tmatz,项目名称:FloatingStickies-custom,代码行数:35,代码来源:StandOutWindow.java


注:本文中的wei.mark.standout.ui.Window.VISIBILITY_TRANSITION属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。