use of android.widget.Checkable in project BookReader by JustWayward.
the class EasyLVHolder method setChecked.
@Override
public EasyLVHolder setChecked(int viewId, boolean checked) {
Checkable view = getView(viewId);
view.setChecked(checked);
return this;
}
use of android.widget.Checkable in project little-bear-dictionary by daimajia.
the class CheckBoxPreference method onBindView.
@Override
protected void onBindView(View view) {
super.onBindView(view);
View checkboxView = view.findViewById(R.id.checkbox);
if (checkboxView != null && checkboxView instanceof Checkable) {
((Checkable) checkboxView).setChecked(mChecked);
sendAccessibilityEvent(checkboxView);
}
syncSummaryView(view);
}
use of android.widget.Checkable in project little-bear-dictionary by daimajia.
the class SwitchPreference method onBindView.
@Override
protected void onBindView(View view) {
super.onBindView(view);
View checkableView = view.findViewById(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 little-bear-dictionary by daimajia.
the class ListView method updateOnScreenCheckedViews.
@SuppressLint("NewApi")
private void updateOnScreenCheckedViews() {
final int firstPos = getFirstVisiblePosition();
final int count = getChildCount();
for (int i = 0; i < count; i++) {
final View child = getChildAt(i);
final int position = firstPos + i;
boolean state = getCheckedItemPositions().get(position);
if (child instanceof Checkable) {
((Checkable) child).setChecked(state);
} else if (VERSION.SDK_INT >= 11) {
child.setActivated(state);
}
}
}
use of android.widget.Checkable in project HoloEverywhere by Prototik.
the class CheckBoxPreference method onBindView.
@Override
protected void onBindView(View view) {
super.onBindView(view);
View checkboxView = view.findViewById(R.id.checkbox);
if (checkboxView != null && checkboxView instanceof Checkable) {
((Checkable) checkboxView).setChecked(mChecked);
sendAccessibilityEvent(checkboxView);
}
syncSummaryView(view);
}
Aggregations