Android App Visual elemts are displayed very small
Hi,
I'm new to Android Programming. I created a small App which should display texts and some buttons.
Everything seems to work but the fonts are buttons are dispalyed just extreme small. And you can't even see the whole text.
http://www.bilder-upload.eu/thumb/bca035-1432635659.png
Re: Android App Visual elemts are displayed very small
Hi Reiji,
Are you using layouts?
See documentation here.
Layout describes how widgets are laid out in an application's user interface, so in order to get the widgets showed in the available space use any Layout in your .ui or programmatically in the .cpp.
Wilkinson Tavares
Re: Android App Visual elemts are displayed very small
Now it fits my display on my android device. I just need to design in a very big size at the computer.
Re: Android App Visual elemts are displayed very small
Sure,
This video shows how to do it in the cpp.
If you're using Qt Creator and you have a form file (.ui), in the design mode it has Layouts on the left sidebar, just drag and drop one of them and put the widgets you want inside it.
Re: Android App Visual elemts are displayed very small
My phone has a big resolution but not my screen of my computer. Does anyone know if there is a possibility to let fit the application at every phone screen resolution (not only for my phone resolution)?
2 Attachment(s)
Re: Android App Visual elemts are displayed very small
Quote:
Originally Posted by
wtfm
Hi Reiji,
Are you using layouts?
See documentation
here.
Layout describes how widgets are laid out in an application's user interface, so in order to get the widgets showed in the available space use any Layout in your .ui or programmatically in the .cpp.
Wilkinson Tavares
Even with layouts it looks very small on big resolution screens.
Attachment 11179
Attachment 11178
Re: Android App Visual elemts are displayed very small
Quote:
Originally Posted by
Reiji
My phone has a big resolution but not my screen of my computer. Does anyone know if there is a possibility to let fit the application at every phone screen resolution (not only for my phone resolution)?
Hi Reiji,
You should use some kind of density-independent pixel (dp) to get an application that displays properly in an range of resolutions.
See Qt documentation here.
Calculating Scaling Ratio
You can select one high DPI device as a reference device and calculate a scaling ratio for adjusting image and font sizes and margins to the actual screen size.
See Android guides here.
EDIT:
However Reiji, your problem may be a lack of a layout in your central widget or this.
Re: Android App Visual elemts are displayed very small
Quote:
Originally Posted by
wtfm
Hi Reiji,
You should use some kind of density-independent pixel (dp) to get an application that displays properly in an range of resolutions.
See Qt documentation here.
Calculating Scaling Ratio
You can select one high DPI device as a reference device and calculate a scaling ratio for adjusting image and font sizes and margins to the actual screen size.
See Android guides here.
EDIT:
However Reiji, your problem may be a lack of a layout in your central widget or
this.
I'm just new to this. Is there any tutorial?
Re: Android App Visual elemts are displayed very small
Quote:
Originally Posted by
Reiji
I'm just new to this. Is there any tutorial?
Not that I know of, but is pretty simple.
Read the documentation that I posted above to get a clue, mainly the scaling ratio part, and this post can help you as well.
Re: Android App Visual elemts are displayed very small
I'm useing a QT Widget(C++) and for the interface an ui file created with the Formdesigner. So how can I use the dp thing which is written in qml?