S3:
DPI: 306 RES: 1280x720 Screen: 4.8" 720 / (306/160) = 720 / 1.9125 = 376.47 dp
S4:
DPI: 441 RES: 1920x1080 Screen: 5.0" 1080 / (441/160) = 1080 / 2.75625 = 391.8367 dp
So basically there is a very small difference between S3 and S4. But if you want to distinguish layouts for these devices, use sw376dp for S3 and sw390dp for S4 . But note that other 5-inch phones may be different.
source share