I have a recyclerview and I would like to change its item/child's width dynamically instead of changing the xml file which contains the layout for the item/child. I have tried doing the following from other answers but it changes the whole recyclerview's width instead of it's child/item.
ViewGroup.LayoutParams layoutParams= recyclerview.getLayoutParams();
layoutParams.widht = 200;
recyclerview.setLayoutParams(layoutParams);