This paper develops an adaptive particle filter for indoor mobile robot localization, in which two different resampling operations are implemented to adjust the number of particles for fast and reliable computation. Since the weight updating is usually much more computationally intensive than the prediction, the first resampling-procedure so-called partial resampling is adopted before the prediction step, which duplicates the large weighted particles while reserves the rest obtaining better estimation accuracy and robustness. The second resampling, adopted before the updating step, decreases the number of particles through particle merging to save updating computation. In addition to speeding up the filter, sample degeneracy and sample impoverishment are counteracted. Simulations on a typical 1D model and for mobile robot localization are presented to demonstrate the validity of our approach.