本文整理了Java中android.app.Activity.addContentView()
方法的一些代码示例,展示了Activity.addContentView()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Activity.addContentView()
方法的具体详情如下:
包路径:android.app.Activity
类名称:Activity
方法名:addContentView
暂无
代码示例来源:origin: com.uphyca/android-junit4-robolectric
/**
* @param view
* @param params
* @see android.app.Activity#addContentView(android.view.View,
* android.view.ViewGroup.LayoutParams)
*/
public void addContentView(View view,
LayoutParams params) {
mActivity.addContentView(view, params);
}
代码示例来源:origin: stackoverflow.com
Activity mActivity=CCDirector.sharedDirector().getActivity();
View view=(LinearLayout) LayoutInflater.from(mActivity).inflate(R.layout.level_scroll,null);
mActivity.runOnUiThread(new Runnable() {
@Override
public void run() {
// TODO Auto-generated method stub
mActivity.addContentView(view, new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
}
代码示例来源:origin: ManbangGroup/Phantom
@Override
public void addContentView(View view, ViewGroup.LayoutParams params) {
mContentProxy.getContext().addContentView(view, params);
}
代码示例来源:origin: stackoverflow.com
public static void SetActivityRoot(Activity c) {
View v = ((ViewGroup)c.findViewById(android.R.id.content)).getChildAt(0);
ScrollView sv = new ScrollView(c);
LayoutParams lp = new LayoutParams(LayoutParams.MATCH_PARENT,
LayoutParams.MATCH_PARENT);
sv.setLayoutParams(lp);
((ViewGroup) v.getParent()).removeAllViews();
sv.addView((View) v);
c.addContentView(sv, lp);
}
代码示例来源:origin: Unity-Technologies/unity-ads-android
@Override
public void run() {
_webPlayer = new WebPlayer(activity, "webplayer", null, null);
activity.addContentView(_webPlayer, new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
viewAddCV.open();
}
});
代码示例来源:origin: Unity-Technologies/unity-ads-android
@Override
public void run() {
_webPlayer = new WebPlayer(activity, "webplayer", webSettings, webPlayerSettings);
activity.addContentView(_webPlayer, new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
viewAddCV.open();
}
});
代码示例来源:origin: Unity-Technologies/unity-ads-android
@Override
public void run() {
_webPlayer = new WebPlayer(activity, "webplayer", null, null);
_webPlayer.setEventSettings(eventSettings);
activity.addContentView(_webPlayer, new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
viewAddCV.open();
_webPlayer.loadUrl("http://testing.wrong.url");
}
});
代码示例来源:origin: Unity-Technologies/unity-ads-android
@Override
public void run() {
_webPlayer = new WebPlayer(activity, "webplayer", null, null);
_webPlayer.setEventSettings(eventSettings);
activity.addContentView(_webPlayer, new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
viewAddCV.open();
_webPlayer.loadUrl(TestUtilities.getTestServerAddress());
}
});
代码示例来源:origin: Unity-Technologies/unity-ads-android
@Override
public void run() {
((MockWebViewApp)WebViewApp.getCurrentApp()).VIDEOPLAYER_VIEW = new VideoPlayerView(getInstrumentation().getTargetContext());
activity.addContentView(((MockWebViewApp)WebViewApp.getCurrentApp()).VIDEOPLAYER_VIEW, new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
viewAddCV.open();
}
});
代码示例来源:origin: Unity-Technologies/unity-ads-android
@Override
public void run() {
((MockWebViewApp)WebViewApp.getCurrentApp()).VIDEOPLAYER_VIEW = new VideoPlayerView(getInstrumentation().getTargetContext());
activity.addContentView(((MockWebViewApp)WebViewApp.getCurrentApp()).VIDEOPLAYER_VIEW, new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
viewAddCV.open();
}
});
代码示例来源:origin: Unity-Technologies/unity-ads-android
@Override
public void run() {
((MockWebViewApp)WebViewApp.getCurrentApp()).VIDEOPLAYER_VIEW = new VideoPlayerView(getInstrumentation().getTargetContext());
activity.addContentView(((MockWebViewApp)WebViewApp.getCurrentApp()).VIDEOPLAYER_VIEW, new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
viewAddCV.open();
}
});
代码示例来源:origin: Unity-Technologies/unity-ads-android
@Override
public void run() {
((MockWebViewApp)WebViewApp.getCurrentApp()).VIDEOPLAYER_VIEW = new VideoPlayerView(getInstrumentation().getTargetContext());
activity.addContentView(((MockWebViewApp)WebViewApp.getCurrentApp()).VIDEOPLAYER_VIEW, new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
viewAddCV.open();
}
});
代码示例来源:origin: Unity-Technologies/unity-ads-android
@Override
public void run() {
((MockWebViewApp)WebViewApp.getCurrentApp()).VIDEOPLAYER_VIEW = new VideoPlayerView(getInstrumentation().getTargetContext());
activity.addContentView(((MockWebViewApp)WebViewApp.getCurrentApp()).VIDEOPLAYER_VIEW, new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
viewAddCV.open();
}
});
代码示例来源:origin: Unity-Technologies/unity-ads-android
@Override
public void run() {
((MockWebViewApp)WebViewApp.getCurrentApp()).VIDEOPLAYER_VIEW = new VideoPlayerView(getInstrumentation().getTargetContext());
activity.addContentView(((MockWebViewApp)WebViewApp.getCurrentApp()).VIDEOPLAYER_VIEW, new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
viewAddCV.open();
}
});
代码示例来源:origin: Unity-Technologies/unity-ads-android
@Override
public void run() {
((MockWebViewApp)WebViewApp.getCurrentApp()).VIDEOPLAYER_VIEW = new VideoPlayerView(getInstrumentation().getTargetContext());
activity.addContentView(((MockWebViewApp)WebViewApp.getCurrentApp()).VIDEOPLAYER_VIEW, new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
viewAddCV.open();
}
});
代码示例来源:origin: Unity-Technologies/unity-ads-android
@Override
public void run() {
((MockWebViewApp)WebViewApp.getCurrentApp()).VIDEOPLAYER_VIEW = new VideoPlayerView(getInstrumentation().getTargetContext());
activity.addContentView(((MockWebViewApp)WebViewApp.getCurrentApp()).VIDEOPLAYER_VIEW, new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
viewAddCV.open();
}
});
代码示例来源:origin: Unity-Technologies/unity-ads-android
@Override
public void run() {
((MockWebViewApp)WebViewApp.getCurrentApp()).VIDEOPLAYER_VIEW = new VideoPlayerView(getInstrumentation().getTargetContext());
activity.addContentView(((MockWebViewApp)WebViewApp.getCurrentApp()).VIDEOPLAYER_VIEW, new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
viewAddCV.open();
}
});
代码示例来源:origin: Unity-Technologies/unity-ads-android
@Override
public void run() {
((MockWebViewApp) WebViewApp.getCurrentApp()).VIDEOPLAYER_VIEW = new VideoPlayerView(getInstrumentation().getTargetContext());
activity.addContentView(((MockWebViewApp)WebViewApp.getCurrentApp()).VIDEOPLAYER_VIEW, new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
viewAddCV.open();
}
});
代码示例来源:origin: Unity-Technologies/unity-ads-android
@Override
public void run() {
((MockWebViewApp)WebViewApp.getCurrentApp()).VIDEOPLAYER_VIEW = new VideoPlayerView(getInstrumentation().getTargetContext());
activity.addContentView(((MockWebViewApp)WebViewApp.getCurrentApp()).VIDEOPLAYER_VIEW, new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
viewAddCV.open();
}
});
代码示例来源:origin: Unity-Technologies/unity-ads-android
@Override
public void run() {
((MockWebViewApp)WebViewApp.getCurrentApp()).VIDEOPLAYER_VIEW = new VideoPlayerView(getInstrumentation().getTargetContext());
activity.addContentView(((MockWebViewApp)WebViewApp.getCurrentApp()).VIDEOPLAYER_VIEW, new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
viewAddCV.open();
}
});
内容来源于网络,如有侵权,请联系作者删除!