tablet

[#MDN-23829] Android - implement MVP tablet support

[MDN-23829] Android - implement MVP tablet support Created: 04.11.21  Updated: 23.11.21

Status: Ready for Review
Project: News Development
Component/s: Android
Affects Version/s: None
Fix Version/s: NU.nl - Android 10.7

Type: Story Priority: Major
Reporter: Bart Jekel Assignee: Bart Jekel
Resolution: Unresolved Votes: 0
Labels: refinement

Attachments: PNG File window size classes.png    
Issue Links:
Mention
mentions MDN-23025 Android - Add feature toggle section bff Closed
Team:
Core
Epic Link: Sections to BFF
Sprint: 2021 - C.22, 2021 - C.23

 Description   

When working on ticket MDN-23025 we needed to exclude tablets. Instead of excluding tablets we are now going to add MVP tablet support.
This means that we're going to use the phone layouts for tablets and if the screen becomes wider than 'x', we will start adding padding.

Benefits:

  • easier to maintain because we only have to support 1 layout
  • instead of investing time to exclude tablets, we use this time to include tablets
  • tablets will show more content
  • customisation for tablet font sizes can be handled by the BFF

AC

  1. do we listen to the BFF provided padding? YES
  2. do we keep it simple and use RecyclerView.ItemDecoration for the whole list? YES
  3. do we remove the old BFF tablet layouts and related resources from the project? YES
  4. do we test the BFF on tablets? YES


 Comments   
Comment by Bart Jekel [ 23.11.21 ]

If we do a call to the BFF to get a screen, then we can get a maxWidth as part of the Screen. The maxWidth has an array of objects which have a width and a ScreenBreakPoint.
The width is used to define the maximum width of the content. So if the provided width is 480 and the device has a width of 600, then we set the content width to 480 and we have 60 padding on the left and right side.

The ScreenBreakPoint has the options S, M and L which we've mapped to the Window Size Classes that Google suggests:

S is used for devices with a width smaller than 600dp.
M is used for devices with a width larger or equal to 600dp.
L is used for devices with a width larger or equal to 840dp.

Based on the size and width of the screen we will choose S, M or L.
M is most likely a larger tablet in portrait mode and L is most likely a larger tablet in landscape mode.

Comment by Bart Jekel [ 23.11.21 ]

For testing: unfortunately I have not been able to test the tablet design on a smaller tablet device because my tablet doesn't run Android 7 and the Android tablet emulator doesn't have Google Play support, so it won't run the app.

Generated at Wed Nov 24 13:00:25 CET 2021 by Paul Hameteman using Jira 8.13.1#813001-sha1:1f8e8da6e646fc554825c028f5305ba1b558f740.