I'm searching for a widget in a android app where the user can select a item from a specific list. it's only possible to select one and the list is defined by the app.
it's like a dropdown. I can't use a simple listView because I need at least 4 of there controls on one page. so what is a good solution?
I think, you are looking for something like Spinners
Spinners is what you are looking for.
You can use Spinner in android for dropdown.or you can use AlertDialog as like that of drodown.For using spinner read this.For using AlertDialog read this
Related
First I want to mention that I am a beginner in android.
Basically I am trying to implement the Microsoft's calculator in android.For now I am implementing only the UI.
Is it possible to make a dropdown list of buttons?
Like in this picture when you select Bitwise a list of buttons appears.Also is it possible Bitwise also to be a button and if not to act like one?
Yes, it is possible.
you must use a custom spinner.
By custom spinner, you can add any layout you like to your spinner; so you can create a layout that has a button.
You can search for Android custom spinner and learn about that.
I will give you an educational link about that.
How to add Custom Spinner in android?
I would ask what is name of this UI component:
I need a make something like this in my app., so I will very happy if you answer me :)
It is called as Spinners in android.... here is a link for a tutorial that will help u creating one.
Tutorial Link
You can find the official documentation here
This is a Spinner.
Spinners provide a quick way to select one value from a set. In the default state, a spinner shows its currently selected value. Touching the spinner displays a dropdown menu with all other available values, from which the user can select a new one.
(cf documentation)
I am looking to achieve the functionality of an AutocompleteTextView but slightly different. Instead of getting a drop-down list with suggestions i want it to complete the sentence for me.
For example: i type abc and i get completed, with the rest of the text in grey: abc1#etc.etc and then click a button to keep this text or keep writing to filter this even further.
Do you think is is achievable somehow?
I have looked my problem up so far but all the answers i found involved a drop-down list, perhaps i haven't looked deep enough.
Why don't you try to implement a custom view?
Basically, you need to the same things that the AutoCompleteTextView does but instead of displaying N elements into the drop down list you have to add the first option to your EditText.
Have a look at:
TextWatcher in order to see how detect the user input and progress
You can then play with indexes and spannables in order to keep track of the data input by the user and the data that you are suggesting.
One thing that I don't like about this idea is the fact that if you have got:
Germans
Germany
...
You need to type a lot of letters without the possibility to choose something different from the solution that you are providing.
use below example ... i think help you...
http://teamandroid4u.blogspot.in/2012/06/autocompletetextview-example.html
I want to add search functionality into my apps, and also I did some research (http://developer.android.com/training/search/index.html) but I don't want to use database/sql. I want it to be something like this (http://www.androidhive.info/2012/09/android-adding-search-functionality-to-listview/) where you put all your search terms in a list of strings.
Question:
How do I implement the function where you click one of those search terms in listview, and the strings of the search term clicked will show up. Or is there any alternative way I can do this?
Comments are appreciated
Probably this might help you..see here
I think you should implement a new adapter rather than using ArrayAdapter. I don't know whether it is possible to do that using ArrayAdapter also.
I have a list preference which shows a list of languages of different Countries.
I'd like to have the flag of each Country shown as well. Can someone please tell me the best way to go about this?
Thank You
You can create your custom alert to show the required list of languages. the custom list can have your custom layout.