Thanks for the reply Marina. I am checking the modes, testing on an Xperia
Z5 Premium, and there are 2 modes: 1080p and 4k. It was working pretty well
on Android M, but on the N update it's scaling the whole phone UI to 4k and
the whole phone interface is messed up. Not the app UI, but the whole
phone, I don't see the bottom navigation bar for example, and the status
bar fills 1/4 of the screen with the time, network and wifi icons. I have
no idea why it's doing that (or even if it's supposed to be doing that).
On Tuesday, 8 August 2017 16:40:06 UTC+2, Marina Cuello wrote:
>
> You could check the supported modes on the device, and then check the
> pixel size on those to select the one closer to what you want.
>
> Marina
>
> On Tue, Aug 8, 2017 at 9:49 AM, youssef EL MOUMNI <youssef.e...@gmail.com
> > wrote:
>
>> Hi everyone,
>>
>>
>> I am trying to force 4k display mode to target phones with 4k screens. It
>> was working pretty well with Android M and I had beautiful 4k support using
>>
>> WindowManager.LayoutParams params = getWindow().getAttributes();
>> params.preferredDisplayModeId = 2;
>> getWindow().setAttributes(params);
>>
>> After the Android N update it changed the behavior completely, the whole
>> interface gets scaled way over the screen limits where I only see a portion
>> of the screen, including the status bar and the navigation buttons on the
>> bottom. to leave the app I need to close it from Android Studio.
>>
>> Any idea how to get the Android M behaviour back?
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Android Developers" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to android-developers+unsubscr...@googlegroups.com .
>> To post to this group, send email to android-d...@googlegroups.com
>> .
>> Visit this group at https://groups.google.com/group/android-developers.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/android-developers/4d4c833d-0aa1-4b17-9e60-ad4bf6db9b16%40googlegroups.com
>>
>> <https://groups.google.com/d/msgid/android-developers/4d4c833d-0aa1-4b17-9e60-ad4bf6db9b16%40googlegroups.com?utm_medium=email_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
--
You received this message because you are subscribed to the Google Groups
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit
https://groups.google.com/d/msgid/android-developers/0676a9dd-699d-4687-9db4-cf31d7cb5a1b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.