AEFeinstein / mtg-familiar

An Android app for all things Magic: The Gathering
Other
280 stars 72 forks source link

Improve "add to wishlist" dialog #195

Closed MarcelBucz closed 7 years ago

MarcelBucz commented 7 years ago

When the dialog pops up, the first quantity text is selected, but the keyboard does not come up. So in practice, you have to tap in a quantity field (keyboard comes up), delete the existing quantity and enter a new. Another control type (a spinner?) may be a better fit.

AEFeinstein commented 7 years ago

I agree, the dialog is clunky. Android has a NumberPicker object too, maybe that would be better than a Spinner? You could make a new branch and play around with that.

MarcelBucz commented 7 years ago

The numberpicker is quite a big widget and after having tried various button configurations (with -1, +1, set to 0 and 4) within the wishlist rows, I decided to get rid of the grid altogether. Here's what I've come up with, an autocomplete: image image image I haven't committed yet as there's still some work to be done, among others;

  1. upon click a (betterpicker) dialog should come up to pick a quantity.
  2. the actual wishlist must still be updated.
  3. the color of the set text should reflect the card's rarity.

What do you think of this design?

AEFeinstein commented 7 years ago

I'm not sold on the design yet. Can you commit it to a branch, even unfinished, so I can play around with it?

MarcelBucz commented 7 years ago

I just committed some preliminary changes to MarcelBucz:improveAddToWish.

AEFeinstein commented 7 years ago

I'm getting a compilation error. I replaced linear_layout with dialog_layout_root below, and it compiled.

/* Create the custom view */
View customView = activity.getLayoutInflater().inflate(R.layout.wishlist_dialog, null, false);
assert customView != null;
/* Grab the linear layout. Make it final to be accessible from the button layer */
final LinearLayout linearLayout = (LinearLayout) customView.findViewById(R.id.linear_layout);
  1. With that fixed, the dialog isn't properly centered for cards with lots of printings: screenshot_20170530-093619
  2. Scrolling up and down a few times clears the foil indicators, which is definitely wrong: screenshot_20170530-093752
  3. I can only tap on one set to add to the wishlist. Every subsequent tap does nothing.
  4. If I select the text view, the set options disappear.
  5. Not a technical problem, but the UI needs better padding. There should be some padding between text and the edge of the dialog, either 8dp or 16dp, I forget. Clickable elements should be at least 48dp tall & wide for human fingers.

To be honest, I don't think these changes fix anything. A simpler fix would be to go back to the old UI and replace the EditTexts with buttons with numbers on them for quantity which launch BetterPicker dialogs (stacked dialogs!).

MarcelBucz commented 7 years ago

I knew there were some issues; being unable to add multiple sets probably has to do with the MtgCard equals implementation (no duplicates allowed in the autocomplete). I had doubts myself, but I wanted to share this prototype with you as getting rid of the fixed number of rows would make it easier to have a more free format in the wishlist. I could see a pop-up being shown upon tapping a token where you could set more advanced options for a wishlist entry, facilitating #201. That being said, the simpler fix is probably the way to go. Thank you for your input!

MarcelBucz commented 7 years ago

See PR #211.