Dear,
I have a project
In one screen, it has listview (html list), it is showed with html (ionic screen) and other part has videoplayer, display by native android component.
at the initial time, videoview is front of listview, but somtime we need listview is front of video view. From plugin we do this by bring web view to front, but when we bring web view to front, the issue apper, we can’t scroll list view
public void onShow() {
FrameLayout.LayoutParams layoutParams = new FrameLayout.LayoutParams(
(int)(mActivity.getWindowManager().getDefaultDisplay().getWidth()*0.5),
mActivity.getWindowManager().getDefaultDisplay().getHeight());
layoutParams.setMargins((int)(mActivity.getWindowManager().getDefaultDisplay().getWidth()*0.5), 0, 0, 0);
FrameLayout.LayoutParams layoutParams2 = new FrameLayout.LayoutParams(
(int)(mActivity.getWindowManager().getDefaultDisplay().getWidth()*0.5),
mActivity.getWindowManager().getDefaultDisplay().getHeight());
layoutParams2.setMargins(0, 0, 0, 0);
mWebview.getView().setLayoutParams(layoutParams);
horizontalButtonListioner.onShow();
mWebview.getView().bringToFront();
shadowView.setLayoutParams(layoutParams2);
ViewGroup vg = (ViewGroup)shadowView.getParent();
if(vg!=null){
vg.removeView(shadowView);
}
mActivity.addContentView(shadowView,layoutParams2);
shadowView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
onHide();
}
});
}
@Override
public void onHide() {
if(VideoViewFragment.isShowHorizontalList) {
VideoViewFragment.mVideoView.bringToFront();
frameController.bringToFront();
horizontalButtonListioner.onHide();
FrameLayout.LayoutParams layoutParams = null;
if(VideoViewFragment.currentScreen == VideoViewFragment.CURRENT_PORTTRAIT) {
layoutParams = new FrameLayout.LayoutParams(
(int) (mActivity.getWindowManager().getDefaultDisplay().getWidth()),
mActivity.getWindowManager().getDefaultDisplay().getHeight());
}
else {
layoutParams = new FrameLayout.LayoutParams(
(int) (mActivity.getWindowManager().getDefaultDisplay().getHeight()),
mActivity.getWindowManager().getDefaultDisplay().getWidth());
}
layoutParams.setMargins(0, 0, 0, 0);
mWebview.getView().setLayoutParams(layoutParams);
VideoViewFragment.isShowHorizontalList = false;
((ViewGroup)(shadowView.getParent())).removeView(shadowView);
}
}