Layout design help Android - android

I am using a web service which gives me a list of all the people in alphabetical order. I am showing this list in a Spinner.
I would like to separate the list into sections by the first letter. The user would then select the section (e.g. A, B, etc.) of that list of people that will be loaded in spinner.
What is a good and intuitive way to design that alphabet view for the user?
I thought about two drop downs: one for letters, and one for the list of people but that doesn't seem to improve it.
Any help?
Thanks

Based on what your describing it sounds like
an expandable List View showing letter the first letter of the name and expanding to reveal all persons with that name.
Take a look at this pic.
http://techdroid.kbeanie.com/2010/09/expandablelistview-on-android.html

What I did was: Created two listviews side by side with alphabets as well as people
like this
with which you can scroll alphabets one side and corresponding people will load on other side.
Thanks

Related

Make a list of tags style using listview/gridview android

I want to know, can we make list of item that not having same width and stand after each other, like tags in blog website
for example:
shoes, clothes, shock,
burger,
so the item goes next after previous one, but in different width. im trying listview it goes new line every item, if gridview, it consistent width not fill the need.
As I'm in beginner level of android programming, I want to know if we can achieve that?
Hope this is what you are looking for link

Creating rows of buttons

I'm relatively new to Android development, so bear with me. I'm creating an app that features many calculations and formulas for weather, distance, speed, etc. Anyway, I'm looking to create the main menu with rows of buttons similar to how the iPhone does it, i.e. you press one button row and it takes you to the next page of a rows of buttons.
Sort of like:
Is this done using layouts and controls or a menu?
Your best bet would be to use a list view. I did this where you would have a list of items, similar to your home, About Drupal, Typography, etc., and then when the user clicked on one of those buttons, you would be taken to a detail page, or in Android's case, another Activity. Here is a great tutorial that will show you how to implement the list view:
http://www.ezzylearning.com/tutorial.aspx?tid=1763429
Hope this helps.

How do you organize an application with a list of items, which link to a lot of activities?

I am making an application and I can't figure out what's best to do.
I have a long list of tableRows. About 200 of them. They are different
models of a specific product. Each row, when clicked, should show a
screen with that item's specs for the user to read.
Here are my options, I would need help and guidance on how to do each one of these as I am a beginner (but I'm getting more advanced)
First Approach
Create an activity for each and every item. The user will click the row and then they will have to press back to get back to the list. (I know how to do this. I'm fine with this)
Second Approach
I read about horizontal page swiping. Similar to the Play Store. I would prefer this option, but would I be safer sticking to lots of activities?
When the user clicks a row, it would bring them to the item spec and they will be able to swipe left and right between all the items. Pressing back will bring them back to the list.
(This is the one I need full step-by-step guidance with, so I can learn for the future, thanks)
Does anyone have any other suggestions how I would handle this amount of data?
Thanks
You have a long list of items. That suggests you use a ListActivity to show the items. If the items have similarities, use one view to show them and one Activity to show details. If the items are totally different, use different layouts to inflate in getView and different activities. Having the items in one list suggests, however, that there are similarities and it's best to use one layout in the listview and one activity for details.
Alternatively, you can group your items according to similarity in the way you show them. You may end up with ten different views to use in the listview, and ten different activities.

Expandable list view with forms

I've been asked to make an app that has a very VERY long data input form (we're talking around 50 fields here!). Thats a design constraint and there is absolutely no way for me to work around that.
What I'm trying to do is to display the form in a way thats easier on the user. My idea was to break the form into sections and somehow use an expandable list view to display the form. The list group would be the section name and the list items would be the input forms.
My problem is that since the form can contain different types of input fields (checkboxes, radio buttons, textfields etc) and since I'm new to android programming, I dont really know how to do this. All the online tutorials I can find are about simple uniform expandable lists. Can someone suggest me a good tutorial or an alternative to my idea?
I would look into using ExpandableListView as is, but create your own xml layout file for each list 'child' row, putting the field name and then a text input field for the value into it.
Have alook at this page where the author shows how you can put a 'checkbox' next to each list items row:
http://mylifewithandroid.blogspot.com/2010/12/expandable-list-and-checkboxes.html
You have to use child layout view for achiving this.
follow below link and find the code,Inflating only one text view but u can inflate the complete layout(I personally used that thing in my code).
Expandable list view
What you're going to need to do is extend your BaseExpandableListAdapter and customize it to display all the various layout options. Specifically, it's going to be the getChildView() method that you'll have to do the most work in. Do some searches for customizing or extending the BaseExpandableListAdapter and you should find plenty to go by.
Also, take a look at the example from the SDK:
http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/view/ExpandableList1.html
Edit: Link not available

Programming logic/ API experience help?

I need to create a list which will all be programmed in the java code and not XML as the items within the list require processing. The left side will have a string and the right side will have a numerical value for each row. This is somewhat like a listView only slightly different as there are two variables for each row one on the right and one on the left. I need to be able to define and add rows freely in the code. How do I go about in programming this type of list into my application. Thanks in advance for any help.
Please refer to the List3 Example (Cursor (Phones) Example in the API Demos) for an example of how to display columns of different types in a list view.
http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/view/List3.html

Categories

Resources