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.
Related
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
I would like to know what is the best and most efficient way for both the user and developer(me) to display more than 100 items. Right now I have them all in a ExpandableListView. Every group carry's 11 child items(there are 10 groups). This is not being pulled from any database and is all static information(images textview's). I'm trying to design this so the user can get to information quickly. If anyone knows a better way to do this, please share.
So it sounds like you have a pretty simple set of data you wish to show the user. And seeing that you need to show 100 or such items, there's not many options when it comes to efficiency for both user and you.
ExpandableListView is def a good choice. It'll allow the user to select which portion of the data to view at a time. It's not hard to get one rolling either. Android provides a very basic SimpleExpandableListAdapter which is good for displaying static data. The most difficult part in working with it is assembling your data into the format it requires.
Another alternative is some sort of Tabbed display. Selecting each tab would load a new ListView of data. Basically the tabs here would be equivalent to the groups in the ExpandableListView. This could allow for showing more items within each grouping because the tabs would only span one row across the screen horizontally. You could implement different ways but here's a link which introduces and walks you through one. From the user perspective, this approach is merely a change in look and feel really...it's a bit more involved for the programmer to implement.
I'm creating a new activity using a linearlayout and I want to make something similar to the stock version of Google Play Music'se tab-like down-arrow buttons (sorry didn't clarify: the button list of Artist and their album when pressed, NOT the recent/artists/albums near the top):
I want to be able to have those vertical tab/buttons, which I can tap and it'll pull down it's items, but I don't know what to start with; I'm cross-eyed from looking at all the different ways of trying to achieve this.
Seems like you're looking for ExpandableListView. You can style the items just as you would with a normal ListView (inflating your own layout for every item). The adapter is a little more complex than an adapter for a ListView, but there's good tutorials.
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.
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