use of android.widget.Checkable in project YhLibraryForAndroid by android-coco.
the class YHRecyclerViewHolder method setChecked.
public YHRecyclerViewHolder setChecked(int viewId, boolean checked) {
Checkable view = (Checkable) getView(viewId);
view.setChecked(checked);
return this;
}
use of android.widget.Checkable in project AndrOBD by fr3ts0n.
the class CheckableRelativeLayout method findCheckableChildren.
/**
* Add to our checkable list all the children of the view that implement the
* interface Checkable
*/
private void findCheckableChildren(View v) {
if (v instanceof Checkable) {
this.checkableViews.add((Checkable) v);
}
if (v instanceof ViewGroup) {
final ViewGroup vg = (ViewGroup) v;
final int childCount = vg.getChildCount();
for (int i = 0; i < childCount; ++i) {
findCheckableChildren(vg.getChildAt(i));
}
}
}
use of android.widget.Checkable in project AndroidNews by zhjohow.
the class ViewHolderHelper method setChecked.
public ViewHolderHelper setChecked(int viewId, boolean checked) {
Checkable view = (Checkable) getView(viewId);
view.setChecked(checked);
return this;
}
use of android.widget.Checkable in project android_packages_apps_Settings by omnirom.
the class UsbModeChooserActivity method inflateOption.
private void inflateOption(final int mode, boolean selected, LinearLayout container, final boolean disallowedByAdmin) {
View v = mLayoutInflater.inflate(R.layout.restricted_radio_with_summary, container, false);
TextView titleView = (TextView) v.findViewById(android.R.id.title);
titleView.setText(getTitle(mode));
TextView summaryView = (TextView) v.findViewById(android.R.id.summary);
updateSummary(summaryView, mode);
if (disallowedByAdmin) {
if (mEnforcedAdmin != null) {
setDisabledByAdmin(v, titleView, summaryView);
} else {
return;
}
}
v.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
if (disallowedByAdmin && mEnforcedAdmin != null) {
RestrictedLockUtils.sendShowAdminSupportDetailsIntent(UsbModeChooserActivity.this, mEnforcedAdmin);
return;
}
if (!ActivityManager.isUserAMonkey()) {
mBackend.setMode(mode);
}
mDialog.dismiss();
finish();
}
});
((Checkable) v).setChecked(selected);
container.addView(v);
}
use of android.widget.Checkable in project android_packages_apps_Settings by omnirom.
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);
}
Aggregations