Custom Drop down like layout - android

I want a custom layout drop down box for my app as if like i am on my homepage and i press a button that's in center of page and then this layout should appear after i press that button, i tried several other and searched the internet but i was unable to get an idea on how to make a drop down box like this :
this shows like two kinds of layout first one we pick the date like 12 months in first column , then 1-31 numbers and then the year from 2001-2012, i don't get and idea that how can make this effect like glassy one i wanted to make like exact same layout as shown here, can any one please suggest me how to implement that coding will me much helpful.

There is an example you can refer this one
http://code.google.com/p/android-wheel/
you can get source from here for that
http://android-wheel.googlecode.com/svn/trunk/
another example
https://github.com/sys1yagi/AndroidPractice/tree/master/DrumPicker/trunk

Related

To draw the graph like Structure along with the Radiobutton?

enter image description here
As I am beginner in android so I don't know the name of this structure exactly but i have highlighted it in rectangle shape...
I have to design this in xml is it possible to design it in xml??
If not how it can be done???
I have a screen like this a graph like structure along with 4 Radiobuttons.The data in the radio button wont be static it might change. I just want the radio buttons over the line of the graph and it might not vary if the screen size changes.
So all in all i want to implement this graph like structure with radio button does any one has any idea what this is called originally and how it will be implemented
Thanks in advance :-)

Android : Editing values using alert dialog

In my application I currently have an xml layout that is re-used to enter information 6 times (these are turns in a game). This works fine. At the end of the round I present a screen that has a summary of each turn. I want to implement a button beside each turn to "edit" that turn. There are 3 possible things that can be edited. Ideally an alert dialog or something like a "popup" would be idea for this.
Would I be best off to have 3 buttons per "turn" for editing or is there a way to do this with a popup?
Thanks for your input on this matter.
You could list each turn and it's information with a single edit button next to each. When the edit button is pressed, create a new activity (intent) that prompts for all three pieces of data.
You have several options (and probably more I'm not thinking about). If these are in a ListView (or even if not) you could use a ContextMenu. You could have options in here to change the selected item or others. This would show a popup when the user long clicks the item
A PopupMenu can give you a similar effect that can pop up a list of options when the user clicks on a Button. Note that this requires API >= 11
You also could use an AlertDialog, as you mentioned. But just from what little I know about what you are trying to do I'm not sure this is what you would want.
Again, I don't know enough details about what you have or want but I would say that one of the first two options would suit you best. As far as one Button or multiple Buttons, that depends on the layout that will work best for your app, I suppose. You certainly could have one "Edit" Button which uses something like a PopupMenu and allows the user to choose what to edit. I hope this helped a little.

Android ExpandableList Header with spinner

I'm developing an application and I am facing a problem using ExpandableListView. What I'm trying to do is, in GroupHeader, not only show the group name, but also an spinner with options. That's because I want to show the football second division games in the list but, also, give the option to choose the round, in case the user wants to check older/future games. SO far I have that
As you can see both, title and spinner, shows. Also you can see the arrow on the right which is supposed to expand the list. Problem is that, if I click, only spinner opens, group expand button doesn't. So, here is my question, how can I make both of them work depending on where you click (one or another)??? Is that possible?
Also I must say that if I only place the TextView with the group name works perfect. If I only place the spinner, the problem persists. So I'm guessing that's a focus problem.
Btw: grey areas are the layout backgrounds, so no, they are not hiding behind the button.
I found the solution, I just neede to add this line android:descendantFocusability="blocksDescendants" to the Main Layout of the xml where I define the GroupHeader elements.

xml for dropdown text

I have used this forum when I didn't know how to do something, but now I have decided to begin participating in it.
I would like to know how could I do a dropdown text (maybe it has a specific name and that's why I don't find any results on the internet). I mean, I have some tags in the screen (About, Company, Contact, ...). Each of these tags has a down arrow on the right side, and when I click it, it has to display (and hide if it's clicked again).
Here are the links with the images of what I want to do.
http://i45.tinypic.com/4fzoso.png
http://i47.tinypic.com/2u5886q.png
Thank you in advance!
You should use an ExpandableListView component.
There is a tutorial for it here.
Finally I did it with ImageViews and TextViews using the property android:visibility. Now that it's a static version is working properly. I hope that it continues working well when taking the information from the DB

How to use a spinner that does not expand, but just used to click on?

I am getting this from googles calendar, hopefully you can see the image:
When looking specifically at the From and To parts, those look like Spinners, but I could be completely wrong. I would like to do that, essentially what the Calendar in ICS does with Spinners. I put the users date in it, then user clicks and a datepicker pops up. Problem is, I dont see anything that allows me to just set text in it. How can I set it to text without expanding? Thanks in advance.
They don't use a Spinner, but a Button that looks like a Spinner. Take a look to the style.xml files of the app.

Categories

Resources