// 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; } ############################################################################
OU pelo modelo modelo is string = getDeviceName() ############################################################################# PROCEDURE GLOBAL Java
// Horizontal resolution of the screen ResHorizRes is int = SysXRes() gloResHorizRes = ResHorizRes
// Vertical resolution of the screen ResVertRes is int = SysYRes() gloResVertRes = ResVertRes
Retorno is string = ResHorizRes +"X"+ ResVertRes
W = gloResHorizRes H = gloResVertRes IF H = 1920 AND W = 1080 THEN //s4 gnCentroY = 1530 gnCentroYinitial = 1050 ELSE IF H = 800 AND W = 480 THEN // mini gnCentroY = 605 gnCentroYinitial = 525 ELSE IF H = 800 AND W = 1280 THEN // tablet 1171 419 gnCentroY = 1070 gnCentroYinitial = 319 END
Nenhum comentário:
Postar um comentário