@Override public void bindView(ViewHolder viewHolder, List payloads) { super.bindView(viewHolder, payloads); Context ctx = viewHolder.itemView.getContext(); //set the identifier from the drawerItem here. It can be used to run tests viewHolder.itemView.setId(hashCode()); //define how the divider should look like viewHolder.view.setClickable(false); viewHolder.view.setEnabled(false); viewHolder.view.setMinimumHeight(1); ViewCompat.setImportantForAccessibility(viewHolder.view, ViewCompat.IMPORTANT_FOR_ACCESSIBILITY_NO); //set the color for the divider viewHolder.divider.setBackgroundColor(UIUtils.getThemeColorFromAttrOrRes(ctx, R.attr.material_drawer_divider, R.color.material_drawer_divider)); //call the onPostBindView method to trigger post bind view actions (like the listener to modify the item if required) onPostBindView(this, viewHolder.itemView); }
@Override public void bindView(ViewHolder viewHolder, List payloads) { super.bindView(viewHolder, payloads); Context ctx = viewHolder.itemView.getContext(); //set the identifier from the drawerItem here. It can be used to run tests viewHolder.itemView.setId(hashCode()); //define how the divider should look like viewHolder.view.setClickable(false); viewHolder.view.setEnabled(false); viewHolder.view.setMinimumHeight(1); ViewCompat.setImportantForAccessibility(viewHolder.view, ViewCompat.IMPORTANT_FOR_ACCESSIBILITY_NO); //set the color for the divider viewHolder.divider.setBackgroundColor(UIUtils.getThemeColorFromAttrOrRes(ctx, com.mikepenz.materialdrawer.R.attr.material_drawer_divider, com.mikepenz.materialdrawer.R.color.material_drawer_divider)); //call the onPostBindView method to trigger post bind view actions (like the listener to modify the item if required) onPostBindView(this, viewHolder.itemView); }
ViewCompat.setImportantForAccessibility(this, ViewCompat.IMPORTANT_FOR_ACCESSIBILITY_YES); mLockAccessibilityDelegate = true;
ViewCompat.setImportantForAccessibility(this, ViewCompat.IMPORTANT_FOR_ACCESSIBILITY_YES);
ViewCompat.setImportantForAccessibility(this, ViewCompat.IMPORTANT_FOR_ACCESSIBILITY_YES); mLockAccessibilityDelegate = true;