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

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

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

ScrollView.setPadding介绍

暂无

代码示例

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

@NonNull
protected View buildCustomView(@Nullable Bundle savedInstanceState) {
  final ScrollView root = new ScrollView(this);
  root.setPadding(PADDING, PADDING, PADDING, PADDING);
  root.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));
  root.setFocusable(true);

代码示例来源:origin: jakebonk/BoardView

@Override
  public void run() {
    scroll_view.setPadding(0,0,0,footer.getHeight());
    final LinearLayout.LayoutParams new_params = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT);
    new_params.setMargins(0,footer.getHeight()*-1,0,0);
    removeParent(footer);
    footer_layout.setLayoutParams(new_params);
    footer_layout.addView(footer);
  }
});

代码示例来源:origin: stackoverflow.com

public ScrollView LinkifyText(String message) 
{
  ScrollView svMessage = new ScrollView(this); 
  TextView tvMessage = new TextView(this);

  SpannableString spanText = new SpannableString(message);

  Linkify.addLinks(spanText, Linkify.ALL);
  tvMessage.setText(spanText);
  tvMessage.setMovementMethod(LinkMovementMethod.getInstance());

  svMessage.setPadding(14, 2, 10, 12);
  svMessage.addView(tvMessage);

  return svMessage;
}

代码示例来源:origin: stackoverflow.com

aboutTextView.setLayoutParams(new ScrollView.LayoutParams(
      LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT));
ScrollView scroll = new ScrollView(this);
int scrollPadding = getResources().getDimensionPixelSize(R.dimen.scroll_padding);
scroll.setPadding(scrollPadding, scrollPadding, scrollPadding, scrollPadding);
scroll.setLayoutParams(new RelativeLayout.LayoutParams(LayoutParams.FILL_PARENT,
      LayoutParams.FILL_PARENT));
scroll.addView(aboutTextView);
RelativeLayout fragmentContainer = (RelativeLayout) findViewById(R.id.fragmentContainer);
  fragmentContainer;
fragmentContainer.addView(scroll);

代码示例来源:origin: googlesamples/android-BasicManagedProfile

text.setText(message);
int size = (int) activity.getResources().getDimension(R.dimen.activity_horizontal_margin);
view.setPadding(size, size, size, size);
view.addView(text);
new AlertDialog.Builder(activity)

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

explanationView.setPadding(explanationViewPadding, 0, explanationViewPadding, 0);
explanationView.setId(explanationViewId);

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

statusView.setPadding(statusViewPadding, statusViewPadding, statusViewPadding, statusViewPadding);
statusView.setId(R.id.status_view);

代码示例来源:origin: fgl27/isu

scrollView.setPadding(0, 0, 0, 10);
linearLayout.addView(scrollView);

代码示例来源:origin: yoinx/kernel_adiutor

scrollView.setPadding(0, 0, 0, 10);
linearLayout.addView(scrollView);

相关文章

ScrollView类方法