Search in sources :

Example 1 with Checkable

use of android.widget.Checkable in project baseAdapter by hongyangAndroid.

the class ViewHolder method setChecked.

public ViewHolder setChecked(int viewId, boolean checked) {
    Checkable view = (Checkable) getView(viewId);
    view.setChecked(checked);
    return this;
}
Also used : Checkable(android.widget.Checkable)

Example 2 with Checkable

use of android.widget.Checkable in project SeriesGuide by UweTrottmann.

the class ManageListsDialogFragment method onItemClick.

@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
    Checkable checkable = (Checkable) view;
    checkable.toggle();
    mAdapter.setItemChecked(position, checkable.isChecked());
}
Also used : Checkable(android.widget.Checkable)

Example 3 with Checkable

use of android.widget.Checkable in project android_frameworks_base by ParanoidAndroid.

the class CheckBoxPreference method onBindView.

@Override
protected void onBindView(View view) {
    super.onBindView(view);
    View checkboxView = view.findViewById(com.android.internal.R.id.checkbox);
    if (checkboxView != null && checkboxView instanceof Checkable) {
        ((Checkable) checkboxView).setChecked(mChecked);
        sendAccessibilityEvent(checkboxView);
    }
    syncSummaryView(view);
}
Also used : Checkable(android.widget.Checkable) View(android.view.View)

Example 4 with Checkable

use of android.widget.Checkable in project XobotOS by xamarin.

the class SwitchPreference method onBindView.

@Override
protected void onBindView(View view) {
    super.onBindView(view);
    View checkableView = view.findViewById(com.android.internal.R.id.switchWidget);
    if (checkableView != null && checkableView instanceof Checkable) {
        ((Checkable) checkableView).setChecked(mChecked);
        sendAccessibilityEvent(checkableView);
        if (checkableView instanceof Switch) {
            final Switch switchView = (Switch) checkableView;
            switchView.setTextOn(mSwitchOn);
            switchView.setTextOff(mSwitchOff);
            switchView.setOnCheckedChangeListener(mListener);
        }
    }
    syncSummaryView(view);
}
Also used : Switch(android.widget.Switch) Checkable(android.widget.Checkable) View(android.view.View)

Example 5 with Checkable

use of android.widget.Checkable in project android_frameworks_base by ResurrectionRemix.

the class SwitchPreference method onBindView.

@Override
protected void onBindView(View view) {
    super.onBindView(view);
    View checkableView = view.findViewById(com.android.internal.R.id.switch_widget);
    if (checkableView != null && checkableView instanceof Checkable) {
        if (checkableView instanceof Switch) {
            final Switch switchView = (Switch) checkableView;
            switchView.setOnCheckedChangeListener(null);
        }
        ((Checkable) checkableView).setChecked(mChecked);
        if (checkableView instanceof Switch) {
            final Switch switchView = (Switch) checkableView;
            switchView.setTextOn(mSwitchOn);
            switchView.setTextOff(mSwitchOff);
            switchView.setOnCheckedChangeListener(mListener);
        }
    }
    syncSummaryView(view);
}
Also used : Switch(android.widget.Switch) Checkable(android.widget.Checkable) View(android.view.View)

Aggregations

Checkable (android.widget.Checkable)80 View (android.view.View)47 TextView (android.widget.TextView)18 ViewGroup (android.view.ViewGroup)9 OnClickListener (android.view.View.OnClickListener)7 ImageView (android.widget.ImageView)7 Switch (android.widget.Switch)7 ResourceReference (com.android.ide.common.rendering.api.ResourceReference)6 Resources (android.content.res.Resources)5 Paint (android.graphics.Paint)5 Point (android.graphics.Point)4 SuppressLint (android.annotation.SuppressLint)3 AdapterView (android.widget.AdapterView)3 CheckBox (android.widget.CheckBox)3 ListView (android.widget.ListView)3 Spinner (android.widget.Spinner)3 Map (java.util.Map)3 Switch (org.holoeverywhere.widget.Switch)3 SimpleArrayMap (android.support.v4.util.SimpleArrayMap)2 AlertDialog (android.support.v7.app.AlertDialog)2