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;
}
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());
}
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);
}
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);
}
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);
}
Aggregations