Closed MarcelBucz closed 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.
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: I haven't committed yet as there's still some work to be done, among others;
What do you think of this design?
I'm not sold on the design yet. Can you commit it to a branch, even unfinished, so I can play around with it?
I just committed some preliminary changes to MarcelBucz:improveAddToWish.
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);
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!).
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!
See PR #211.
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.