@Override protected void onBindView(View view) { super.onBindView(view); View summary = view.findViewById(android.R.id.summary); if (summary instanceof TextView) ((TextView) summary).setMaxLines(10); } }
@Override protected void onBindView(View view) { // Clean listener before invoke SwitchPreference.onBindView ViewGroup viewGroup = (ViewGroup) view; clearListenerInViewGroup(viewGroup); super.onBindView(view); }
@Override protected void onBindView(final View view) { final Checkable cview = getCheckableView(view); if (cview instanceof CompoundButton) { final CompoundButton btn = (CompoundButton) cview; btn.setOnCheckedChangeListener(mListener); } super.onBindView(view); }
@Override protected void onBindView(final View view) { final Checkable cview = getCheckableView(view); if (cview instanceof CompoundButton) { final CompoundButton btn = (CompoundButton) cview; btn.setOnCheckedChangeListener(mListener); } super.onBindView(view); }
@Override protected void onBindView(View view) { super.onBindView(view); TextView titleView = (TextView) view.findViewById(android.R.id.title); TextView summary = (TextView) view.findViewById(android.R.id.summary); if (titleView != null && getContext() != null) { FontUtils.setPreferenceTypeface(getContext(), fontStyle, titleView, summary); } }
@Override protected void onBindView(View view) { super.onBindView(view); mSwitch = (SwitchCompat) view.findViewById(R.id.switchWidget); mSwitch.setChecked(isChecked()); ATE.apply(view, mKey); }
@Override protected void onBindView(View view) { super.onBindView(view); mSwitch = (ATESwitch) view.findViewById(R.id.switchWidget); mSwitch.setChecked(isChecked()); mSwitch.setKey(mKey); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) mSwitch.setBackground(null); ATE.themeView(view, mKey); }
@Override protected void onBindView(View view) { super.onBindView(view); if (mDrawDivider) { int left = view.getPaddingLeft(); int right = view.getPaddingRight(); int top = view.getPaddingTop(); int bottom = view.getPaddingBottom(); view.setBackground(DividerDrawable.create(getContext())); view.setPadding(left, top, right, bottom); } SwitchCompat switchView = (SwitchCompat) view.findViewById(R.id.switch_widget); // On BLU Life Play devices SwitchPreference.setWidgetLayoutResource() does nothing. As a // result, the user will see a non-material Switch and switchView will be null, hence the // null check below. http://crbug.com/451447 if (switchView != null) { switchView.setChecked(isChecked()); } TextView title = (TextView) view.findViewById(android.R.id.title); title.setSingleLine(false); if (!mDontUseSummaryAsTitle && TextUtils.isEmpty(getTitle())) { TextView summary = (TextView) view.findViewById(android.R.id.summary); title.setText(summary.getText()); title.setVisibility(View.VISIBLE); summary.setVisibility(View.GONE); } if (mManagedPrefDelegate != null) mManagedPrefDelegate.onBindViewToPreference(this, view); }