當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。