当前位置: 首页>>代码示例>>Java>>正文


Java CompoundButton.getTag方法代码示例

本文整理汇总了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);
    }
}
 
开发者ID:Tamicer,项目名称:FilterBar,代码行数:18,代码来源:SorterContainer.java

示例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);
    }


}
 
开发者ID:Tamicer,项目名称:FilterBar,代码行数:24,代码来源:RegionContainer.java

示例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);
        }
    }
}
 
开发者ID:treasure-lau,项目名称:CSipSimple,代码行数:19,代码来源:CodecsFragment.java

示例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();
}
 
开发者ID:smartbeng,项目名称:PaoMovie,代码行数:21,代码来源:CameraMain2.java

示例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();
    }
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:21,代码来源:WeightPhotosActivity.java

示例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);
    }
}
 
开发者ID:Tamicer,项目名称:FilterBar,代码行数:9,代码来源:GridContainer.java

示例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);
    }

}
 
开发者ID:Tamicer,项目名称:FilterBar,代码行数:12,代码来源:GridContainer.java

示例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);
	}
}
 
开发者ID:rafjordao,项目名称:Nird2,代码行数:9,代码来源:DevReportActivity.java

示例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;
    }
}
 
开发者ID:kollerlukas,项目名称:Camera-Roll-Android-App,代码行数:16,代码来源:ExcludePathsActivity.java

示例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;
}
 
开发者ID:yedashen,项目名称:UltimateRecyclerView,代码行数:6,代码来源:StickyAdapter.java


注:本文中的android.widget.CompoundButton.getTag方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。