i think u may use “remove all widget” to set widget hide , it may change the index number of widget array ,while u create widget again , its the 2nd one ,so u may get[1] ,not get [0],so u can try loop array .
1 Like