I’m trying to add several chips to the chip group dynamically. The first one appears fine but others do not appear properly. But when I do it using XML it works fine. activity_main.xml In MainActivity.java style.xml standalone_chip.xml Answer In your main activity you are doing like this. Notice you are creating a new instance of chip i.e chip2 but you