add tablet check and pixel dp conversion