本文整理汇总了Java中android.widget.RadioButton.setVisibility方法的典型用法代码示例。如果您正苦于以下问题:Java RadioButton.setVisibility方法的具体用法?Java RadioButton.setVisibility怎么用?Java RadioButton.setVisibility使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.widget.RadioButton
的用法示例。
在下文中一共展示了RadioButton.setVisibility方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: bindType
import android.widget.RadioButton; //导入方法依赖的package包/类
private void bindType(int id, RuleInfo ri) {
final RadioButton rb = (RadioButton) mTypes.findViewById(id);
if (ri == null) {
rb.setVisibility(View.GONE);
return;
}
rb.setVisibility(View.VISIBLE);
if (ri.caption != null) {
rb.setText(ri.caption);
}
rb.setTag(ri);
}
示例2: getView
import android.widget.RadioButton; //导入方法依赖的package包/类
/**
*
*/
@Override
public View getView(final int position, View convertView, final ViewGroup parent)
{
if (convertView == null)
{
final LayoutInflater inflater = ((Activity) context).getLayoutInflater();
convertView = inflater.inflate(R.layout.map_filter_item, parent, false);
}
final TextView titleTextView = (TextView) convertView.findViewById(android.R.id.title);
final TextView summaryTextView = (TextView) convertView.findViewById(android.R.id.summary);
final TextView subselectTextView = (TextView) convertView.findViewById(R.id.subselect);
final RadioButton checkedTextView = (RadioButton) convertView.findViewById(R.id.radiobutton);
// /
final ServerOption entry = (ServerOption) getItem(position);
if (isRootElement) {
checkedTextView.setVisibility(View.GONE);
}
String subOptions = "";
if (entry.isChecked()) {
for (ServerOption o : options.getSelectedSubOptions(entry)) {
subOptions = o.getTitle() + (subOptions.length() > 0 ? ", " : "") + subOptions ;
}
}
// /
subselectTextView.setText(subOptions);
titleTextView.setText(entry.getTitle());
summaryTextView.setText(entry.getSummary());
checkedTextView.setChecked(entry.isChecked());
return convertView;
}
示例3: setRadioDisChecked
import android.widget.RadioButton; //导入方法依赖的package包/类
/**
* 设置未所有Item为未选中
*/
private void setRadioDisChecked(ViewGroup parentView) {
if (parentView == null || parentView.getChildCount() < 1) {
return;
}
for (int i = 0; i < parentView.getChildCount(); i++) {
View itemView = parentView.getChildAt(i);
RadioButton rbSelect = (RadioButton) itemView.findViewById(R.id.rb_selected);
if (rbSelect != null) {
rbSelect.setVisibility(View.GONE);
rbSelect.setChecked(false);
}
}
}