Spin bowler Adam Riley took seven wickets but bottom-placed Kent still had the worst of the second day at the Ageas Bowl where Hampshire finished on top.