Thursday, April 18, 2013

Re: [android-developers] Re: Compatibility mode issues on 4.x

I think the best solution is for you to not use compatibility mode.


I think it was mainly a stopgap solution for when tablets first came out.  People probably wouldn't buy a tablet if nothing would run on it.  


But tablets have been out long enough so that it doesn't make sense to only design an app for a 2 inch wide phone and then run it in compatibility mode on a tablet.


Thanks.



On Thursday, April 18, 2013 2:53:05 AM UTC-5, user123 wrote:
Thanks, Mark. I should have done a better research.

So this leads to a quite stupid situation. I did the work to optimize layout for xhdpi devices, like the Galaxy Nexus, and it looks quite well. If I set the compatibility mode to 320dp, this willl be lost on all these devices. Samsung Galaxy s3/4, HTC One, etc, have screen sizes which will make my app go in compatibility mode!

For me this is a bug, specially because the larger the screen, the more sense it makes to have the option available to use compatibility mode. And precisely then it's not possible.



Am Mittwoch, 17. April 2013 22:36:47 UTC+2 schrieb Mark Murphy (a Commons Guy):
If you read the documentation:

http://developer.android.com/guide/topics/manifest/supports-screens-element.html#largestWidth

it says:

"Note: Currently, screen compatibility mode emulates only handset
screens with a 320dp width, so screen compatibility mode is not
applied if your value for android:largestWidthLimitDp is larger than
320."


On Wed, Apr 17, 2013 at 4:26 PM, user123 <ivans...@gmail.com> wrote:
> Ok, the issue is confirmed. I created a brand new project with a blank
> activity, and ran it on a tablet.
>
> The only modification I did was in the manifest, as follows:
>
>     <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="8" />
>     <supports-screens android:largestWidthLimitDp="320" />
>
>
> Then the app goes in compatibility mode - "Hello world!" is zoomed. Fine.
>
> But if I change to 321 dp - It doesn't go into compatibility mode.
>
>
> I tested with a Nexus 7 tablet, Nexus 7 emulator, and 10.1 inches tablet
> emulator.
>
> Is this a bug?
>
>
>
> Am Dienstag, 19. März 2013 17:46:49 UTC+1 schrieb user123:
>>
>> I'm trying to force compatibility mode on tablets, for a certain app,
>> because I don't work on it anymore - and currently it looks really really
>> messed up on tablets.
>>
>> According to the documentation:
>> http://developer.android.com/guide/practices/screen-compat-mode.html
>>
>> There are many different options to set up in the manifest, to make it
>> possible, to the user, to enable compatibility mode. This is not exactly
>> what I want, but anyways, maybe worth to mention, these options didn't work.
>> I couldn't find anything on the device to switch to compatibility mode. I
>> used a Nexus 7 with 4.2.
>>
>> Now there's the part which I need - and I also can't get it to work. To
>> force compatibility mode, it I have to use this element:
>>
>> <supports-screens android:largestWidthLimitDp="320" />
>>
>> When I let the value 320 there, my Galaxy Nexus smartphone goes in
>> compatibility mode. That is unwanted.
>> The Nexus 7 also does, this is good.
>> So I have to use bigger dp - But starting at 321, for some reason I don't
>> understand, the Nexus 7 doesn't go anymore in compatibility mode.
>>
>> Is this normal? According to what I read the dp of the shortest side of
>> the Nexus 7 is more than 500, why then it stops on 321?
>>
>> I would let it on 320, but I have optimized layouts for this screen size
>> and don't want these to go in compatibility mode.
>>
>> Thanks.
>>
>>
>>
>>
> --
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-d...@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscribe@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
> ---
> 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+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>



--
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_The Busy Coder's Guide to Android Development_ Version 4.7 Available!

--
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
---
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

No comments:

Post a Comment