本文整理了Java中android.widget.CheckBox.getLayoutParams()
方法的一些代码示例,展示了CheckBox.getLayoutParams()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。CheckBox.getLayoutParams()
方法的具体详情如下:
包路径:android.widget.CheckBox
类名称:CheckBox
方法名:getLayoutParams
暂无
代码示例来源:origin: Chion82/WeChatMomentStat-Android
protected void loadUserList() {
LinearLayout userListContainer = (LinearLayout)findViewById(R.id.user_list_container);
ArrayList<UserSnsInfo> userSnsList = Share.snsData.userSnsList;
checkBoxList.clear();
userListContainer.removeAllViews();
for (int i=0;i<userSnsList.size();i++) {
CheckBox userCheckBox = new CheckBox(this);
userCheckBox.setText(userSnsList.get(i).userName + "(" + userSnsList.get(i).userId + ")" + "(" + String.format(getString(R.string.user_moment_count), userSnsList.get(i).snsList.size()) + ")");
userListContainer.addView(userCheckBox);
LinearLayout.LayoutParams layoutParams = (LinearLayout.LayoutParams)userCheckBox.getLayoutParams();
layoutParams.setMargins(5, 5, 5, 5);
userCheckBox.setLayoutParams(layoutParams);
userCheckBox.setChecked(true);
userCheckBox.setTag(userSnsList.get(i).userId);
checkBoxList.add(userCheckBox);
}
}
代码示例来源:origin: derry/delion
- ViewCompat.getPaddingEnd(mStoreLocallyTooltipIcon)
- MarginLayoutParamsCompat.getMarginStart((RelativeLayout.LayoutParams)
mStoreLocallyCheckbox.getLayoutParams())
- MarginLayoutParamsCompat.getMarginEnd((RelativeLayout.LayoutParams)
mStoreLocallyTooltipIcon.getLayoutParams()));
代码示例来源:origin: supertaohaili/book
checkBox.setFocusable(false);
addView(checkBox);
layoutParams = (LayoutParams) checkBox.getLayoutParams();
layoutParams.width = LayoutParams.WRAP_CONTENT;
layoutParams.height = LayoutParams.WRAP_CONTENT;
内容来源于网络,如有侵权,请联系作者删除!