本文整理汇总了Java中android.widget.CompoundButton.getTag方法的典型用法代码示例。如果您正苦于以下问题:Java CompoundButton.getTag方法的具体用法?Java CompoundButton.getTag怎么用?Java CompoundButton.getTag使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.widget.CompoundButton
的用法示例。
在下文中一共展示了CompoundButton.getTag方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onClick
import android.widget.CompoundButton; //导入方法依赖的package包/类
@Override
public void onClick(View v) {
CompoundButton cb = (CompoundButton) v;
NewConditionItem item = (NewConditionItem) cb.getTag();
boolean refresh = item.parent.processSubItems(item, cb.isChecked());
cb.setChecked(item.selected);
if (refresh) {
setConditionItem(mRoot);
this.postDelayed(new Runnable() {
@Override
public void run() {
mController.confirm(SorterContainer.this);
}
}, 20);
}
}
示例2: onClick
import android.widget.CompoundButton; //导入方法依赖的package包/类
@Override
public void onClick(View v) {
CompoundButton cb = (CompoundButton) v;
NewConditionItem item = (NewConditionItem) cb.getTag();
boolean refresh = item.parent.processSubItems(item, cb.isChecked());
cb.setChecked(item.selected);
if (refresh) {
item.rootClear();
setLv2Item(item.parent);
}
if (!checkConfimPannelVisibility()) {
refreshDrawableState();
v.postDelayed(new Runnable() {
@Override
public void run() {
mController.confirm(RegionContainer.this);
}
}, 20);
}
}
示例3: onCheckedChanged
import android.widget.CompoundButton; //导入方法依赖的package包/类
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
String codecName = (String) buttonView.getTag();
if(codecName != null) {
HashMap<String, Object> codec = null;
for( int i = 0; i < mAdapter.getCount(); i++) {
@SuppressWarnings("unchecked")
HashMap<String, Object> tCodec = (HashMap<String, Object>) mAdapter.getItem(i);
if(codecName.equalsIgnoreCase( (String) tCodec.get(CODEC_NAME))) {
codec = tCodec;
break;
}
}
if(codec != null) {
userActivateCodec(codec, isChecked);
}
}
}
示例4: onCheckedChanged
import android.widget.CompoundButton; //导入方法依赖的package包/类
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
int id = (int) buttonView.getTag();
Log.e("js", "ischecked:" + isChecked);
// TODO Auto-generated method stub
if (isChecked) {
if (chooseVideo.size() >= StaticMethod.importVideos) {
Toast.makeText(this, "最多3个视频", 1).show();
buttonView.setChecked(false);
} else {
Log.e("js", "getPath:" + getPath(id));
chooseVideo.put(id, getPath(id));
}
} else {
if (chooseVideo.containsKey(id)) {
chooseVideo.remove(id);
}
}
showNum();
}
示例5: onCheckedChanged
import android.widget.CompoundButton; //导入方法依赖的package包/类
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
WeightPhoto photo = (WeightPhoto) buttonView.getTag();
if (!isChecked || !this.mSelect.contains(photo)) {
if (isChecked) {
int size = this.mSelect.size();
WeightPhotosActivity weightPhotosActivity = this.mActivity;
if (size >= 2) {
Helper.showToast((CharSequence) "最多选择两张图片");
buttonView.setChecked(false);
return;
}
}
if (isChecked) {
this.mSelect.add(photo);
} else {
this.mSelect.remove(photo);
}
this.mActivity.setSelectText();
}
}
示例6: clear
import android.widget.CompoundButton; //导入方法依赖的package包/类
public void clear() {
for (int i = 0; i < mGrid.getChildCount(); i++) {
CompoundButton btn = (CompoundButton) mGrid.getChildAt(i);
NewConditionItem item = (NewConditionItem) btn.getTag();
item.reset();
setConditionItem(item);
}
}
示例7: onCheckedChanged
import android.widget.CompoundButton; //导入方法依赖的package包/类
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
NewConditionItem item = (NewConditionItem) buttonView.getTag();
boolean refresh = item.parent.processSubItems(item, buttonView.isChecked());
buttonView.setChecked(item.selected);
if (refresh) {
setConditionItem(item.parent);
}
}
示例8: onCheckedChanged
import android.widget.CompoundButton; //导入方法依赖的package包/类
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
ReportField field = (ReportField) buttonView.getTag();
if (field != null) {
if (isChecked) excludedFields.remove(field);
else excludedFields.add(field);
}
}
示例9: onCheckedChanged
import android.widget.CompoundButton; //导入方法依赖的package包/类
@Override
public void onCheckedChanged(CompoundButton compoundButton, boolean b) {
String path = (String) compoundButton.getTag();
excludedPathChangeCallback.onExcludedPathChange(path, b);
File_POJO file = null;
for (int i = 0; i < files.getChildren().size(); i++) {
File_POJO f = files.getChildren().get(i);
if (f.getPath().equals(path)) {
file = f;
}
}
if (file != null) {
file.excluded = b;
}
}
示例10: onCheckedChanged
import android.widget.CompoundButton; //导入方法依赖的package包/类
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
int pos = (Integer) buttonView.getTag();
mDataList.get(pos).getData().check = isChecked;
}