When British machine-made cloth flooded in the Indian market , then the handlooms in India didn't died out but their production declined as they were expensive than the imported clothes.
When Gandhi ji initiated the Non-cooperation movement , people started to boycott the imported clothes and other goods and started buying khadi which gave a rise to the handloom industry but after a period of time , its production again declined as people were facing problem in buying khadi as it was very expensive for the poor people and thus ,returned back to the cheap machine made clothes.