PC SOFT

GRUPOS DE DISCUSSÃO PROFISSIONAL
WINDEVWEBDEV e 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, fev., 27 2016 2:51 AM - Sem resposta
Membro registado
3.657 mensagems
Popularité : +175 (223 votes)
Publicado em fevereiro, 27 2016 - 2:51 AM
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/