Suggestion 3 new functions for "jForms" lazarus / 43-Android ---------------------------------------------------------------------- ADiV · 2018-10-23 09:32 "getScreenWidth" and "getScreenHeight" Sometimes you need to know the exact screen size to make adjustments. "getSystemVersionString" shows us the android version in text format for example: '6.0' instead of 23 which would be the same "getSystemVersion" Code: Java  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i     public int getScreenWidth( ){        return this.controls.activity.getResources().getDisplayMetrics().widthPixels;            }        public int getScreenHeight( ){              return this.controls.activity.getResources().getDisplayMetrics().heightPixels ;    }        public String getSystemVersionString(){        return android.os.Build.VERSION.RELEASE;    } ---------------------------------------------------------------------- guest58172 · 2018-10-23 14:07 look at the dot completion proposals for `screen.` There's already all what you need. ---------------------------------------------------------------------- ADiV · 2018-10-23 14:11 Quote from: BBasile on October 23, 2018, 04:07:52 pmlook at the dot completion proposals for `screen.` There's already all what you need. Where can I look? ---------------------------------------------------------------------- guest58172 · 2018-10-23 16:06 `Forms` must be in the `uses`. Then `screen.width`, `screen.height` etc. Try to learn and explore the LCL before suggesting next  time. Lazarus is over 10 years old so you can imagine that tons of stuff are already there. ---------------------------------------------------------------------- ADiV · 2018-10-23 16:43 Quote from: BBasile on October 23, 2018, 06:06:19 pm`Forms` must be in the `uses`. Then `screen.width`, `screen.height` etc. Try to learn and explore the LCL before suggesting next  time. Lazarus is over 10 years old so you can imagine that tons of stuff are already there. What you told me is the first thing I tried, but Android does not return the real value of the screen, I always got the same resolution of 320x648 on 720x1280 screens and 540x960 screens. Just get the real value using the functions described above, try it and tell me. Greetings. Ps. I've been programming in Delphi for more than 20 years. ---------------------------------------------------------------------- jmpessoa · 2018-10-23 17:39 QuoteForms must be in the `uses`..... some misunderstanding here: LAMW "jForm" ... not LCL "Form" compatible. ---------------------------------------------------------------------- guest58172 · 2018-10-23 20:26 Indeed i've missed the fact that OP's posted in the Android subforum. ---------------------------------------------------------------------- jmpessoa · 2018-10-23 21:59 Suggestions Commited!! Thank you!