I am working on an exercise program, and one part is to pick an exercise, then how often you do it, with how much weight.
So, I want all this information on one screen, so going to a ListView would be annoying, I believe.
But, there may be over 100 exercises, so my current approach of using a Spinner has a problem.
It would seem that if my list is sorted, then if you can hit a key and jump to that letter then it would speed up searching for the user.
So, would it make sense to have a custom component that is basically just a dropdown list (http://msdn.microsoft.com/en-us/library/aa511458.aspx) or is there a better way to allow users to navigate a long list without going to a new screen?
You can try autocomplete widget that is described here
http://developer.android.com/resources/tutorials/views/hello-autocomplete.html
Related
I'm working on one dialog. It should have two listviews either two spinners either one spinner and one listview. The list on items in the second depends on the choice in the first one. And now I have dilemma concerning graphical user interface.
When I put two elements (ex. spinner and listview) in one dialog window it's looks awful and it's difficult for using. How to solve that? What would you recommend? If I use two different dialog windows, it will be difficult to switch between two lists, as I imagine that the user can change few times the selected option in the first list until he/she decides what to select from the second list.
Any suggestion? Perhaps you saw some nice solution in one of apps in the market?
you can either show it in two different dialogs without disturbing the UX
or
Why not try something like This or This
There are a lot of widgets out there (both from android itself and custom ones) that would solve your needs for showing the info. However I think that your problem is not the 2 lists but the dialog.
For a better user experience I recommend using an appearing/sliding-in layout or a prompt screen. An appearing layout is the one that appears below your "change this" title. It's not so disturbing as you can keep using the whole screen, you can add animations, you can customize it a lot to fit your app design... If your space is limited, you can always show a hidden layout containing your views. this method is a little more disturbing so fits better if you are starting a separate action, not filling information as the underlying views.
I want to create a questionnaire but I'm not sure what is the best way to approach this. I'm pretty new to Android but at the moment I have a working app which has a main activity screen which has various options. One of them is to launch the questionnaire. I have created a single database table which contains 4 columns Question Number, Question, Answer, Explanation. The explanation is displayed when the user selects the incorrect answer.
I am envisaging that the screen will be simple enough, just a textview containing the question and 3 buttons, 'YES' 'NO' 'BACK'. I plan to have 15 questions. What I'm wondering is do I have to create an activity for every question and every explanation even though the layout is going to be the same from one question to the next?
Definitely not!
Do this the way you would in any other application. Put your questions in some kind of list and iterate through them. Set the content "question" view, in your layout with the successive values.
... and remember to save the position in the list across Pause and Resume!
Ultimately to get this to work I had to use a counter which I incremented after each successive question. No list was required.
I need some way to edit an item in my multi-line ListView - and it's just two text fields that need editing.
What would be the best way, design-wise, go about this? I feel that a whole new activity would waste too much screen space and look off, yet just a popup with the two fields and some confirm button might look off as well.
It's pretty subjective as to what's the best design for this, especially without knowing more about your specific use, however there are definitely a few possibilities that come to mind.
The new activity option that you noted is actually quite standard. You can see a similar paradigm used in Gmail, Google Talk, Messaging, etc. If your text fields expect to have something like a single word in each though, I can understand how that might feel like a waste of space to create a new activity. I wouldn't necessarily rule it out though; you can probably play around with styling to make it feel less empty (include labels, short descriptions, etc.). Also consider that most users nowadays have soft keyboards. That can take up a significant amount of space and make the view feel less empty.
The popup option seems less standard, but again if you styled it correctly I could see it working OK. What don't you like about this option?
Another option is to do a multi-pane layout of sorts which is far less common for a phone-sized layout but not out of the question. You could have a pane with two text boxes which is for the current item above your list view and have the contents change when you select an item in the list view. This is also a less standard UI.
You could also have an alternate view actually within the list item. In addition to your current (I'm assuming) two TextViews, you could have two EditTexts and maybe an OK and cancel button that are hidden. The visibility of all of these views would be toggled when you select the item.
There are more options too, I'm sure, but hopefully this will give you a little to think about at least.
I would use a separate activity for several reasons:
1) It's what users would expect. I can't recall any apps that use a pop up to edit contents of a listview
2) It'll be much easier to manage state in a separate activity e.g. when a user starts to enter some text and then gets interrupted by a call or email notification etc
3) If you're editing text then the keyboard wil take up most of the screen so you're activity won't look sparse.
you need to update in list view and add more items in list view???????
sorry for the confusing title. I will try to explain my problem.
My app displays some content day-wise in a ListView. The user is able to switch days back and forth (e.g. by swiping his finger to the left/right). Now I want to implement some nice transition effect (like the new Android market has).
The problem is, that the content is generated dynamically and it can take a while to load. Also you can move (theoretically) infinite days to to past or to the future.
How can I implement a nice looking transition that is responsive and also tells the user, that some work is done in the background.
Just to clarify, I'm not asking how a ListView or an AsyncTask works, but rather for design concepts for my idea.
Thanks in advance.
If I understand correctly what you mean, I think you should try and preload in background the previous and following page, and keep them in memory ready to come in with the swipe.
Every time you change day you would recycle one page of data to load a new one (in one direction or another).
Obviously the user can still swipe too fast and you won't have time to preload things, but in that case I don't think you can do anything better than transitioning in the page with a nice spinner in it (not a blocking dialog).
I apologize if I'm just missing the obvious. I'm fairly new to Android development, and while I searched for this particular topic, I wasn't exactly sure what to look for (in terms of a "name").
In an application I'm writing, I have a section where the user can enter the names of players. However, this can range anywhere from 1 to whatever, no limit. However, I'm not sure what the best approach for this kind of feature is, or if there's a component that already does something like it.
Basically, the functionality I'm looking for is similar to what you can see in the Edit Contact screen of the phone book; for the phone numbers and email addresses, you can push a little plus button to add a new number/address, or hit the little minus button to remove a number/address.
I can think of several ways to potentially implement this, but in the end I think wrapping it in a custom component would be best (so that you could call "Get Players" and have it return a list of strings by going through each of the inputs and getting the values).
Am I just overthinking this? Is there a component that does that already? Is there some example code that demonstrates a good way to do this?
Thanks!
Could you just use ListView and add a menu with a "Add Players" option? You could customize the list view to have a little checkbox, for example, and then begin the game by pressing the menu ... or add new players dynamically by pressing another menu button.
After playing around with some ideas, I came across a solution that I think will suit what I'm doing. I created a custom component extending LinearLayout. As part of the creation of the component, it creates a row that says "Add new..." with a plus-sign button. Pressing the plus sign button then creates a new row containing an EditText and a minus-button which will remove the row.
I then created a method for this component called getTexts() which returns a List that has all the non-empty Text values from all the components. Testing it in a dummy app, it seemed to work fine.
I think I need to make tweaks to make it more robust (like the ability to add rows programatically, listeners to alert other components when a row is added/removed, and the ability to set the individual EditText values, for instance), but this functions as I imagined.