PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 25 → WM - Como saber se é Tablet ou Celular no Android com o Windev Mobile
WM - Como saber se é Tablet ou Celular no Android com o Windev Mobile
Iniciado por adrianoboller, 27,feb. 2016 02:51 - No hay respuesta
Miembro registrado
3.659 mensajes
Popularité : +175 (223 votes)
Publicado el 27,febrero 2016 - 02:51
Prezados,

Segue exemplo de como saber se é Tablet ou Celular no Android com o Windev Mobile

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


isTablet()


--
Adriano José Boller
______________________________________________
Consultor e Representante Oficial da
PcSoft no Brasil
+55 (41) 9949 1800
adrianoboller@gmail.com
skype: adrianoboller
http://wxinformatica.blogspot.com.br/