Code example for PreferenceScreen

Methods: findPreference

0
	 
	protected IMCheckBox(Context ctx, AttributeSet attrs) {
		super(ctx,attrs);
		key = attrs.getAttributeValue(androidns, "key");
		BOXES.add(new WeakReference<IMCheckBox>(this));
		((PreferenceScreen)ps.findPreference(key)).setOnPreferenceClickListener(lstnr);
	} 
	 
	@Override public void onFinishInflate() { 
		super.onFinishInflate(); 
		setChecked(PreferenceManager.getDefaultSharedPreferences(getContext()).getString(SETTING,"_"+key).equals(key));
	} 
 
	@Override public final void setChecked(boolean b) {
		if (isChecked()==b) return;
		super.setChecked(b);
		if (b) hasBecomeChecked();
	} 
	 
	public static void set(String key) {
		for (Iterator<WeakReference<IMCheckBox>> it=BOXES.iterator(); it.hasNext();) {