本文整理汇总了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();
}
}
}
示例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();
}
}
示例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();
}
}
示例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();
}
}
示例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();
}
}
}