PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV Mobile 2024 → is Tablet?
is Tablet?
Débuté par adrianoboller, 18 nov. 2014 14:39 - Aucune réponse
Membre enregistré
3 651 messages
Popularité : +175 (223 votes)
Posté le 18 novembre 2014 - 14:39
import android.content.res.Configuration;

// Returns True if the device that runs the application is a tablet
PUBLIC static boolean isTablet(){
RETURN (getApplicationContext().getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) >= Configuration.SCREENLAYOUT_SIZE_LARGE;
}