React native check if tablet or screen in inches
问题 I've established a different render logic for tablets and mobile devices. I was wondering if there is a way to get the screen size in inches or maybe even any module to automatically detect if the device is a tablet or not . The reason I am not using the dimensions api directly to get the screen resolution is that there are many android tablets with lower resolution than many of their mobile counterparts. Thanks. 回答1: Based on @martinarroyo's answer, a way to go about it use the react-native