My Yorkie and I live in an apartment and he does just fine! He runs around the apartment just as wildly he does in my parents' house and I don't feel like he is cramped for space.
I do take him out for long walks and to the dog park pretty frequently so he does get the chance to run around and play outside. He is only outdoor potty trained (NC winters typically aren't very bad).