use of android.widget.Checkable in project FreeFlow by Comcast.
the class FreeFlowContainer method updateOnScreenCheckedViews.
/**
* Perform a quick, in-place update of the checked or activated state on all
* visible item views. This should only be called when a valid choice mode
* is active.
*/
private void updateOnScreenCheckedViews() {
Iterator<?> it = frames.entrySet().iterator();
View child = null;
while (it.hasNext()) {
Map.Entry<?, FreeFlowItem> pairs = (Map.Entry<?, FreeFlowItem>) it.next();
child = pairs.getValue().view;
boolean isChecked = isChecked(pairs.getValue().itemSection, pairs.getValue().itemIndex);
if (child instanceof Checkable) {
((Checkable) child).setChecked(isChecked);
} else {
child.setActivated(isChecked);
}
}
}
use of android.widget.Checkable in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class CellDataPreference method onBindViewHolder.
@Override
public void onBindViewHolder(PreferenceViewHolder holder) {
super.onBindViewHolder(holder);
View switchView = holder.findViewById(android.R.id.switch_widget);
switchView.setClickable(false);
((Checkable) switchView).setChecked(mChecked);
}
use of android.widget.Checkable in project androidannotations by androidannotations.
the class CheckedChangeHandledActivityTest method testCheckedStatePassedToAnnotatedMethod.
@Test
public void testCheckedStatePassedToAnnotatedMethod() {
assertThat(activity.checked).isFalse();
Checkable button = (Checkable) activity.findViewById(R.id.conventionButton);
button.setChecked(true);
assertThat(activity.checked).isTrue();
}
use of android.widget.Checkable in project androidannotations by androidannotations.
the class CheckedChangeHandledActivityTest method testHandlingWithConvention.
@Test
public void testHandlingWithConvention() {
assertThat(activity.conventionButtonEventHandled).isFalse();
Checkable button = (Checkable) activity.findViewById(R.id.conventionButton);
button.setChecked(true);
assertThat(activity.conventionButtonEventHandled).isTrue();
}
use of android.widget.Checkable in project BookReader by JustWayward.
the class EasyRVHolder method setChecked.
@Override
public EasyRVHolder setChecked(int viewId, boolean checked) {
Checkable view = getView(viewId);
view.setChecked(checked);
return this;
}
Aggregations