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

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

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

ScrollView.setFocusable介绍

暂无

代码示例

代码示例来源:origin: ACRA/acra

root.setPadding(PADDING, PADDING, PADDING, PADDING);
root.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));
root.setFocusable(true);
root.setFocusableInTouchMode(true);
root.addView(scrollable);

代码示例来源: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: stackoverflow.com

ScrollView sv = (ScrollView) view.findViewById(R.id.svRecord);
 sv.setOnTouchListener(this);
 sv.setDescendantFocusability(ViewGroup.FOCUS_BEFORE_DESCENDANTS);
 sv.setFocusable(true);
 sv.setFocusableInTouchMode(true);

相关文章

ScrollView类方法