Landing gear locked

Is there a way to determine if the landing gear is successfully locked (either up or down)? Or is a position of 0% or 100% the only way?