本文整理了Java中androidx.core.widget.NestedScrollView.removeView()
方法的一些代码示例,展示了NestedScrollView.removeView()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。NestedScrollView.removeView()
方法的具体详情如下:
包路径:androidx.core.widget.NestedScrollView
类名称:NestedScrollView
方法名:removeView
暂无
代码示例来源:origin: pranavpandey/dynamic-support
private void setupContent(ViewGroup contentPanel) {
mScrollView = mWindow.findViewById(R.id.scrollView);
mScrollView.setFocusable(false);
ViewCompat.setNestedScrollingEnabled(mScrollView, false);
// Special case for users that only want to display a String
mMessageView = contentPanel.findViewById(android.R.id.message);
if (mMessageView == null) {
return;
}
if (mMessage != null) {
mMessageView.setText(mMessage);
} else {
mMessageView.setVisibility(View.GONE);
mScrollView.removeView(mMessageView);
if (mListView != null) {
final ViewGroup scrollParent = (ViewGroup) mScrollView.getParent();
final int childIndex = scrollParent.indexOfChild(mScrollView);
scrollParent.removeViewAt(childIndex);
scrollParent.addView(mListView, childIndex,
new ViewGroup.LayoutParams(MATCH_PARENT, MATCH_PARENT));
} else {
// contentPanel.setVisibility(View.GONE);
}
}
}
代码示例来源:origin: bkhezry/ExtraWebView
private void setFullscreen(boolean isFullscreen) {
if (!getUserVisibleHint()) {
return;
}
mFullscreen = isFullscreen;
mControls.setVisibility(isFullscreen ? VISIBLE : View.GONE);
AppUtils.toggleWebViewZoom(mWebView.getSettings(), isFullscreen);
if (isFullscreen) {
mScrollView.removeView(mScrollViewContent);
mFullscreenView.addView(mScrollViewContent);
} else {
reset();
mWebView.pageUp(true);
mFullscreenView.removeView(mScrollViewContent);
mScrollView.addView(mScrollViewContent);
}
}
内容来源于网络,如有侵权,请联系作者删除!