A Resource-Adaptive Approach for Federated Learning under Resource-Constrained Environments