Whenever I have had to take codine or any other sedative I notice two things. 1 I become very drowsy and even too drowsy to exercise or move around at the same speed and 2 I become bloated.
I'd say if you only took the codine for a week (normally its not given for more then a week or two) its unlikely to be a massive weight gain- if it is weight gain. If its prevented you from exercising at the same level or to the same degree then it may have influenced some of your weight gain but if you only cut down a little its unlikely to have done anything major, especially in such a short space of time. The week you go back to exercising (if infact it was that which made the difference) the weight is likely to just come off again.
It could also be bloating. Codine slows your body down, not just your mind and heart rate but also your digestion which may have become slowed down and sluggish, food taking longer to go through you yet you may still be eating at the same rate. Stuff may collect in your colon, you may even be constipated. Drink plenty of water, eat plenty of fiber and when your off the codine things should go back to normal.
Its unlikely any weight you did gain (if you did gain any weight as oppose to bloating) will hang around for very long, as soon as your back to normal your body will get itself back in order. 1 Lb isn't a huge amount of weight to have gained especially if you were unwell.