tsiemens / pathfinder-toolkit

A Pathfinder RPG Android app, for managing characters and parties
22 stars 6 forks source link

Tablet/landscape support #7

Closed tsiemens closed 10 years ago

tsiemens commented 10 years ago

We are currently locked to portrait. Layouts need to be modified so they display correctly in wider views.

Extra tablet layouts should be added in some cases, to make better use of space such as

samcorcoran commented 10 years ago

I added a line to allow auto-rotation based on orientation, and initiated a pull-request for it (#22) before I remembered that there were other changes necessary for landscape support (adjusting aesthetics to cope with wider rows etc). You are welcome to ignore/decline the pull request if you feel auto-rotation should not be included until these aesthetic changes have been made.

Did you intend for 'tablet layouts' to be a selectable option somewhere within the application ('Settings'?), or a process that automatically detects the width of the screen (due to landscape view, or larger devices) and alters layouts accordingly?

samcorcoran commented 10 years ago

Some notes on problems and changes for various UIs that may be necessary for comfortable navigation on landscape screens. I compiled this list while viewing the existing UI rotated to landscape orientation on a Nexus 10.

Characters>Combat Stats:

Characters>Abilities:

Characters>Skills:

Characters>Weapons/Armor:

Characters>Feats/Spells:

Initiative Tracker>Party Member Editor:

Party Skill Checker:

Party Manager:

Pointbuy Calculator:

samcorcoran commented 10 years ago

Of the above, alignment changes for "Characters>Abilities" and "Characters>Skills" are quite important for readability, as is the button size issue on the "Pointbuy Calculator".

Spacing changes for "Characters>Combat Stats" would make for a more comfortable experience on wider screens.

These are probably quite important to provide for tablet users, but will be especially important for any release that allows screen rotation from device orientation.

samcorcoran commented 10 years ago

tsiemens, I wanted to make the spinners on the "Abilities" page center their content by setting their gravity to "center", but it turns out they already contain that. The entries are aligned to the left, despite this.

Any idea what can be changed to fix the gravity and line the spinner text up with the columns?

tsiemens commented 10 years ago

You'll need to make a new layout, which is based off android.R.layout.simple_spinner_item (currently being used there). There is probably an android attribute you will need to use as the base style. See spinner_plain.xml as an example.

samcorcoran commented 10 years ago

Thanks for the tip!

My repo's branch "issue7_tabletLandscapeSupport" now contains changes that:

I wanted to increase the width of the combat stats page '+' symbols, conditional on screen size. From what I understand, the right way to handle this would be to have a separate tablet-friendly character_combat_stats_fragment.xml, placed in res/layout-large/ directory.

Does this mean that the whole layout file would have to be duplicated just to add some tablet-specific tweaks? Because that seems excessive. Perhaps there is a route that involves more layout code re-use?

tsiemens commented 10 years ago

You can avoid duplicating layouts by using attributes and dimensions. See http://developer.android.com/guide/topics/resources/providing-resources.html for how to make files for different screen sizes.

samcorcoran commented 10 years ago

In regards to tablet layout (such as adding brief/summary information next to spell names in the spell ui), would the preferred condition to use perhaps be:

A) availableWidth: rotating the device to landscape will make the conditional fields appear B) smallestWidth: device must be large enough to accomomdate fields in portrait mode in order to make conditional fields appear C) Something else?

Option A might allow larger phones to make use of the additional information when in landscape, and reduce the amount of vacant screen space they display. However it also means that fields would be appearing and disappearing as a user re-orients their device, which could be frustrating/confusing ("Where have my spell notes gone - they were there just a moment ago!") which would be avoided by Option B.

Thoughts?

Also, do you think having a separate 'brief description' (single line, character limited) is a useful addition to spells and feats - to be used in this instance of displaying on the main spell ui, but also just as a place to write a very compact note on how to use the spell? Players might think to use the first line of the description for that sort of thing, but a 'brief description' field would make it more explicit.

If they don't fill in the 'brief description' field then the first line of the full description could be used for the tablet ui note instead.

tsiemens commented 10 years ago

For now, I think it should be fine to keep it simple and go for smallest width. Optional fields can maybe be introduced in a later iteration if requested.

samcorcoran commented 10 years ago

My branch issue7_tabletlandscapeIssues now also contains changes which:

This concludes the tablet/landscape changes I wanted to make (and I fitted in your suggestions too, tsiemens)

Some of the changes bundled in here are general aesthetic changes which seemed generally sensible while I was trying to consider what would improve the tablet experience. Hopefully you'll agree with them.

Unless you have any further suggestions I would consider this branch and work finished and ready for merging. Take a look and see what you think!

samcorcoran commented 10 years ago

Forgot to mention another change: