本文整理了Java中android.view.Window.addContentView()
方法的一些代码示例,展示了Window.addContentView()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Window.addContentView()
方法的具体详情如下:
包路径:android.view.Window
类名称:Window
方法名:addContentView
暂无
代码示例来源:origin: rey5137/material
/**
* Show this button at the specific location. If this button isn't attached to any parent view yet,
* it will be add to activity's root view. If not, it will just update the location.
* @param activity The activity that this button will be attached to.
* @param x The x value of anchor point.
* @param y The y value of anchor point.
* @param gravity The gravity apply with this button.
*
* @see Gravity
*/
public void show(Activity activity, int x, int y, int gravity){
if(getParent() == null){
FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(mBackground.getIntrinsicWidth(), mBackground.getIntrinsicHeight());
updateParams(x, y, gravity, params);
activity.getWindow().addContentView(this, params);
}
else
updateLocation(x, y, gravity);
}
代码示例来源:origin: com.actionbarsherlock/actionbarsherlock
@Override
public void addContentView(View view, LayoutParams params) {
if (ActionBarSherlock.DEBUG) Log.d(TAG, "[addContentView] view: " + view + ", params: " + params);
mActivity.getWindow().addContentView(view, params);
initActionBar();
}
代码示例来源:origin: com.willowtreeapps/oak-demos
@Override
public void addContentView(View view, LayoutParams params) {
if (DEBUG) Log.d(TAG, "[addContentView] view: " + view + ", params: " + params);
mActivity.getWindow().addContentView(view, params);
initActionBar();
}
内容来源于网络,如有侵权,请联系作者删除!