CardStackView
CardStackView copied to clipboard
View element with the wrong size if the CardView contains padding.
After I added padding to the CardStackView and clipToPading=false the elements start to have the wrong width.
The only solution I founded to solve the problem is to calculate the element size inside of the update function:
private void update(RecyclerView.Recycler recycler) {
...
for (int i = state.topPosition; i < state.topPosition + setting.visibleCount && i < getItemCount(); i++) {
View child = recycler.getViewForPosition(i);
ViewGroup.LayoutParams params = child.getLayoutParams();
params.width = parentRight - parentLeft;
params.height = parentBottom - parentTop;
child.setLayoutParams(params);
addView(child, 0);
...
Do you known any solution to this problem?
same problem