After 35 years of running (best, Boston, '78; 2:44:02), I turned to cycling in '98 because I could no longer run. In 2001 my left hip was totally replaced and 7 weeks ago, my right hip the same. And all through it I was able to cycle, either stationary, road, and/or mountain. I had severe arthritis in both hips, however the cylcing seem to help the pain, loosen the joint, and give me an exercise fix.
I am pleased to say with both hips replaced I am once again cycling, no pain. A few tips for hip replacement cyclists: Practice with a stationary bike first if possible. Focus on your balance. Lower the seat when you first get back to a regular bike. Don't push up the hills and stand, stay in the seat. Stretch your quads and hamstrings. For the first few months I would recommend road cylcists not to use the pegs and cleats (same for mountain), let the hip joint in question heal. You might want a wider seat than usual, (depends on your incision placement). Moderation is the key, cut your workouts down (20%-30%), get a good steady state and stay there. I had success with time 10-20 minutes to start, then 30 minutes, 1 hr, etc. You can rush 20 miles, but it is hard to rush an hour.
All the best,