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

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

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

CheckBox.setPadding介绍

暂无

代码示例

代码示例来源:origin: termux/termux-api

@Override
LinearLayout createWidgetView(AppCompatActivity activity) {
  LinearLayout layout = new LinearLayout(activity);
  layout.setOrientation(LinearLayout.VERTICAL);
  LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT);
  layoutParams.topMargin = 32;
  layoutParams.bottomMargin = 32;
  String[] values = getInputValues(activity.getIntent());
  for (int j = 0; j < values.length; ++j) {
    String value = values[j];
    CheckBox checkBox = new CheckBox(activity);
    checkBox.setText(value);
    checkBox.setId(j);
    checkBox.setTextSize(18);
    checkBox.setPadding(16, 16, 16, 16);
    checkBox.setLayoutParams(layoutParams);
    layout.addView(checkBox);
  }
  return layout;
}

代码示例来源:origin: labexp/osmtracker-android

layoutParams.setMargins(60, 0, 0, 0);
newCheckBox.setLayoutParams(layoutParams);
newCheckBox.setPadding(10,20,10,20);
newCheckBox.setOnClickListener(listener);
registerForContextMenu(newCheckBox);

代码示例来源:origin: WomenWhoCode/WomenWhoCode

cb.setPadding(32, 16, 4, 16);

代码示例来源:origin: linglongxin24/ARDevelopDemo

newView.setTag(command);
newView.setVisibility(View.VISIBLE);
newView.setPadding(mEntriesSidesPadding + leftPadding,
  mEntriesUpDownPadding, mEntriesSidesPadding,
  mEntriesUpDownPadding);

相关文章