android.widget.ScrollView.removeView()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(1.9k)|赞(0)|评价(0)|浏览(116)

本文整理了Java中android.widget.ScrollView.removeView()方法的一些代码示例,展示了ScrollView.removeView()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ScrollView.removeView()方法的具体详情如下:
包路径:android.widget.ScrollView
类名称:ScrollView
方法名:removeView

ScrollView.removeView介绍

暂无

代码示例

代码示例来源:origin: MiEcosystem/mijiaSDK

private void setupContent(LinearLayout contentPanel) {
  mScrollView = (ScrollView) mWindow.findViewById(R.id.scrollView);
  mScrollView.setFocusable(false);
  // Special case for users that only want to display a String
  mMessageView = (TextView) mWindow.findViewById(R.id.message);
  if (mMessageView == null) {
    return;
  }
  if (mMessage != null) {
    mMessageView.setText(mMessage);
  } else {
    mMessageView.setVisibility(View.GONE);
    mScrollView.removeView(mMessageView);
    if (mListView != null) {
      contentPanel.removeView(mWindow.findViewById(R.id.scrollView));
      contentPanel.addView(mListView,
          new LinearLayout.LayoutParams(MATCH_PARENT, MATCH_PARENT));
      contentPanel.setLayoutParams(new LinearLayout.LayoutParams(MATCH_PARENT, 0, 1.0f));
    } else {
      contentPanel.setVisibility(View.GONE);
    }
  }
}

代码示例来源:origin: wasdennnoch/AndroidN-ify

@Override
  protected void afterHookedMethod(MethodHookParam param) throws Throwable {
    ScrollView scrollView = (ScrollView) param.getResult();
    LinearLayout layout = (LinearLayout) scrollView.getChildAt(0);
    scrollView.removeView(layout);
    FrameLayout container = new FrameLayout(scrollView.getContext());
    container.addView(layout);
    DashboardOverlay overlay = new DashboardOverlay(scrollView.getContext());
    overlay.setDashboardLayout(layout);
    container.addView(overlay);
    scrollView.addView(container);
  }
});

代码示例来源:origin: w446108264/StickHeaderLayout

ScrollView scrollView = (ScrollView) mScrollItemView;
View contentView = scrollView.getChildAt(0);
scrollView.removeView(contentView);
LinearLayout childLayout = new LinearLayout(getContext());
childLayout.setOrientation(LinearLayout.VERTICAL);

代码示例来源:origin: w446108264/StickHeaderLayout

scrollView.removeView(contentView);

相关文章

ScrollView类方法