Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AndroidApp: not using the full screen resolution

I tried to test Android-programming on my phone and not the emulator. There the apps only use some little space in center of the screen. In the emulator everything works fine. So I also tried the 'Hello world'-app. But there is the same problem. The phone is an HTD HD2 with HyperDroid. So it has changed density to 167. When using width and height from onSizeChanged it says 320x430 or 480x270.

Is there a way to use the whole screen?

EDIT 1:

It also uses less screen on emulator with changed density. This also means that the titlebar doesn't use the whole width. Here is a screenshot of the emulator: klick

like image 831
Nick Avatar asked Mar 08 '26 05:03

Nick


2 Answers

if you want to apply this for full application then

Add this line to Application tab

android:theme="@android:style/Theme.NoTitleBar.Fullscreen"

otherwise if you want for individual activities then

Add this line to "Activity tab properties"

android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
like image 135
DEVANG SHARMA Avatar answered Mar 10 '26 18:03

DEVANG SHARMA


Make sure you have put the

<uses-sdk android:minSdkVersion="xx" android:targetSdkVersion="xx"/>

tag in your manifest file. This solved this issue for me.

like image 32
John Watson Avatar answered Mar 10 '26 20:03

John Watson



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!