Not sure it will be feasible at the gym you go to, but my solution is I put velcro on the back of my iPad case and stick it to the treadmill console. Lock solid.
You could always use an arm band and wrap it around the treadmill but that depends on the design of your treadmill as well. What about getting a car phone holder with a suction mechanism and using it on the treadmill?