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


Java Window.setLayoutParams方法代码示例

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


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

示例1: updateViewLayout

import wei.mark.standout.ui.Window; //导入方法依赖的package包/类
/**
 * 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,代码行数:34,代码来源:StandOutWindow.java

示例2: updateViewLayout

import wei.mark.standout.ui.Window; //导入方法依赖的package包/类
/**
 * 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,代码行数:38,代码来源:StandOutWindow.java

示例3: updateViewLayout

import wei.mark.standout.ui.Window; //导入方法依赖的package包/类
/**
 * 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,代码行数:37,代码来源:StandOutWindow.java

示例4: removeViews

import wei.mark.standout.ui.Window; //导入方法依赖的package包/类
private void removeViews(RelativeLayout main,RelativeLayout dock,int id,Window window,ImageView... view)
{
    if (Build.VERSION.SDK_INT >= 11)
        window.setLayoutParams(new StandOutLayoutParams(id,window.getWidth(),window.getHeight(),Math.round(window.getX()),Math.round(window.getY())));
    else
        window.setLayoutParams(new StandOutLayoutParams(id,window.getWidth(),window.getHeight()));
    StandOutWindow.sWindowCache.putCache(id,FloatingWidget.class,window);
    getStandOutContext().mWindowManager.removeView(dock);
    main.setBackgroundDrawable(null);
    for (int i = 0;i < view.length;i++)
    {
        main.removeView(view[i]);
        view[i].invalidate();
    }
}
 
开发者ID:sakchhams,项目名称:widgets,代码行数:16,代码来源:FloatingWidget.java

示例5: updateViewLayout

import wei.mark.standout.ui.Window; //导入方法依赖的package包/类
/**
 * 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,代码行数:36,代码来源:StandOutWindow.java


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