![](/img/trans.png)
[英]if I know screen size on the mobile device how can separate a line of the text
[英]How to know that the device's screen is bigger?
當手機的屏幕不是很大時,就像阿爾卡特OT-806D的屏幕一樣,標簽文字可以用普通的,小的比例字體看到,大小為9.但是當屏幕像HTC的屏幕那么標簽的文字不能用那個字體讀! 如何判斷屏幕是否“大”?
使用以下代碼。
int screen_width = Display.getInstance().getDisplayWidth();
int screen_height = Display.getInstance().getDisplayHeight();
它返回移動屏幕的寬度和高度。
Display dis = Display.getDisplay(this);
Displayable d = dis.getCurrent();
int width = d.getWidth();
int height = d.getHeight();
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.